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

116 Commits

Author SHA1 Message Date
Matej Vašek
e24d63bbb7 chore: remove usage of deprecated pkg
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
2024-06-04 09:56:55 +02:00
gabemontero
ed1f0ecedc update script url from builder image labels with s2i build --as-dockerfile 2021-07-02 15:50:15 -04:00
gabemontero
594f5bf313 Revert "support .s2i/image_metadata.json with --as-dockerfile"
This reverts commit 38d2b729fd.
2019-12-10 11:11:13 -05:00
gabemontero
38d2b729fd support .s2i/image_metadata.json with --as-dockerfile 2019-10-29 11:58:15 -04:00
Adam Kaplan
1fad0a5e69 Refactor glog to log/klog in code
* pkg/util/glog -> pkg/util/log
* var glog replaced with var log
* Removed unnecessary flag.Parse call (fixed with klog)
2019-07-15 15:04:15 -04:00
Adam Kaplan
9c608549ea Bump golang to 1.12 2019-06-06 15:13:54 -04:00
05601970475
e685afa89f add assemble-runtime-user flag
documentation of assemble-runtime-user's flag

add LABEL assemble-runtime-user

removing debug messages

change the failure reason of GetAssembleRuntimeUser

assemble-runtime-user is optional

generate completitions

check getAssembleRuntimeUser error
2018-11-19 17:13:54 -03:00
magicsong
1b45714ced add --add-host flag 2018-09-21 11:57:04 +08:00
Adam Kaplan
6815fa6d92 Allow URLs for Image Scripts Location
* Rename ImageScriptsDir to ImageScriptsURL
* Allow ImageScriptsURL to download scripts from filesystem, web, etc.
* Add default path for image scripts
* Update cli and completions
2018-08-10 11:38:08 -04:00
Jan Wozniak
c845115212 build: keep symlinks flag 2018-07-26 13:12:28 +02:00
OpenShift Bot
a0e5343a82 Merge pull request #898 from bparees/image
Merged by openshift-bot
2018-06-27 16:07:17 -04:00
Ben Parees
ab7a0b064e do not do image lookup when doing dockerfile output build 2018-06-27 10:43:29 -04:00
Adam Kaplan
9b55f54e76 api/constants package
Moved docker labels, s2i scripts, and deprecated env var constants
to it's own package.

Fixes #882
2018-06-21 08:49:12 -04:00
Adam Kaplan
cfd8419086 Check Assemble Users Against Allowed UIDs
Adding check to ensure the s2i assemble user is allowed if the --allowed-uids flag is set.
The assemble user can come from one of two sources:

1. --assemble-user flag
2. builder image io.openshift.s2i.assemble-user label

The assemble user overrides the default image user for an s2i build.
However, if the base image has ONBUILD instructions with USER directives,
all USER directives will be checked to ensure compliance.

Bug 1582976
2018-05-29 10:55:15 -04:00
Ben Parees
62488a5747 Option to produce a buildable Dockerfile instead of an image when building 2018-05-25 10:33:41 -04:00
Adam Kaplan
1489f8db57 Keep Option for Injected Files
* Adding a Keep option to VolumeSpec so that files can be kept in s2i builds.
* This will be used to support the injection of ConfigMap build sources, which should not be truncated.

Trello card: https://trello.com/c/RMKJxJUm/1020-5-allow-using-a-configmap-as-an-input-to-a-build-builds
2018-05-03 15:24:19 -04:00
Adam Kaplan
be7f83aeeb Parse multiple volumes via semicolon delimeter.
Fixes issue #872
2018-05-01 11:36:50 -04:00
Corey Daley
31ed38ab85 Miscellaneous cleanup and refactoring
I was messing around with Jetbrains GoLand and ran it's code inspection
against openshift/source-to-image and it found quite a few things, so
I went through and picked the ones that seemed like good ones to fix
and fixed them.

Some of the issues that were fixed consist of:

 - Removing unused function parameters
 - Removing unused non-exported function
 - Replacing deprecated os.SEEK_SET with io.SeekStart
 - Replacing deprecated msg.ProgressMessage with msg.Progress.Current
 - Removing duplicate parenthesis
 - Renaming variables that could mask imports
 - Downcasing the first letter of error messages

