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