Skip to content

Commit

Permalink
.gitlab-ci.yml: added docker image test
Browse files Browse the repository at this point in the history
  • Loading branch information
alesmrazek committed Nov 14, 2024
1 parent 0ccd687 commit 3d13105
Showing 1 changed file with 43 additions and 4 deletions.
47 changes: 43 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,9 @@ docker:build:native:
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 @@ -243,6 +243,45 @@ docker:build:cross-platform:
--push
--tag ${GITLAB_REGISTRY}:${CI_COMMIT_REF_NAME}
.
docker:test:
<<: *docker
<<: *multi_platform
# needs:
# - docker:build:cross-platform
image:
name: ${GITLAB_REGISTRY}:${CI_COMMIT_REF_NAME}
entrypoint: [""]
before_script:
- apt-get update
- apt-get -y install knot-dnsutils
script:
- /usr/bin/knot-resolver -c /etc/knot-resolver/config.yaml &
- jobs
- kdig nic.cz AAAA @localhost#53
- kresctl config get
- jobs
tags:
- docker
- ${PLATFORM}

# docker:test:
# <<: *docker
# <<: *multi_platform
# image: debian:12-slim
# # needs:
# # - docker:build:cross-platform
# services:
# - name: ${GITLAB_REGISTRY}:${CI_COMMIT_REF_NAME}
# alias: knot-resolver
# before_script:
# - apt-get update
# - apt-get -y install knot-dnsutils curl
# script:
# - ls /sys/class/net
# - cat /etc/hosts
# - curl http://knot-resolver:5000/schema
# - kdig nic.cz AAAA @knot-resolver#53

docker:deploy:
<<: *docker
Expand All @@ -251,7 +290,7 @@ docker:deploy:
only:
- tags
needs:
- docker:build:cross-platform
- docker:test
before_script:
- echo "$DOCKER_HUB_TOKEN" | docker login -u $DOCKER_HUB_USER --password-stdin
script:
Expand Down

0 comments on commit 3d13105

Please sign in to comment.