Skip to content

Commit

Permalink
[ci] Update buildah command and version
Browse files Browse the repository at this point in the history
  • Loading branch information
alvicsam committed Apr 24, 2023
1 parent c67362b commit fc5e3b3
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ variables:
DOCKERFILE: scripts/ci/docker/zombienet_injected.Dockerfile
DOCKERHUB_REPO: paritytech
IMAGE_NAME: $DOCKERHUB_REPO/zombienet
BUILDAH_IMAGE: "quay.io/buildah/stable:v1.29"
BUILDAH_COMMAND: "buildah --storage-driver overlay2"

.kubernetes-env: &kubernetes-env
image: $CI_IMAGE
Expand Down Expand Up @@ -94,7 +96,7 @@ build:
script:
- test "$Docker_Hub_User_Parity" -a "$Docker_Hub_Pass_Parity" ||
( echo "no docker credentials provided"; exit 1 )
- buildah bud
- $BUILDAH_COMMAND build
--format=docker
--build-arg VCS_REF="${CI_COMMIT_SHA}"
--build-arg BUILD_DATE="$(date -u '+%Y-%m-%dT%H:%M:%SZ')"
Expand All @@ -104,10 +106,10 @@ build:
--file "$DOCKERFILE" .
- echo "$Docker_Hub_Pass_Parity" |
buildah login --username "$Docker_Hub_User_Parity" --password-stdin docker.io
- buildah info
- $BUILDAH_COMMAND info
- echo "Effective tags = ${VERSION} latest"
- buildah push --format=v2s2 "$IMAGE_NAME:$VERSION"
- buildah push --format=v2s2 "$IMAGE_NAME:latest"
- $BUILDAH_COMMAND push --format=v2s2 "$IMAGE_NAME:$VERSION"
- $BUILDAH_COMMAND push --format=v2s2 "$IMAGE_NAME:latest"
after_script:
- buildah logout --all

Expand All @@ -117,9 +119,9 @@ publish-test:
<<: *test-refs
<<: *kubernetes-env
variables:
CI_IMAGE: quay.io/buildah/stable
CI_IMAGE: $BUILDAH_IMAGE
script:
- buildah bud
- $BUILDAH_COMMAND build
--format=docker
--build-arg VCS_REF="${CI_COMMIT_SHA}"
--build-arg BUILD_DATE="$(date -u '+%Y-%m-%dT%H:%M:%SZ')"
Expand All @@ -130,7 +132,7 @@ publish-test:
publish-docker-pr:
stage: publish
variables:
CI_IMAGE: quay.io/buildah/stable
CI_IMAGE: $BUILDAH_IMAGE
DOCKERHUB_REPO: paritypr
before_script:
- export VERSION=${CI_COMMIT_SHORT_SHA}
Expand All @@ -143,7 +145,7 @@ publish-docker-pr:
publish-docker:
stage: publish
variables:
CI_IMAGE: quay.io/buildah/stable
CI_IMAGE: $BUILDAH_IMAGE
before_script:
- if [[ "${CI_COMMIT_TAG}" ]]; then
VERSION=${CI_COMMIT_TAG};
Expand Down

0 comments on commit fc5e3b3

Please sign in to comment.