Skip to content
Snippets Groups Projects
Commit 25183835 authored by yyvf's avatar yyvf
Browse files

ci: restore kaniko

parent 724d6a07
No related branches found
No related tags found
No related merge requests found
Pipeline #41656 passed
......@@ -4,11 +4,22 @@ stages:
build:
stage: build
image: quay.io/podman/stable
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
before_script:
- echo "{\"auths\":{\"${HARBOR_HOST}\":{\"auth\":\"$(echo -n ${HARBOR_USERNAME}:${HARBOR_PASSWORD} | base64 -w 0)\"}}}" > /kaniko/.docker/config.json
script:
- echo "${HARBOR_PASSWORD}" | podman login -u "${HARBOR_USERNAME}" --password-stdin "${HARBOR_HOST}"
- podman build -t "${HARBOR_HOST}/${HARBOR_PROJECT}/${CI_PROJECT_NAME}:${CI_COMMIT_TAG}" "${CI_PROJECT_DIR}"
- podman push "${HARBOR_HOST}/${HARBOR_PROJECT}/${CI_PROJECT_NAME}:${CI_COMMIT_TAG}"
- >-
/kaniko/executor
--context "${CI_PROJECT_DIR}"
--dockerfile "${CI_PROJECT_DIR}/Dockerfile"
--destination "${HARBOR_HOST}/${HARBOR_PROJECT}/${CI_PROJECT_NAME}:${CI_COMMIT_TAG}"
--single-snapshot
--snapshot-mode=redo
--use-new-run
--cache=true
--compressed-caching=true
deploy:
stage: deploy
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment