Last active
January 13, 2021 23:14
-
-
Save danrue/49345b32c7a1f9d0a8cb3e126a01e1b1 to your computer and use it in GitHub Desktop.
gitlab-ci for building and then using a container using podman
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-image | |
- mirror | |
before_script: | |
- podman login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY | |
- podman pull $IMAGE_TAG || true # ensure the latest is downloaded | |
variables: | |
IMAGE_TAG: $CI_REGISTRY_IMAGE:latest | |
build-image: | |
image: quay.io/podman/stable | |
stage: build-image | |
script: | |
- podman build --cache-from $IMAGE_TAG --pull -t $IMAGE_TAG . | |
- podman push $IMAGE_TAG | |
mirror-nightly: | |
image: $IMAGE_TAG | |
stage: mirror | |
script: | |
- echo "hello, world!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment