kaniko
This commit is contained in:
parent
8dae52be4e
commit
d9e9df2d67
@ -6,13 +6,19 @@ stages:
|
|||||||
before_script:
|
before_script:
|
||||||
- if [ -n "$KUBE_CONTEXT" ]; then kubectl config use-context "$KUBE_CONTEXT"; fi
|
- if [ -n "$KUBE_CONTEXT" ]; then kubectl config use-context "$KUBE_CONTEXT"; fi
|
||||||
|
|
||||||
docker_build:
|
build:
|
||||||
stage: build
|
stage: build
|
||||||
|
image:
|
||||||
|
name: gcr.io/kaniko-project/executor:v1.14.0-debug
|
||||||
|
entrypoint: [""]
|
||||||
script:
|
script:
|
||||||
- version=$(cat package.json | grep version | grep -Eo "[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+")
|
- cat $DOCKER_REGISTRY > /kaniko/.docker/config.json
|
||||||
- docker build -t registry.yaemiku.dev/yaemiku/hamburger -t registry.yaemiku.dev/yaemiku/hamburger:$(version) .
|
- /kaniko/executor
|
||||||
- docker login -u yaemiku -p $DOCKER_REGISTRY_PASSWORD registry.yaemiku.dev
|
--context "${CI_PROJECT_DIR}"
|
||||||
- docker push -a registry.yaemiku.dev/yaemiku/hamburger
|
--dockerfile "${CI_PROJECT_DIR}/Dockerfile"
|
||||||
|
--destination "registry.yaemiku.dev/yaemiku/hamburger:${CI_COMMIT_TAG}"
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_TAG
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
|
Loading…
Reference in New Issue
Block a user