I think that is mostly it, I am sure there will need to be some updates
to openshift/origin in response to these updates.
2018-01-26 11:02:08 -05:00
Cesar Wong
4b813e79b7 Validate image tag on build 2017-11-13 12:36:21 -05:00
Ben Parees
1f112e03be allow passing securityopt args down to s2i via config 2017-10-30 14:35:57 -04:00
Ben Parees
d7058c9777 remove origin dependency 2017-09-21 15:57:04 -04:00
Ben Parees
425ec0f611 add support for container netns networkmode 2017-09-20 16:05:18 -04: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
Ben Parees
39dcc8507a allow setting cgroup parent for child containers 2017-06-15 16:41:47 -04:00
Jim Minter
7751799a38 use only one engine client instance 2017-04-26 16:19:00 +01:00
guangxuli
2816855ca0 delete deprecated force pull flag
update bash and zsh

remove --force-pull
2017-03-28 10:55:04 +08:00
Corey Daley
56bd55d733 updating build timing types to fall in line with the ones in origin 2017-03-22 18:57:43 -04:00
guangxuli
bd33ac6e86 set each default pull policy at begining 2017-03-22 15:14:36 +08:00
Corey Daley
a657ec2b73 add build timing information 2017-03-20 14:17:46 -04:00
oatmealraisin
5e3fd039d3 Changed splitting index of Volume specs to first :
This allows us to specify file modes when Docker mounts, such as :Z or
:rw
2017-03-17 15:56:17 -04:00
Ben Parees
37613ff1a7 allow source info to be provided as part of config 2017-01-21 19:45:09 -05: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
Victor
deaa7d70dd add failure status for a few other cases 2016-11-17 21:10:09 +01:00
Rodolfo Carvalho
a448e0a04a Fix several typos 2016-10-27 17:47:17 +02:00
Jim Minter
10129f1a55 Add --tls,--tlsverify options and respect DOCKER_* environment variables more closely 2016-10-19 09:20:47 +01:00
Jim Minter
0604914056 fix lint warnings 2016-10-18 11:21:52 +01:00
Victor
6d893b8cef add failure message 2016-10-17 14:19:24 +02:00
Victor
9ce397d0b7 add build info 2016-10-14 16:20:36 +02:00
Martin Milata
e3d70cb5ad Add support for custom image labels 2016-10-03 19:28:15 +02:00
guangxuli
bad79be6db if found = true, add break is better 2016-09-01 19:21:28 +08:00
gabemontero
7f8cd156d0 s2i switch to k8s/engine-api 2016-08-16 15:57:42 -04:00
gabemontero
8c24edb036 s2i: s2i rebuild broken
Bug 1366475
Bugzilla link https://bugzilla.redhat.com/show_bug.cgi?id=1366475
Detailed explanation
an attempt to pull the builder image to obtain labels was made; the correct thing was
to pull the locally build image we were rebuilding
2016-08-12 13:55:55 -04:00
Ben Parees
40469a64e3 override entrypoint to env during assemble 2016-07-18 15:05:06 -04:00
OpenShift Bot
53703c5af6 Merge pull request #505 from php-coder/extended_build
Merged by openshift-bot
2016-07-08 12:59:39 -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
Ben Parees
62909fc85c replace broken --recursive with a working --ignore-submodules option 2016-07-05 23:36:47 -04:00
jupierce
05c257c1f2 Migrating s2i to use glog mock library 2016-06-28 13:51:51 -04:00
Slava Semushin
138e6924ca Minor code improvements.
- sti -> s2i
- fix a couple of typos
- remove useless fmt.Sprintf() usage
- use api.Assemble constant
- UploadToContainer: rename argument
- docs/cli.md: correct the number of log levels
- docs/debugging-s2i.md: fix a typo
2016-06-23 17:50:08 +02:00
Slava Semushin
1aaadb02e5 Minor code improvements.
- VolumeList.Set(): raise error for an empty string
- fs.Copy(): fix possible fd leak and explicitly ignore err
- docker.GetScriptsURL(): unify error messages and show image id
- improves error messages in some tests
- replaces sti by s2i in some places
- fixes a couple of typos
- improves godoc
2016-06-17 11:37:35 +02:00