Skip to content
Snippets Groups Projects

build the Dockerimage used in CI

Merged Bas Nijholt requested to merge docker into master
Compare and Show latest version
2 files
+ 23
20
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 22
19
image: quantumtinkerer/research
image: quantumtinkerer/research # until the other image is build
stages:
- prebuild
- test
build docker:
stage: prebuild
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
before_script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- export CI_REF=${CI_COMMIT_TAG:-latest}
script:
- /kaniko/executor
--context $CI_PROJECT_DIR
--dockerfile $CI_PROJECT_DIR/Dockerfile
--destination $CI_REGISTRY_IMAGE:$CI_REF
test:
stage: test
script:
- py.test --verbose --cov=adaptive --cov-report term --cov-report html adaptive
artifacts:
@@ -8,29 +27,13 @@ test:
- htmlcov
authors check:
stage: test
script:
- MISSING_AUTHORS=$(git shortlog -s HEAD | sed -e "s/^[0-9\t ]*//"| xargs -i sh -c 'grep -q "{}" AUTHORS.md || echo "{} missing from authors"')
- if [ ! -z "$MISSING_AUTHORS" ]; then { echo $MISSING_AUTHORS; exit 1; }; fi
allow_failure: true
check whitespace style:
stage: test
script: ./check_whitespace
allow_failure: true
build docker:
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
before_script:
- docker login -u $CI_DEPLOY_USER -p $CI_DEPLOY_PASSWORD $CI_REGISTRY
- export CI_REF=${CI_COMMIT_TAG:-latest}
script:
- /kaniko/executor
--context $CI_PROJECT_DIR
--dockerfile $CI_PROJECT_DIR/Dockerfile
--destination $CI_REGISTRY_IMAGE:$CI_REF
only:
changes:
- Dockerfile
- environment.yml
- test-requirements.txt
Loading