1
0
mirror of https://github.com/openshift/source-to-image.git synced 2026-02-05 21:44:56 +01:00
Commit Graph

45 Commits

Author SHA1 Message Date
Matej Vasek
a2855300cd refactor: Copy() takes a predicate not a set
Predicate is more universal than a set (Go map).

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-03-09 19:51:01 +01:00
Nabil BENDAFI
3bdb78d004 Apply .s2iignore during copy from local directory
- Fixes #867
2019-03-25 22:02:53 +01:00
Jan Wozniak
c845115212 build: keep symlinks flag 2018-07-26 13:12:28 +02:00
Jim Minter
aaa1d47a1e implement functionality to copy broken symlinks and not try to copy their contents 2017-10-26 12:57:48 -05:00
Jim Minter
7da3d3e975 git URL parsing rewrite 2017-07-13 09:09:56 +01:00
Jim Minter
284517c0ec move git-related interfaces to pkg/scm/git 2017-07-11 13:58:16 +01:00
Jim Minter
d4e9bd0df6 break out util/cmd, util/fs, util/cygpath packages 2017-07-11 13:58:16 +01:00
Ben Parees
1eebbcc799 ensure created directories are readable/executable
bug 1467819

https://bugzilla.redhat.com/show_bug.cgi?id=1467819

add test repo for overriding scripts
2017-07-05 16:40:49 -04:00
Jim Minter
251057d7f3 s2i windows build enablement
- enable use of cygwin to build and test s2i
- simplify git and file downloaders
- track posix file permissions on windows
- remove unnecessary runtime.GOOS == "windows" checks
- unit test fixes
2016-11-29 19:17:50 +00:00
Jim Minter
c0eb0e35ed streamline tar API, stop writing intermediate directories 2016-11-28 15:14:01 +00:00
Jim Minter
1a0ef1eb7e miscellaneous changes associated with s2i windows work
- add missing function documentation
- fix govet shadow warnings
- fix spelling errors
- add .atom-build.yml to .gitignore
- don't mess up bash completions if build fails
- re-enable test-go.sh race checker as documented
- remove extraneous goroutines in tests
- use ExcludeRegExp in integration tests
- remove finished containers in integration tests
2016-11-28 15:13:50 +00:00
Jim Minter
0604914056 fix lint warnings 2016-10-18 11:21:52 +01:00
Jim Minter
c3393ec76c teach isValidGitRepository about git submodules 2016-10-17 12:20:09 +01:00
OpenShift Bot
093870edec Merge pull request #610 from jim-minter/splittarroutine
Merged by openshift-bot
2016-10-11 17:26:48 -04:00
Jim Minter
1f6fd4e0ec add ExtractTarStreamFromTarReader 2016-10-11 17:46:57 +01:00
Jim Minter
952a14be8a bump go versions used by travis 2016-10-11 14:21:12 +01:00
oatmealraisin
472c571d1b Moved createLocalGitDirectory to test package
This allows multiple unit tests to use these functions, which were
previously copy/pasted between them.
2016-08-09 17:47:28 -04:00
oatmealraisin
9a194b5814 Added checks for existing content is git repo
This fixes an error when the git repo is empty, e.g. the user only ran
`git init`.  If the repo is empty, we use system copy commands instead
of git commands, and warn the user.

Also added errors for if there is a .git directory in the project, but
a Git binary is not installed.  Changed various function headers to throw
these errors.
2016-08-04 14:01:07 -04:00
Slava Semushin
626f7cc2da Add support for extended build.
From now you can create final image that is based on the image that is
different than builder image. To use it provide --runtime-image option
with image that will be used in runtime.

Also specify --runtime-artifact option (one or more times) with a list
of files and directories that will be copied into resulting image.
Alternatively this mapping can be extracted from the
io.openshift.s2i.assemble-input-files annotation on a runtime image.

To execute custom logic to arrange image to a desired state, you can
leverage "assemble-runtime" script. You can 1) put it .s2i/bin directory
with application sources 2) download it from remote location (-s option)
or 3) have it inside a runtime image (but don't forget to add
io.openshift.s2i.scripts-url label on it).
2016-07-08 17:30:01 +02:00
Dan McPherson
19b107c7c3 Git is not an acronym 2016-03-29 16:52:19 -04:00
Michal Fojtik
2cb814b5a6 Support injecting files into a container that runs assemble script 2016-01-11 10:52:08 +01:00
Christian Stewart
83ac43ccd4 git: Add submodule commands.
Adds submodule update and init commands.

Signed-off-by: Christian Stewart <christian@paral.in>
2015-11-17 17:37:34 -05:00
OpenShift Bot
6722c67fc0 Merge pull request #348 from csrwng/fix_file_copy
Merged by openshift-bot
2015-11-12 14:26:47 -05:00
Cesar Wong
02354016db Fix copying of local file directory 2015-11-12 13:56:33 -05:00
Michal Fojtik
68e2828a29 Add source info into callback 2015-11-12 14:58:27 +01:00
gabemontero
06b5160fee Revert "Revert "don't require .git suffix; consolidate URL validation and no protocol construction""
This reverts commit 0cae25aa59.
2015-11-10 11:43:59 -05:00
Michal Fojtik
90134c695d Replace --force-pull with --pull-policy 2015-11-06 11:54:19 +01:00
Ben Parees
0cae25aa59 Revert "don't require .git suffix; consolidate URL validation and no protocol construction"
This reverts commit 73dd2c2d09.
2015-11-04 15:49:08 -05:00
gabemontero
73dd2c2d09 don't require .git suffix; consolidate URL validation and no protocol construction 2015-11-02 10:47:40 -05:00
Cesar Wong
56e2f67d20 Add logging to tar, fix extract when parent dir is . 2015-10-27 09:27:21 -04:00
Clayton Coleman
d31d44f473 Allow S2I behavior to be overriden by caller
Origin needs to be able to download and assemble the source
itself and then pass it to s2i. This commit adds changes to
allow an Overrides object to be passed to the s2i initializer
code to provide a custom Downloader.

This also makes changes to allow better reuse of upstream s2i
code and removes a write to disk for the intermediate tar (which
can be streamed instead).
2015-10-19 17:59:16 -04:00
Cesar Wong
29b8fb05d1 Expose the CreateTarStream function publicly
Also allows setting the exclusion pattern for tar and allows
specifying whether the source directory should be included in
the path for the tarred files.
2015-09-28 13:37:10 -04:00
Cesar Wong
c9d475ae3c Fix integration test by merging labels of committed image 2015-09-28 12:13:44 -04:00
Michal Fojtik
a41cde7192 Allow to disable --recursive fetch 2015-09-10 11:16:28 +02:00
Cesar Wong
965426e9f4 Add allowed-uids flag to the STI command 2015-08-11 17:04:49 -04:00
Cesar Wong
62b32aba4e Revert "Add flag to prevent builders from running as root"
This reverts commits 31c8706886 and 5d118bd5f3.
2015-07-20 12:52:25 -04:00
Cesar Wong
5d118bd5f3 Add flag to prevent builders from running as root 2015-07-10 11:03:10 -04:00
Maciej Szulik
b6d798a614 Added fallback to use local image when Builder's PullImage fails, informing a user with a warning 2015-07-06 11:17:21 +02:00
Michal Fojtik
156089e1e8 Add labels with build metadata into output image 2015-06-25 12:06:37 +02:00
Maciej Szulik
a35d3ba684 Changed Script -> string for readability 2015-02-20 13:54:14 +01:00
Maciej Szulik
e5f98d87fd Card devexp_426 - Clean builds by default and enable retrieving images for incremental builds from external repo 2015-02-20 11:50:10 +01:00
Maciej Szulik
e67968972b Refactor installer interface 2015-02-19 21:50:27 +01:00
Michal Fojtik
5c4bed5713 Added missing OnBuild strategy tests 2015-02-18 09:57:26 +01:00
Michal Fojtik
faee7e9495 Detect OnBuild based on presence of OnBuild instructions in Image metadata 2015-02-13 11:37:06 +01:00
Michal Fojtik
4a6c21f0cb Refactor to support more build strategies 2015-02-10 15:51:12 +01:00