mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 21:01:02 +00:00
CI: buildah to build images (#2125)
* CI: buildah to build images * CI: secure login
This commit is contained in:
+17
-16
@@ -227,9 +227,7 @@ generate-impl-guide:
|
|||||||
|
|
||||||
publish-docker:
|
publish-docker:
|
||||||
<<: *publish-build
|
<<: *publish-build
|
||||||
image: docker:stable
|
image: quay.io/buildah/stable
|
||||||
services:
|
|
||||||
- docker:dind
|
|
||||||
<<: *collect-artifacts
|
<<: *collect-artifacts
|
||||||
# Don't run on releases - this is handled by the Github Action here:
|
# Don't run on releases - this is handled by the Github Action here:
|
||||||
# .github/workflows/publish-docker-release.yml
|
# .github/workflows/publish-docker-release.yml
|
||||||
@@ -238,26 +236,29 @@ publish-docker:
|
|||||||
- if: $CI_PIPELINE_SOURCE == "schedule"
|
- if: $CI_PIPELINE_SOURCE == "schedule"
|
||||||
- if: $CI_COMMIT_REF_NAME == "master"
|
- if: $CI_COMMIT_REF_NAME == "master"
|
||||||
variables:
|
variables:
|
||||||
DOCKER_HOST: tcp://localhost:2375
|
|
||||||
DOCKER_DRIVER: overlay2
|
|
||||||
GIT_STRATEGY: none
|
GIT_STRATEGY: none
|
||||||
# DOCKERFILE: scripts/docker/Dockerfile
|
# DOCKERFILE: scripts/docker/Dockerfile
|
||||||
CONTAINER_IMAGE: parity/polkadot
|
IMAGE_NAME: docker.io/parity/polkadot
|
||||||
script:
|
script:
|
||||||
- test "$Docker_Hub_User_Parity" -a "$Docker_Hub_Pass_Parity"
|
- test "$Docker_Hub_User_Parity" -a "$Docker_Hub_Pass_Parity" ||
|
||||||
|| ( echo "no docker credentials provided"; exit 1 )
|
( echo "no docker credentials provided"; exit 1 )
|
||||||
- docker login -u "$Docker_Hub_User_Parity" -p "$Docker_Hub_Pass_Parity"
|
|
||||||
- docker info
|
|
||||||
- cd ./artifacts
|
- cd ./artifacts
|
||||||
- docker build
|
- buildah bud
|
||||||
|
--squash
|
||||||
|
--format=docker
|
||||||
--build-arg VCS_REF="${CI_COMMIT_SHA}"
|
--build-arg VCS_REF="${CI_COMMIT_SHA}"
|
||||||
--build-arg BUILD_DATE="$(date -u '+%Y-%m-%dT%H:%M:%SZ')"
|
--build-arg BUILD_DATE="$(date -u '+%Y-%m-%dT%H:%M:%SZ')"
|
||||||
--tag $CONTAINER_IMAGE:$VERSION
|
--tag "$IMAGE_NAME:$VERSION"
|
||||||
--tag $CONTAINER_IMAGE:$EXTRATAG .
|
--tag "$IMAGE_NAME:$EXTRATAG" .
|
||||||
- docker push $CONTAINER_IMAGE:$VERSION
|
- echo "$Docker_Hub_Pass_Parity" |
|
||||||
- docker push $CONTAINER_IMAGE:$EXTRATAG
|
buildah login --username "$Docker_Hub_User_Parity" --password-stdin docker.io
|
||||||
|
- buildah info
|
||||||
|
- buildah push
|
||||||
|
--format=v2s2
|
||||||
|
"$IMAGE_NAME:$VERSION"
|
||||||
|
"$IMAGE_NAME:$EXTRATAG"
|
||||||
after_script:
|
after_script:
|
||||||
- docker logout
|
- buildah logout "$IMAGE_NAME"
|
||||||
# only VERSION information is needed for the deployment
|
# only VERSION information is needed for the deployment
|
||||||
- find ./artifacts/ -depth -not -name VERSION -not -name artifacts -delete
|
- find ./artifacts/ -depth -not -name VERSION -not -name artifacts -delete
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user