Skip to content

Commit

Permalink
.gitlab-ci.yml: docker: jobs better naming
Browse files Browse the repository at this point in the history
  • Loading branch information
alesmrazek committed Nov 18, 2024
1 parent 5706e44 commit 71b9ddb
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,16 +201,18 @@ build:macOS:
<<: *nodep
image: docker:latest
variables:
DOCKER_HUB_REGISTRY: "knotcznic/knot-resolver-testing"
DOCKER_HUB_REGISTRY: "cznic/knot-resolver"
GITLAB_REGISTRY: "${CI_REGISTRY}/knot/knot-resolver/cross-platform"
tags:
- amd64
- dind

docker:build:native:
docker:build:
<<: *docker
<<: *multi_platform
stage: build
except:
- tags
script:
- docker buildx build --no-cache -t knot-resolver:${PLATFORM} .
after_script:
Expand All @@ -220,12 +222,12 @@ docker:build:native:
- ${PLATFORM}
- dind

docker:build:
docker:build:cross-platform:
<<: *docker
stage: build
# only:
# - tags
# - master@knot/knot-resolver
only:
- tags
- master@knot/knot-resolver
before_script:
- >
docker buildx create
Expand All @@ -234,7 +236,7 @@ docker:build:
--bootstrap --use
- echo "$CI_REGISTRY_PASSWORD" | docker login $CI_REGISTRY -u $CI_REGISTRY_USER --password-stdin
script:
- >
- >
docker buildx build
--no-cache
--platform linux/amd64,linux/arm64/v8,linux/arm/v7
Expand All @@ -244,11 +246,15 @@ docker:build:
--tag ${GITLAB_REGISTRY}:${CI_COMMIT_REF_NAME}
.
docker:test:
docker:test:cross-platform:
<<: *docker
<<: *multi_platform
# needs:
# - docker:build
stage: test
only:
- tags
- master@knot/knot-resolver
needs:
- docker:build:cross-platform
image:
name: ${GITLAB_REGISTRY}:${CI_COMMIT_REF_NAME}
entrypoint: [""]
Expand Down Expand Up @@ -279,15 +285,14 @@ docker:test:
- docker
- ${PLATFORM}


docker:deploy:
dockerhub:deploy:
<<: *docker
stage: deploy
when: manual
only:
- tags
needs:
- docker:test
- docker:test:cross-platform
before_script:
- echo "$DOCKER_HUB_TOKEN" | docker login -u $DOCKER_HUB_USER --password-stdin
script:
Expand Down

0 comments on commit 71b9ddb

Please sign in to comment.