Last active
July 23, 2021 18:36
-
-
Save vrutkovs/6d96a50643ab4671006a564af2dbb1d4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stages: | |
- build | |
- push | |
- cleanup | |
build: | |
stage: build | |
variables: | |
REGISTRY_SERVER: foo.bar | |
IMAGE_NAME: vrutkovs-public/openshift-ansible-testing | |
script: | |
- buildah bud -t ${IMAGE_NAME}:${CI_COMMIT_SHA} . | |
push: | |
stage: push | |
script: | |
- export TAG=${CI_COMMIT_REF_NAME} | |
- if [ ${CI_COMMIT_REF_NAME} == "master" ]; then export TAG="latest"; fi | |
- podman login --username "${REGISTRY_USERNAME}" --password "${REGISTRY_PASSWORD}" "${REGISTRY_SERVER}" --tls-verify=false | |
- podman push localhost/${IMAGE_NAME}:${CI_COMMIT_SHA} docker://${REGISTRY_SERVER}/${IMAGE_NAME}:${TAG} --tls-verify=false | |
only: | |
- branches@vrutkovs/openshift-ansible-testing | |
cleanup: | |
stage: cleanup | |
script: | |
- buildah rmi ${IMAGE_NAME}:${CI_COMMIT_SHA} | |
- buildah rmi -p | |
when: always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
concurrent = 1 | |
check_interval = 0 | |
[[runners]] | |
name = "vrutkovs" | |
url = "foo" | |
token = "token" | |
executor = "docker" | |
[runners.cache] | |
[runners.docker] | |
tls_verify = false | |
privileged = true | |
disable_cache = true | |
image = "tomkukral/buildah:latest" | |
environment = ["GIT_SSL_NO_VERIFY=true"] | |
volumes = ["/var/lib/containers/:/var/lib/containers/"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment