by underyx · 8y ago · 0 comments
--label build-date=`date -Iseconds`
--label vcs-url=$CI_PROJECT_URL
--label version=git-$CI_COMMIT_SHA
--label com.kiwi.gitlab.ci.builder=$GITLAB_USER_EMAIL
--label com.kiwi.gitlab.ci.pipeline=$CI_PROJECT_URL/pipelines/$CI_PIPELINE_ID
--label com.kiwi.gitlab.ci.ref=$CI_COMMIT_REF_NAME
--label com.kiwi.gitlab.ci.build=$CI_PROJECT_URL/builds/$CI_JOB_ID
Also, all images that get to prod are commit hash tagged, but for development we also tag them with the branch name: --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
--tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUGThis is a history thing, we have stuff in production not in docker, and we use this approach with all the non-docker stuff and just carried it into docker. But I'm going to go add the data as labels to the image now as well!