mirror of
https://gitee.com/rancher/rancher.git
synced 2025-12-06 07:49:17 +08:00
Removing all Windows 20H2 support since it is EOL August 9th.
This commit is contained in:
174
.drone.yml
174
.drone.yml
@@ -883,125 +883,6 @@ trigger:
|
||||
exclude:
|
||||
- promote
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: default-windows-20H2
|
||||
|
||||
platform:
|
||||
os: windows
|
||||
arch: amd64
|
||||
version: 20H2
|
||||
|
||||
# remove this and use upstream images when https://github.com/drone/drone-git/pull/25 is merged
|
||||
clone:
|
||||
disable: true
|
||||
|
||||
steps:
|
||||
- name: clone
|
||||
image: rancher/drone-images:git-20H2
|
||||
settings:
|
||||
depth: 20
|
||||
- name: build
|
||||
pull: always
|
||||
image: rancher/dapper:v0.5.8
|
||||
commands:
|
||||
- dapper.exe -f Dockerfile-windows-20h2.dapper -d ci
|
||||
volumes:
|
||||
- name: docker_pipe
|
||||
path: \\\\.\\pipe\\docker_engine
|
||||
when:
|
||||
event:
|
||||
- push
|
||||
- pull_request
|
||||
- tag
|
||||
|
||||
- name: stage-binaries
|
||||
image: rancher/dapper:v0.5.8
|
||||
commands:
|
||||
- "cp -r ./bin/* ./package/windows/"
|
||||
when:
|
||||
event:
|
||||
- push
|
||||
- tag
|
||||
|
||||
- name: docker-publish-head-agent
|
||||
image: rancher/drone-images:docker-20H2
|
||||
settings:
|
||||
purge: false
|
||||
build_args:
|
||||
- SERVERCORE_VERSION=20H2
|
||||
- ARCH=amd64
|
||||
- VERSION=${DRONE_BRANCH/release\//}-${DRONE_COMMIT}-head
|
||||
context: package/windows
|
||||
custom_dns: 1.1.1.1
|
||||
dockerfile: package/windows/Dockerfile.agent
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: rancher/rancher-agent
|
||||
tag: ${DRONE_BRANCH/release\//}-${DRONE_COMMIT}-windows-20H2
|
||||
username:
|
||||
from_secret: docker_username
|
||||
volumes:
|
||||
- name: docker_pipe
|
||||
path: \\\\.\\pipe\\docker_engine
|
||||
when:
|
||||
ref:
|
||||
include:
|
||||
- "refs/heads/master"
|
||||
- "refs/heads/release/v*"
|
||||
event:
|
||||
- push
|
||||
|
||||
- name: docker-publish-agent
|
||||
image: rancher/drone-images:docker-20H2
|
||||
settings:
|
||||
purge: false
|
||||
build_args:
|
||||
- SERVERCORE_VERSION=20H2
|
||||
- ARCH=amd64
|
||||
- "VERSION=${DRONE_TAG}"
|
||||
context: package/windows
|
||||
custom_dns: 1.1.1.1
|
||||
dockerfile: package/windows/Dockerfile.agent
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: rancher/rancher-agent
|
||||
tag: "${DRONE_TAG}-windows-20H2"
|
||||
username:
|
||||
from_secret: docker_username
|
||||
volumes:
|
||||
- name: docker_pipe
|
||||
path: \\\\.\\pipe\\docker_engine
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
|
||||
- name: slack_notify
|
||||
image: plugins/slack
|
||||
settings:
|
||||
template: "Build {{build.link}} failed to publish an image/artifact.\n"
|
||||
username: Drone_Publish
|
||||
webhook:
|
||||
from_secret: slack_webhook
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- pull_request
|
||||
instance:
|
||||
- drone-publish.rancher.io
|
||||
status:
|
||||
- failure
|
||||
|
||||
volumes:
|
||||
- name: docker_pipe
|
||||
host:
|
||||
path: \\\\.\\pipe\\docker_engine
|
||||
|
||||
trigger:
|
||||
event:
|
||||
exclude:
|
||||
- promote
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: default-windows-ltsc2022
|
||||
@@ -1300,7 +1181,6 @@ depends_on:
|
||||
- default-linux-arm64
|
||||
- default-linux-s390x
|
||||
- default-windows-1809
|
||||
- default-windows-20H2
|
||||
- default-windows-ltsc2022
|
||||
---
|
||||
kind: pipeline
|
||||
@@ -1490,60 +1370,6 @@ depends_on:
|
||||
- default-linux-amd64
|
||||
- default-windows-1809
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: docker-image-digests-windows-20H2
|
||||
|
||||
platform:
|
||||
os: windows
|
||||
arch: amd64
|
||||
version: 20H2
|
||||
|
||||
# remove this and use upstream images when https://github.com/drone/drone-git/pull/25 is merged
|
||||
clone:
|
||||
disable: true
|
||||
|
||||
steps:
|
||||
- name: clone
|
||||
image: rancher/drone-images:git-20H2
|
||||
settings:
|
||||
depth: 1
|
||||
|
||||
- name: docker-image-digests
|
||||
image: rancher/drone-docker-image-digests:v0.0.12
|
||||
environment:
|
||||
PLUGIN_GITHUB_REPOSITORY: "rancher/rancher"
|
||||
PLUGIN_GITHUB_TOKEN:
|
||||
from_secret: github_token
|
||||
PLUGIN_GITHUB_TAG: "${DRONE_TAG}"
|
||||
PLUGIN_INPUT_FILE: "rancher-windows-images.txt"
|
||||
PLUGIN_OUTPUT_FILE: "rancher-images-digests-windows-20H2.txt"
|
||||
PLUGIN_REGISTRY: "docker.io"
|
||||
volumes:
|
||||
- name: docker_pipe
|
||||
path: \\\\.\\pipe\\docker_engine
|
||||
when:
|
||||
instance:
|
||||
include:
|
||||
- drone-publish.rancher.io
|
||||
event:
|
||||
- tag
|
||||
|
||||
volumes:
|
||||
- name: docker_pipe
|
||||
host:
|
||||
path: \\\\.\\pipe\\docker_engine
|
||||
|
||||
trigger:
|
||||
event:
|
||||
exclude:
|
||||
- promote
|
||||
- pull_request
|
||||
|
||||
depends_on:
|
||||
- default-linux-amd64
|
||||
- default-windows-20H2
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: docker-image-digests-windows-ltsc2022
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
FROM rancher/golang:1.17-windowsservercore-20H2
|
||||
SHELL ["powershell", "-NoLogo", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
|
||||
|
||||
ARG DAPPER_HOST_ARCH
|
||||
ENV HOST_ARCH=${DAPPER_HOST_ARCH} ARCH=${DAPPER_HOST_ARCH}
|
||||
|
||||
RUN pushd c:\; \
|
||||
$URL = 'https://github.com/StefanScherer/docker-cli-builder/releases/download/20.10.5/docker.exe'; \
|
||||
\
|
||||
Write-Host ('Downloading docker from {0} ...' -f $URL); \
|
||||
curl.exe -sfL $URL -o c:\Windows\docker.exe; \
|
||||
\
|
||||
Write-Host 'Complete.'; \
|
||||
popd;
|
||||
|
||||
RUN pushd c:\; \
|
||||
$URL = 'https://github.com/golangci/golangci-lint/releases/download/v1.44.0/golangci-lint-1.44.0-windows-amd64.zip'; \
|
||||
\
|
||||
Write-Host ('Downloading golangci from {0} ...' -f $URL); \
|
||||
curl.exe -sfL $URL -o c:\golangci-lint.zip; \
|
||||
\
|
||||
Write-Host 'Expanding ...'; \
|
||||
Expand-Archive -Path c:\golangci-lint.zip -DestinationPath c:\; \
|
||||
\
|
||||
Write-Host 'Cleaning ...'; \
|
||||
Remove-Item -Force -Recurse -Path c:\golangci-lint.zip; \
|
||||
\
|
||||
Write-Host 'Updating PATH ...'; \
|
||||
[Environment]::SetEnvironmentVariable('PATH', ('c:\golangci-lint-1.43.0-windows-amd64\;{0}' -f $env:PATH), [EnvironmentVariableTarget]::Machine); \
|
||||
\
|
||||
Write-Host 'Complete.'; \
|
||||
popd;
|
||||
|
||||
# upgrade git
|
||||
RUN pushd c:\; \
|
||||
$URL = 'https://github.com/git-for-windows/git/releases/download/v2.33.1.windows.1/MinGit-2.33.1-64-bit.zip'; \
|
||||
\
|
||||
Write-Host ('Downloading git from {0} ...' -f $URL); \
|
||||
curl.exe -sfL $URL -o c:\git.zip; \
|
||||
\
|
||||
Write-Host 'Expanding ...'; \
|
||||
Expand-Archive -Force -Path c:\git.zip -DestinationPath c:\git\.; \
|
||||
\
|
||||
Write-Host 'Cleaning ...'; \
|
||||
Remove-Item -Force -Recurse -Path c:\git.zip; \
|
||||
\
|
||||
Write-Host 'Complete.'; \
|
||||
popd;
|
||||
|
||||
ENV DAPPER_ENV REPO TAG DRONE_TAG FOSSA_API_KEY
|
||||
ENV DAPPER_SOURCE /gopath/src/github.com/rancher/rancher
|
||||
ENV DAPPER_OUTPUT ./bin
|
||||
ENV DAPPER_DOCKER_SOCKET true
|
||||
ENV HOME ${DAPPER_SOURCE}
|
||||
|
||||
WORKDIR ${DAPPER_SOURCE}
|
||||
ENTRYPOINT ["powershell", "-NoLogo", "-NonInteractive", "-File", "./scripts/windows/entry.ps1"]
|
||||
CMD ["ci"]
|
||||
@@ -16,12 +16,6 @@ manifests:
|
||||
architecture: amd64
|
||||
os: windows
|
||||
version: 1809
|
||||
-
|
||||
image: rancher/rancher-agent:{{#if build.tag}}{{build.tag}}{{else}}{{replace "release/" "" build.branch }}-{{build.commit}}{{/if}}-windows-20H2
|
||||
platform:
|
||||
architecture: amd64
|
||||
os: windows
|
||||
version: 20H2
|
||||
-
|
||||
image: rancher/rancher-agent:{{#if build.tag}}{{build.tag}}{{else}}{{replace "release/" "" build.branch }}-{{build.commit}}{{/if}}-windows-ltsc2022
|
||||
platform:
|
||||
|
||||
@@ -16,12 +16,6 @@ manifests:
|
||||
architecture: amd64
|
||||
os: windows
|
||||
version: 1809
|
||||
-
|
||||
image: rancher/rancher-agent:{{#if build.tag}}{{build.tag}}{{else}}{{replace "release/" "" build.branch }}-{{build.commit}}{{/if}}-windows-20H2
|
||||
platform:
|
||||
architecture: amd64
|
||||
os: windows
|
||||
version: 20H2
|
||||
-
|
||||
image: rancher/rancher-agent:{{#if build.tag}}{{build.tag}}{{else}}{{replace "release/" "" build.branch }}-{{build.commit}}{{/if}}-windows-ltsc2022
|
||||
platform:
|
||||
|
||||
@@ -365,7 +365,7 @@ usage () {
|
||||
echo " [-i|--images path] tar.gz generated by docker save."
|
||||
echo " [-r|--registry registry:port] target private registry:port."
|
||||
echo " [--windows-image-list path] text file with list of images used in Windows. Windows image mirroring is skipped when this is empty"
|
||||
echo " [--windows-versions version] Comma separated Windows versions. e.g., \"1809,2004,20H2\". (Default \"1809\")"
|
||||
echo " [--windows-versions version] Comma separated Windows versions. e.g., \"1809,ltsc2022\". (Default \"1809\")"
|
||||
echo " [-h|--help] Usage message"
|
||||
}
|
||||
|
||||
@@ -561,9 +561,6 @@ $script_name = $MyInvocation.InvocationName
|
||||
$image_list = "rancher-windows-images.txt"
|
||||
$images = "rancher-windows-images.tar.gz"
|
||||
$os_release_id = $(Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\' | Select-Object -ExpandProperty ReleaseId)
|
||||
if ($os_release_id -eq "2009") {
|
||||
$os_release_id = "20H2"
|
||||
}
|
||||
|
||||
$registry = $null
|
||||
$help = $false
|
||||
@@ -573,7 +570,7 @@ function usage {
|
||||
echo " [-l|--image-list path] text file with list of images; one image per line."
|
||||
echo " [-i|--images path] tar.gz generated by docker save."
|
||||
echo " [-r|--registry registry:port] target private registry:port."
|
||||
echo " [-o|--os-release-id (1809|2004|20H2|...)] release id of OS, gets detected automatically if not passed."
|
||||
echo " [-o|--os-release-id (1809|lstc2022|...)] release id of OS, gets detected automatically if not passed."
|
||||
echo " [-h|--help] Usage message."
|
||||
}
|
||||
|
||||
@@ -676,9 +673,6 @@ $script_name = $MyInvocation.InvocationName
|
||||
$image_list = "rancher-windows-images.txt"
|
||||
$images = "rancher-windows-images.tar.gz"
|
||||
$os_release_id = $(Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\' | Select-Object -ExpandProperty ReleaseId)
|
||||
if ($os_release_id -eq "2009") {
|
||||
$os_release_id = "20H2"
|
||||
}
|
||||
|
||||
$help = $false
|
||||
|
||||
@@ -686,7 +680,7 @@ function usage {
|
||||
echo "USAGE: $script_name [--image-list rancher-windows-images.txt] [--images rancher-windows-images.tar.gz]"
|
||||
echo " [-l|--image-list path] text file with list of images; one image per line."
|
||||
echo " [-i|--images path] tar.gz generated by docker save."
|
||||
echo " [-o|--os-release-id (1809|2004|20H2|...)] release id of OS, gets detected automatically if not passed."
|
||||
echo " [-o|--os-release-id (1809|ltsc2022|...)] release id of OS, gets detected automatically if not passed."
|
||||
echo " [-h|--help] Usage message."
|
||||
}
|
||||
|
||||
|
||||
@@ -33,9 +33,6 @@ $RELEASE_ID = $env:RELEASE_ID
|
||||
if (-not $RELEASE_ID) {
|
||||
$RELEASE_ID = $HOST_RELEASE_ID
|
||||
}
|
||||
if ($RELEASE_ID -eq "2009") {
|
||||
$RELEASE_ID = "20H2"
|
||||
}
|
||||
|
||||
$AGENT_IMAGE = ('{0}/rancher-agent:{1}-windows-{2}' -f $REPO, $TAG, $RELEASE_ID)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user