1
0
mirror of https://github.com/openshift/source-to-image.git synced 2026-02-06 15:45:00 +01:00
Commit Graph

47 Commits

Author SHA1 Message Date
gabemontero
ed1f0ecedc update script url from builder image labels with s2i build --as-dockerfile 2021-07-02 15:50:15 -04:00
Adam Kaplan
2044e2993f Reduce usage of docker/docker
* Use moby/buildkit for dockerfile parsing
* Refactor TestConvertEnvironmentToDocker to be a true unit test.
2019-12-10 21:47:58 -05: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
Nalin Dahyabhai
725605db82 ConvertEnvironmentToDocker: escape "$", \, and "
When values that are passed to ConvertEnvironmentToDocker() include the
'$', '\', or '"' characters, escape them using a '\'.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2019-05-22 17:58:55 -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
Ben Parees
62488a5747 Option to produce a buildable Dockerfile instead of an image when building 2018-05-25 10:33:41 -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
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
Jim Minter
df3fe56aca prevent huge numbers of hanging goroutines 2017-04-26 16:19:20 +01:00
wang.xiaogang
c1b7bd191b modify log format 2017-01-24 14:27:53 +08:00
Victor
70c2f5ac3a improve failure status messages 2017-01-05 10:25:28 +01: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
OpenShift Bot
88c12c350b Merge pull request #633 from guangxuli/add_break
Merged by openshift-bot
2016-11-03 13:46:08 -04:00
guangxuli
95041c5ac1 optimize test case 2016-11-03 18:54:50 +08:00
Jim Minter
0604914056 fix lint warnings 2016-10-18 11:21:52 +01:00
OpenShift Bot
2da09dbd45 Merge pull request #572 from php-coder/remove_duplicate_environment
Merged by openshift-bot
2016-08-16 17:40:01 -04:00
gabemontero
7f8cd156d0 s2i switch to k8s/engine-api 2016-08-16 15:57:42 -04:00
Slava Semushin
1102abb1f2 Replace Environment by EnvironmentSpec and []Environment by EnvironmentList. 2016-08-15 12:42:13 +02: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
jupierce
05c257c1f2 Migrating s2i to use glog mock library 2016-06-28 13:51:51 -04:00
jupierce
f3c7110d7c Changing messaging to Clayton's spec 2016-06-21 14:41:19 -04:00
Rodolfo Carvalho
8621b172b5 Apply several small fixes from go vet and others
Includes:
- Changes to commentaries to follow godoc conventions;
- Fix shadowing of identifiers;
- Missing error checks;
- Fix incorrect usages of fmt.Print* functions;
- Initialize struct literals from other packages using explicit field
  names;
- Rename variables to follow Go conventions.
2016-05-18 12:06:08 +02:00
Slava Semushin
9a4232410c Minor code improvements.
- strategies/layered/layered.go: add missed bracket to comment
- strategies/layered/layered.go(CreateDockerfile): use variables instead of slice
- strategies/layered/layered.go(CreateDockerfile): extract variable
- strategies/layered/layered.go(CreateDockerfile): use -- for separating options from directories
- DefaultCleaner.Cleanup(): use %q modifier
- DefaultCleaner.Cleanup(): show warnings when error happened
- Use glog.Info instead of glog.Infof
- DefaultCleaner.Cleanup(): add comment with explanation how it works
- pkg/docker/docker.go(dumpContainerInfo): fix a typo in comment
2016-05-17 22:59:03 +02:00
Cesar Wong
6c7e58fde4 Throw an error if a scripts URL is specified but no scripts can be downloaded from it 2016-03-29 17:05:48 -04:00
Cesar Wong
2c0fc8ae61 Allow passing a proxy configuration for script download 2016-03-28 13:06:24 -04:00
Rodolfo Carvalho
87cd9702cb Fix test messages
- The majority of the changes in this commit is about removing redundant
  trailing '\n', since t.Logf & related methods automatically handle
  trailing new lines, and essentially ignore that extra line we're
  adding.
- Replace several usages of '%s' where '%q' would be more useful.
- Fix cases where the arguments to format the string were incorrectly
  part of the string itself, not arguments.
2016-03-23 14:16:24 +01:00
Michal Fojtik
d86a461457 Deprecate .sti/environment 2016-02-08 10:46:45 +01:00
Maciej Szulik
05eee4936c .sti/environment -> .s2i/environment 2016-02-03 09:25:25 +01:00
Michal Fojtik
9176989510 Fix .sti/bin detection 2016-01-29 19:52:45 +01:00
Michal Fojtik
e5455214a2 Refactor S2I script installation 2016-01-27 12:32:13 +01:00
Michal Fojtik
b86ed91aea Print warning when s2i script exists in wrong directory 2015-11-12 10:48:45 +01:00
Michal Fojtik
90134c695d Replace --force-pull with --pull-policy 2015-11-06 11:54:19 +01:00
Jonathan Dowland
929e2bd8a2 minor typo fix 2015-07-07 14:24:42 +01:00
Michal Fojtik
82ff17419b Add support for new scripts-url label format 2015-06-26 15:42:50 +02:00
Michal Fojtik
156089e1e8 Add labels with build metadata into output image 2015-06-25 12:06:37 +02:00
Maciej Szulik
98c96e3887 Fixed relative path handling when specifying --scripts-url flag 2015-05-29 21:07:54 +02:00
Maciej Szulik
fbfcc2cd88 Issue 205 - renamed io.openshift.sti.* label to shorter io.s2i.* 2015-05-29 20:48:26 +02:00
Maciej Szulik
ad4dd9e325 Added method for validating Config object - should fix #144.
Reviewed and removed unnecessary fields from Config, which was also
renamed from Request (fixed #100).
2015-05-29 12:29:04 +02:00
OpenShift Bot
14c0ebafd9 Merge pull request #182 from bparees/merge_env
Merged by openshift-bot
2015-05-12 07:47:10 -04:00
Ben Parees
40a5d5e600 merge env variables when appending them to dockerfile 2015-05-11 16:40:33 -04:00
Michal Fojtik
124af7d3c2 Add support for request.PullAuthentication 2015-05-07 18:38:14 +02:00
Cesar Wong
4391162d62 Set permissions of installed scripts to world read/exec
This makes it possible for users that are not the user building
the STI image to execute the image.
2015-05-01 11:11:32 -04:00
Michal Fojtik
d2e8a4602c Add support for .sti/environment file 2015-02-24 21:33:41 +01:00
Maciej Szulik
a35d3ba684 Changed Script -> string for readability 2015-02-20 13:54:14 +01:00
Michal Fojtik
e8fdd7fdeb Fix the errors names 2015-02-20 11:36:44 +01:00
Maciej Szulik
e67968972b Refactor installer interface 2015-02-19 21:50:27 +01:00