mirror of
https://gitlab.archlinux.org/archlinux/archlinux-docker.git
synced 2025-08-07 14:47:14 +02:00
Merge branch 'replacePublishWithKaniko' into 'master'
Replace publish with multi-destination kaniko See merge request archlinux/archlinux-docker!46
This commit is contained in:
commit
b5a8800a6f
@ -114,6 +114,7 @@ image:build:secure:
|
|||||||
before_script:
|
before_script:
|
||||||
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$GITLAB_PROJECT_USER\",\"password\":\"$GITLAB_PROJECT_TOKEN\"}}}" > /kaniko/.docker/config.json
|
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$GITLAB_PROJECT_USER\",\"password\":\"$GITLAB_PROJECT_TOKEN\"}}}" > /kaniko/.docker/config.json
|
||||||
|
|
||||||
|
# Build and publish to the Arch Linux group namespace: https://hub.docker.com/r/archlinux/archlinux
|
||||||
image:publish:secure:
|
image:publish:secure:
|
||||||
extends: .image
|
extends: .image
|
||||||
retry: 2
|
retry: 2
|
||||||
@ -127,11 +128,17 @@ image:publish:secure:
|
|||||||
before_script:
|
before_script:
|
||||||
- echo "{\"auths\":{\"https://index.docker.io/v1/\":{\"username\":\"$DOCKERHUB_USERNAME\",\"password\":\"$DOCKERHUB_ACCESS_TOKEN\"}}}" > /kaniko/.docker/config.json
|
- echo "{\"auths\":{\"https://index.docker.io/v1/\":{\"username\":\"$DOCKERHUB_USERNAME\",\"password\":\"$DOCKERHUB_ACCESS_TOKEN\"}}}" > /kaniko/.docker/config.json
|
||||||
script:
|
script:
|
||||||
|
- LATEST=""
|
||||||
|
- if [[ "$GROUP" == "base" ]]; then
|
||||||
|
LATEST="--destination archlinux/archlinux:latest"
|
||||||
|
fi
|
||||||
- /kaniko/executor
|
- /kaniko/executor
|
||||||
--whitelist-var-run="false"
|
--whitelist-var-run="false"
|
||||||
--context $CI_PROJECT_DIR
|
--context $CI_PROJECT_DIR
|
||||||
--dockerfile $CI_PROJECT_DIR/Dockerfile.$GROUP
|
--dockerfile $CI_PROJECT_DIR/Dockerfile.$GROUP
|
||||||
|
--destination archlinux/archlinux:$GROUP
|
||||||
--destination archlinux/archlinux:$GROUP-$BUILD_VERSION
|
--destination archlinux/archlinux:$GROUP-$BUILD_VERSION
|
||||||
|
$LATEST
|
||||||
|
|
||||||
.test:
|
.test:
|
||||||
stage: test
|
stage: test
|
||||||
@ -236,28 +243,8 @@ release:
|
|||||||
reports:
|
reports:
|
||||||
dotenv: build.env
|
dotenv: build.env
|
||||||
|
|
||||||
# Publish base to the Arch Linux group namespace: https://hub.docker.com/r/archlinux/archlinux
|
|
||||||
publish:
|
|
||||||
stage: publish
|
|
||||||
retry: 2
|
|
||||||
tags:
|
|
||||||
- secure
|
|
||||||
image:
|
|
||||||
name: gcr.io/go-containerregistry/crane:debug
|
|
||||||
entrypoint: [""]
|
|
||||||
variables:
|
|
||||||
GIT_STRATEGY: none
|
|
||||||
only:
|
|
||||||
- tags
|
|
||||||
before_script:
|
|
||||||
- echo $DOCKERHUB_ACCESS_TOKEN | crane auth login -u $DOCKERHUB_USERNAME --password-stdin index.docker.io
|
|
||||||
script:
|
|
||||||
- crane tag archlinux/archlinux:base-$BUILD_VERSION base
|
|
||||||
- crane tag archlinux/archlinux:base-$BUILD_VERSION latest
|
|
||||||
- crane tag archlinux/archlinux:base-devel-$BUILD_VERSION base-devel
|
|
||||||
|
|
||||||
# Publish to the official Docker namespace: https://hub.docker.com/_/archlinux
|
# Publish to the official Docker namespace: https://hub.docker.com/_/archlinux
|
||||||
publish:official:
|
publish:
|
||||||
stage: publish
|
stage: publish
|
||||||
only:
|
only:
|
||||||
refs:
|
refs:
|
||||||
|
Loading…
Reference in New Issue
Block a user