Last active
January 16, 2020 08:30
-
-
Save kvaps/0713cd35d260c9a7eac44f2d44b488e4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Task for uilding docker-image | |
dockerImage(name):: { | |
tags: ['build'], | |
stage: 'build', | |
image: { | |
name: 'gcr.io/kaniko-project/executor:debug-v0.15.0', | |
entrypoint: [''], | |
}, | |
script: [ | |
'echo "{\\"auths\\":{\\"$CI_REGISTRY\\":{\\"username\\":\\"$CI_REGISTRY_USER\\",\\"password\\":\\"$CI_REGISTRY_PASSWORD\\"}}}" > /kaniko/.docker/config.json', | |
'/kaniko/executor --cache --context $CI_PROJECT_DIR/dockerfiles/' + name + ' --dockerfile $CI_PROJECT_DIR/dockerfiles/' + name + '/Dockerfile --destination $CI_REGISTRY_IMAGE/' + name + ':$CI_COMMIT_TAG --build-arg VERSION=$CI_COMMIT_TAG', | |
], | |
}, | |
// Job for deploying qbec application | |
qbecApp(name): { | |
stage: 'deploy', | |
script: [ | |
'qbec apply $CI_COMMIT_REF_NAME --root deploy/' + name + ' --force:k8s-context __incluster__ --wait --yes', | |
], | |
only: { | |
changes: [ | |
'deploy/' + name + '/**/*', | |
], | |
}, | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment