Revert "docker/windows: build rust image in the ci"

This reverts commit 5c536f2601
This commit is contained in:
Jordan Petridіs 2021-09-08 06:54:15 +00:00
parent 3cfedc8a9a
commit 3f17e16c72
4 changed files with 24 additions and 54 deletions

View file

@ -1,7 +1,7 @@
$env:ErrorActionPreference='Stop'
$env:DEFAULT_BRANCH='master'
$env:VERSION='test'
$env:VERSION='v18'
$env:tag ="registry.freedesktop.org/gstreamer/gst-ci/amd64/windows:$env:VERSION-$env:DEFAULT_BRANCH"
$env:rust_tag ="registry.freedesktop.org/gstreamer/gst-ci/amd64/windows-rust:$env:VERSION-$env:DEFAULT_BRANCH"
@ -23,5 +23,22 @@ if (!$?) {
Exit 1
}
# Get-Date
# Write-Output "Pushing $env:tag"
# docker push $env:tag
# if (!$?) {
# Write-Host "Failed to push docker image $env:tag"
# Exit 1
# }
# Get-Date
# Write-Output "Pushing $env:rust_tag"
# docker push $env:rust_tag
# if (!$?) {
# Write-Host "Failed to push docker image $env:rust_tag"
# Exit 1
# }
Get-Date
Write-Output "Build Finished"

View file

@ -13,6 +13,8 @@ $registry_user_image = $args[3]
$registry_central_image = $args[4]
$dockerfile = $args[5]
Set-Location -Path ".\docker\windows"
docker --config "windows-docker.conf" login -u "$registry_username" -p "$registry_password" "$registry_uri"
if (!$?) {
Write-Host "docker login failed to $registry_uri"
@ -43,7 +45,7 @@ if ($?) {
}
Write-Host "No image found at $registry_user_image or $registry_central_image; rebuilding"
docker --config "windows-docker.conf" build $DOCKER_BUILD_ARGS --no-cache -t "$registry_user_image" -f "$dockerfile" "./docker/windows"
docker --config "windows-docker.conf" build --no-cache -t "$registry_user_image" -f "$dockerfile" .
if (!$?) {
Write-Host "Container build failed"
docker --config "windows-docker.conf" logout "$registry_uri"

View file

@ -1,9 +1,6 @@
# escape=`
# Expect this to be set when calling docker build with
# --build-arg BASE_IMAGE="" and make it fail if not set.
ARG BASE_IMAGE="inavlid.gstreamer.freedesktop.org/invalid"
FROM $BASE_IMAGE
FROM 'registry.freedesktop.org/gstreamer/gst-ci/amd64/windows:v16-master'
ARG DEFAULT_BRANCH="master"
ARG RUST_VERSION="1.52.1"

View file

@ -3,7 +3,6 @@ include:
stages:
- 'build docker'
- 'build docker stage 2'
- 'preparation'
- 'pre-build'
- 'build'
@ -39,7 +38,6 @@ variables:
TEST_MANIFEST_AMD64_SUFFIX: 'amd64/test-manifest'
INDENT_AMD64_SUFFIX: 'amd64/gst-indent'
WINDOWS_AMD64_SUFFIX: 'amd64/windows'
WINDOWS_RUST_AMD64_SUFFIX: 'amd64/windows-rust'
FEDORA_IMAGE: "$CI_REGISTRY_IMAGE/$FEDORA_AMD64_SUFFIX:$FEDORA_TAG-$GST_UPSTREAM_BRANCH"
FEDORA_DOCS_IMAGE: "registry.freedesktop.org/gstreamer/gst-ci/amd64/fedora:2020-07-03.0-master"
@ -50,8 +48,6 @@ variables:
INDENT_IMAGE: "$CI_REGISTRY_IMAGE/$INDENT_AMD64_SUFFIX:$INDENT_TAG-$GST_UPSTREAM_BRANCH"
WINDOWS_IMAGE: "$CI_REGISTRY_IMAGE/$WINDOWS_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH"
WINDOWS_UPSTREAM_IMAGE: "$CI_REGISTRY/$GST_UPSTREAM_REPO/$WINDOWS_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH"
WINDOWS_RUST_IMAGE: "$CI_REGISTRY_IMAGE/$WINDOWS_RUST_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH"
WINDOWS_RUST_UPSTREAM_IMAGE: "$CI_REGISTRY/$GST_UPSTREAM_REPO/$WINDOWS_RUST_AMD64_SUFFIX:$WINDOWS_TAG-$GST_UPSTREAM_BRANCH"
# Current windows image doesn't seem to be able to spawn procceses for reason,
# use a different image until this is debuged
@ -61,9 +57,7 @@ variables:
# Can't use $CI_* variables since we use this template in all repos, not just gst-ci
CERBERO_SCRIPT_URL: "https://gitlab.freedesktop.org/gstreamer/gst-ci/raw/${GST_UPSTREAM_BRANCH}/gitlab/cerbero_setup.sh"
# FIXME: fix the file path url to point to the upstram once merged
# WINDOWS_CONTAINER_SCRIPT_URL: "https://gitlab.freedesktop.org/gstreamer/gst-ci/raw/${GST_UPSTREAM_BRANCH}/docker/windows/container.ps1"
WINDOWS_CONTAINER_SCRIPT_URL: "https://gitlab.freedesktop.org/alatiera/gst-ci/raw/alatiera/windows-rs-wip/docker/windows/container.ps1"
WINDOWS_CONTAINER_SCRIPT_URL: "https://gitlab.freedesktop.org/gstreamer/gst-ci/raw/${GST_UPSTREAM_BRANCH}/docker/windows/container.ps1"
GIT_STRATEGY: none
MESON_BUILDTYPE_ARGS: --default-library=both
@ -355,15 +349,12 @@ windows amd64 docker:
#
# We also don't need a CONTEXT_DIR var as its also
# hardcoded to be docker/windows/
DOCKERFILE: "docker/windows/Dockerfile"
DOCKERFILE: "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")
- $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
@ -375,43 +366,6 @@ windows amd64 docker:
Exit 1
}
windows rust amd64 docker:
stage: 'build docker stage 2'
needs:
- job: 'windows amd64 docker'
artifacts: false
variables:
GIT_STRATEGY: 'fetch'
REPO_SUFFIX: "$WINDOWS_RUST_AMD64_SUFFIX"
TAG: "$WINDOWS_TAG-$GST_UPSTREAM_BRANCH"
# 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")
- $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 $WINDOWS_RUST_IMAGE $WINDOWS_RUST_UPSTREAM_IMAGE $DOCKERFILE"
- |
if (!($?)) {
echo "Failed to build the image"
Exit 1
}
#
# Job to create the manifest.xml to used for our builds
#