Merge branch '1-add-docker-build-pipeline' into 'main'
Resolve "Add docker build pipeline" Closes #1 See merge request openappstack/admin-backend!1
This commit is contained in:
commit
2c120886e8
1 changed files with 17 additions and 0 deletions
17
.gitlab-ci.yml
Normal file
17
.gitlab-ci.yml
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
stages:
|
||||||
|
- build-container
|
||||||
|
|
||||||
|
variables:
|
||||||
|
KANIKO_BUILD_IMAGENAME: admin-backend
|
||||||
|
|
||||||
|
build-container:
|
||||||
|
stage: build-container
|
||||||
|
image:
|
||||||
|
# We need a shell to provide the registry credentials, so we need to use the
|
||||||
|
# kaniko debug image (https://github.com/GoogleContainerTools/kaniko#debug-image)
|
||||||
|
name: gcr.io/kaniko-project/executor:debug
|
||||||
|
entrypoint: [""]
|
||||||
|
script:
|
||||||
|
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
|
||||||
|
- /kaniko/executor --cache=true --context ${CI_PROJECT_DIR}/ --dockerfile ${CI_PROJECT_DIR}/Dockerfile --destination ${CI_REGISTRY_IMAGE}/${KANIKO_BUILD_IMAGENAME}:${CI_COMMIT_REF_NAME}
|
||||||
|
|
Loading…
Reference in a new issue