mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
CI: New stage "containers" to rebuild some containers
Rebuild rolling release containers when XEN_CI_REBUILD_CONTAINERS is set. This is to be use with a scheduled pipeline. Signed-off-by: Anthony PERARD <anthony.perard@vates.tech> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
This commit is contained in:
1 parent
a231538acd
commit
5cc971a4bf
2 files changed
+42
-3
No files matched your search
+13
-3
@@ -8,11 +8,21 @@ workflow:
|
|||||||
- when: always
|
- when: always
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
|
- containers
|
||||||
- analyze
|
- analyze
|
||||||
- build
|
- build
|
||||||
- test
|
- test
|
||||||
|
|
||||||
include:
|
include:
|
||||||
- 'automation/gitlab-ci/analyze.yaml'
|
- local: 'automation/gitlab-ci/containers.yaml'
|
||||||
- 'automation/gitlab-ci/build.yaml'
|
rules:
|
||||||
- 'automation/gitlab-ci/test.yaml'
|
- if: $XEN_CI_REBUILD_CONTAINERS
|
||||||
|
- local: 'automation/gitlab-ci/analyze.yaml'
|
||||||
|
rules:
|
||||||
|
- if: $XEN_CI_REBUILD_CONTAINERS == null
|
||||||
|
- local: 'automation/gitlab-ci/build.yaml'
|
||||||
|
rules:
|
||||||
|
- if: $XEN_CI_REBUILD_CONTAINERS == null
|
||||||
|
- local: 'automation/gitlab-ci/test.yaml'
|
||||||
|
rules:
|
||||||
|
- if: $XEN_CI_REBUILD_CONTAINERS == null
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
.container-build-tmpl:
|
||||||
|
stage: containers
|
||||||
|
image: docker:stable
|
||||||
|
tags:
|
||||||
|
- container-builder
|
||||||
|
rules:
|
||||||
|
- if: $XEN_CI_REBUILD_CONTAINERS
|
||||||
|
services:
|
||||||
|
- docker:dind
|
||||||
|
before_script:
|
||||||
|
- apk add make
|
||||||
|
- docker info
|
||||||
|
- docker login -u $CI_DEPLOY_USER -p $CI_DEPLOY_PASSWORD $CI_REGISTRY
|
||||||
|
script:
|
||||||
|
- make -C automation/build PUSH=1 REGISTRY=${XEN_REGISTRY} ${CONTAINER/:/\/}
|
||||||
|
after_script:
|
||||||
|
- docker logout
|
||||||
|
|
||||||
|
container-archlinux-current:
|
||||||
|
extends:
|
||||||
|
- .container-build-tmpl
|
||||||
|
variables:
|
||||||
|
CONTAINER: "archlinux:current"
|
||||||
|
|
||||||
|
container-opensuse-tumbleweed-x86_64:
|
||||||
|
extends:
|
||||||
|
- .container-build-tmpl
|
||||||
|
variables:
|
||||||
|
CONTAINER: "opensuse:tumbleweed-x86_64"
|
||||||