aboutsummaryrefslogtreecommitdiff
path: root/.gitlab-ci.d
diff options
context:
space:
mode:
Diffstat (limited to '.gitlab-ci.d')
-rw-r--r--.gitlab-ci.d/container-template.yml21
-rw-r--r--.gitlab-ci.d/containers.yml23
2 files changed, 23 insertions, 21 deletions
diff --git a/.gitlab-ci.d/container-template.yml b/.gitlab-ci.d/container-template.yml
new file mode 100644
index 0000000000..1baecd9460
--- /dev/null
+++ b/.gitlab-ci.d/container-template.yml
@@ -0,0 +1,21 @@
+.container_job_template:
+ image: docker:stable
+ stage: containers
+ services:
+ - docker:dind
+ before_script:
+ - export TAG="$CI_REGISTRY_IMAGE/qemu/$NAME:latest"
+ - export COMMON_TAG="$CI_REGISTRY/qemu-project/qemu/$NAME:latest"
+ - apk add python3
+ - docker info
+ - docker login $CI_REGISTRY -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD"
+ script:
+ - echo "TAG:$TAG"
+ - echo "COMMON_TAG:$COMMON_TAG"
+ - ./tests/docker/docker.py --engine docker build
+ -t "qemu/$NAME" -f "tests/docker/dockerfiles/$NAME.docker"
+ -r $CI_REGISTRY/qemu-project/qemu
+ - docker tag "qemu/$NAME" "$TAG"
+ - docker push "$TAG"
+ after_script:
+ - docker logout
diff --git a/.gitlab-ci.d/containers.yml b/.gitlab-ci.d/containers.yml
index 7b7ca3790d..2b06763d73 100644
--- a/.gitlab-ci.d/containers.yml
+++ b/.gitlab-ci.d/containers.yml
@@ -1,24 +1,5 @@
-.container_job_template:
- image: docker:stable
- stage: containers
- services:
- - docker:dind
- before_script:
- - export TAG="$CI_REGISTRY_IMAGE/qemu/$NAME:latest"
- - export COMMON_TAG="$CI_REGISTRY/qemu-project/qemu/$NAME:latest"
- - apk add python3
- - docker info
- - docker login $CI_REGISTRY -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD"
- script:
- - echo "TAG:$TAG"
- - echo "COMMON_TAG:$COMMON_TAG"
- - ./tests/docker/docker.py --engine docker build
- -t "qemu/$NAME" -f "tests/docker/dockerfiles/$NAME.docker"
- -r $CI_REGISTRY/qemu-project/qemu
- - docker tag "qemu/$NAME" "$TAG"
- - docker push "$TAG"
- after_script:
- - docker logout
+include:
+ - local: '/.gitlab-ci.d/container-template.yml'
amd64-alpine-container:
extends: .container_job_template