-.windows rust docker build:
- stage: 'build docker'
- needs:
- - job: 'windows amd64 docker'
- artifacts: false
- rules:
- - if: '$CI_PROJECT_NAME == "gst-ci"'
- variables:
- # Unlike the buildah/linux jobs, this file
- # needs to be relative to docker/windows/ subdir
- # as it makes life easier in the powershell script
- #
- # We also don't need a CONTEXT_DIR var as its also
- # hardcoded to be docker/windows/
- DOCKERFILE: 'docker/windows/rust.Dockerfile'
- 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=$GST_UPSTREAM_BRANCH", "--build-arg", "BASE_IMAGE=$WINDOWS_IMAGE", "--build-arg", "RUST_VERSION=$RUST_VERSION")
-
- - $env:WINDOWS_CONTAINER_SCRIPT_PATH = "$env:CI_PROJECT_DIR\container.ps1"
- - echo "Fetching $env:WINDOWS_CONTAINER_SCRIPT_URL"
- - Invoke-WebRequest -Uri $env:WINDOWS_CONTAINER_SCRIPT_URL -OutFile $env:WINDOWS_CONTAINER_SCRIPT_PATH
-
- - "& $env:WINDOWS_CONTAINER_SCRIPT_PATH $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $RUST_IMAGE $RUST_UPSTREAM_IMAGE $DOCKERFILE"
- - |
- if (!($?)) {
- echo "Failed to build the image"
- Exit 1
- }
-
-windows rust amd64 docker latest stable:
- extends: '.windows rust docker build'
- variables:
- RUST_IMAGE: !reference [variables, "WINDOWS_RUST_LATEST_IMAGE"]
- RUST_UPSTREAM_IMAGE: !reference [variables, "WINDOWS_RUST_LATEST_UPSTREAM_IMAGE"]
- RUST_VERSION: !reference [variables, "RUST_LATEST_VERSION"]
-
-windows rust amd64 docker minimum supported version:
- extends: '.windows rust docker build'
- variables:
- RUST_IMAGE: !reference [variables, "WINDOWS_RUST_MINIMUM_IMAGE"]
- RUST_UPSTREAM_IMAGE: !reference [variables, "WINDOWS_RUST_MINIMUM_UPSTREAM_IMAGE"]
- RUST_VERSION: !reference [variables, "RUST_MINIMUM_VERSION"]
-
-