forked from vieter-v/vieter
Compare commits
No commits in common. "1ac76ac4526101c43837e73c5c5c6ae93026de57" and "424b0651e9fa7f40c56e23fa8dd86b562f1b748f" have entirely different histories.
1ac76ac452
...
424b0651e9
|
|
@ -22,7 +22,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
* Renamed `/api/v1/repos` namespace to `/api/v1/targets`
|
* Renamed `/api/v1/repos` namespace to `/api/v1/targets`
|
||||||
* Branch name for 'git' targets is now optional; if not provided, the
|
* Branch name for 'git' targets is now optional; if not provided, the
|
||||||
repository will be cloned with the default branch
|
repository will be cloned with the default branch
|
||||||
* Build containers now explicitely set the PATH variable
|
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,6 @@ import models { Target }
|
||||||
const (
|
const (
|
||||||
container_build_dir = '/build'
|
container_build_dir = '/build'
|
||||||
build_image_repo = 'vieter-build'
|
build_image_repo = 'vieter-build'
|
||||||
// Contents of PATH variable in build containers
|
|
||||||
path_dirs = ['/sbin', '/bin', '/usr/sbin', '/usr/bin', '/usr/local/sbin',
|
|
||||||
'/usr/local/bin', '/usr/bin/site_perl', '/usr/bin/vendor_perl', '/usr/bin/core_perl']
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// create_build_image creates a builder image given some base image which can
|
// create_build_image creates a builder image given some base image which can
|
||||||
|
|
@ -112,13 +109,7 @@ pub fn build_target(address string, api_key string, base_image_id string, target
|
||||||
|
|
||||||
c := docker.NewContainer{
|
c := docker.NewContainer{
|
||||||
image: '$base_image_id'
|
image: '$base_image_id'
|
||||||
env: [
|
env: ['BUILD_SCRIPT=$base64_script', 'API_KEY=$api_key']
|
||||||
'BUILD_SCRIPT=$base64_script',
|
|
||||||
'API_KEY=$api_key',
|
|
||||||
// `archlinux:base-devel` does not correctly set the path variable,
|
|
||||||
// causing certain builds to fail. This fixes it.
|
|
||||||
'PATH=${build.path_dirs.join(':')}',
|
|
||||||
]
|
|
||||||
entrypoint: ['/bin/sh', '-c']
|
entrypoint: ['/bin/sh', '-c']
|
||||||
cmd: ['echo \$BUILD_SCRIPT | base64 -d | /bin/bash -e']
|
cmd: ['echo \$BUILD_SCRIPT | base64 -d | /bin/bash -e']
|
||||||
work_dir: '/build'
|
work_dir: '/build'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue