Commit 367b7b69 authored by Bas Nijholt's avatar Bas Nijholt

add mirroring again

parent b6f203be
Pipeline #15992 failed
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
stages:
- mirror
- build
before_script:
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- export CI_REF=${CI_COMMIT_TAG:-latest}
mirror repository:
stage: mirror
allow_failure: true
variables:
REPO: "git@github.com:quantum-tinkerer/research-docker.git"
before_script:
- mkdir ~/.ssh && chmod 700 ~/.ssh
- ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
- echo "$DEPLOY_KEY" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
after_script:
- rm -rf ~/.ssh
script:
- ORIGIN_URL=$(git config --get remote.origin.url)
- cd $(mktemp -d); git clone --bare $ORIGIN_URL .
- git push --mirror $REPO
build research env:
build image:
stage: build
script:
- /kaniko/executor
--context $CI_PROJECT_DIR
--dockerfile $CI_PROJECT_DIR/Dockerfile
--destination $CI_REGISTRY_IMAGE:$CI_REF
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
before_script:
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- export CI_REF=${CI_COMMIT_TAG:-latest}
build research env:
stage: build
script:
- /kaniko/executor
--context $CI_PROJECT_DIR
--dockerfile $CI_PROJECT_DIR/Dockerfile
--destination $CI_REGISTRY_IMAGE:$CI_REF
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment