summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2022-01-04 15:14:51 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2022-01-21 21:16:45 +0400
commit98c903656d5755ba27eeb3f41640e92f232c77ae (patch)
tree858484e4c9e36f627d35efb6d789620017a7fa56 /.gitlab-ci.yml
parentf8067a07c372989acb260926706cb793aedfd276 (diff)
downloaddbus-98c903656d5755ba27eeb3f41640e92f232c77ae.tar.gz
gitlab-ci: build a Windows docker image, with VS15 & msys
Based on GStreamer & Mesa freedesktop gitlab CI, use the Windows 1809 runner provided by the GStreamer Foundation. https://www.freedesktop.org/wiki/Infrastructure/ Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml37
1 files changed, 37 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index bdd3e2e8..5b183890 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -23,6 +23,7 @@
image: debian:buster-slim
stages:
+ - 'build docker'
- build
variables:
@@ -32,6 +33,42 @@ variables:
ci_sudo: "yes"
ci_distro: "debian"
ci_suite: "buster"
+ ###
+ # IMPORTANT
+ # These are the version tags for the docker images the CI runs against.
+ # If you are hacking on them or need a them to rebuild, its enough
+ # to change any part of the string of the image you want.
+ ###
+ WINDOWS_TAG: "2022-01-07.1"
+
+ UPSTREAM_BRANCH: 'master'
+ UPSTREAM_REPO: 'dbus/dbus'
+ WINDOWS_AMD64_SUFFIX: 'amd64/windows'
+ WINDOWS_IMAGE: "$CI_REGISTRY_IMAGE/$WINDOWS_AMD64_SUFFIX:$WINDOWS_TAG-$UPSTREAM_BRANCH"
+ WINDOWS_UPSTREAM_IMAGE: "$CI_REGISTRY/$UPSTREAM_REPO/$WINDOWS_AMD64_SUFFIX:$WINDOWS_TAG-$UPSTREAM_BRANCH"
+
+
+windows amd64 docker:
+ stage: "build docker"
+ variables:
+ # this file needs to be relative to docker/windows/ subdir
+ # as it makes life easier in the powershell script
+ DOCKERFILE: "tools/docker/windows/Dockerfile"
+ timeout: 2h 30m
+ tags:
+ - windows
+ - shell
+ - "1809"
+ script:
+ # We need to pass an array and to resolve the env vars, so we can't use a variable:
+ - $DOCKER_BUILD_ARGS = @("--build-arg", "DEFAULT_BRANCH=$UPSTREAM_BRANCH")
+
+ - "& tools/docker/windows/container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $WINDOWS_IMAGE $WINDOWS_UPSTREAM_IMAGE $DOCKERFILE"
+ - |
+ if (!($?)) {
+ echo "Failed to build the image"
+ Exit 1
+ }
.debian-build:
stage: build