good morning!!!!

Skip to content
Snippets Groups Projects
Commit c1c6f006 authored by a's avatar a
Browse files

Update .gitlab-ci.yml, .gitlab-ci.jsonnet

parent 8e3d66c5
Branches
No related tags found
No related merge requests found
Checking pipeline status
local param_cmd(image) = {
cmd: |||
/kaniko/executor
--context ${CI_PROJECT_DIR}
--dockerfile "${CI_PROJECT_DIR}/Dockerfile"
--destination "${CI_REGISTRY_IMAGE}/%(img)s:${CI_COMMIT_SHORT_SHA}"
--destination "${CI_REGISTRY_IMAGE}/%(img)s:latest"
||| % {img: image},
};
local param_job(image, depends=[]) = {
stage: 'build',
image: {
name: 'gcr.io/kaniko-project/executor:debug',
entrypoint: [''],
},
[if std.length(depends) > 0 then 'needs' else null]: depends,
script: [
'mkdir -p /kaniko/.docker',
@'echo "{\"auths\":{\"${CI_REGISTRY}\":{\"auth\":\"$(printf "%s:%s" "${CI_REGISTRY_USER}" "${CI_REGISTRY_PASSWORD}" | base64)\"}}}" > /kaniko/.docker/config.json',
std.strReplace(param_cmd(image).cmd,"\n"," ")
]
};
{
"heimdall": param_job("heimdall",[]),
}
jsonnet:
stage: build
image: alpine:latest
script:
- apk add -U jsonnet
- jsonnet .gitlab-ci.jsonnet > generated-config.yml
artifacts:
paths:
- generated-config.yml
trigger-builds:
stage: build
needs:
- jsonnet
trigger:
include:
- artifact: generated-config.yml
job: jsonnet
strategy: depend
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment