I try to integrate vault and gitlab.
Vault side is ok , and I try to locate vault in our gitlab-ci.yaml but I confused something.
Where is the location of vault in yaml ?
We use gitlab ee (community).
Our yaml:
.kaniko-build:
stage: build
before_script:
- mkdir -p /kaniko/.docker
- |
cat <<EOF > /kaniko/.docker/config.json
{
"auths":{
"${CI_REGISTRY}":{
"auth":"$(printf "%s:%s" "${CI_REGISTRY_USER}" "${CI_REGISTRY_PASSWORD}" | base64 | tr -d '\n')"
},
"https://index.docker.io/v1/":{
"auth":"$(printf "%s:%s" "${DOCKERHUB_USERNAME}" "${DOCKERHUB_PASSWORD}" | base64 | tr -d '\n')"
}
}
}
EOF
- cat /kaniko/.docker/config.json
script:
- >-
/kaniko/executor
--context "${CI_PROJECT_DIR}"
--dockerfile "${DOCKERFILE_PATH}"
--destination "${CI_REGISTRY_IMAGE}:${CI_PIPELINE_IID}"
--destination "${CI_REGISTRY_IMAGE}:latest"
--cache
- echo $(date) $(date)
image:
name: gcr.io/kaniko-project/executor:v1.8.0-debug
entrypoint: [""]
test-build:
extends: .kaniko-build
when: manual
variables:
DOCKERFILE_PATH: "devops/test/Dockerfile"
rules:
- if: $CI_COMMIT_BRANCH
exists:
- devops/test/Dockerfile
interruptible: true