Skip to content

Commit 4741785

Browse files
authored
Merge pull request kubernetes#73650 from mtaufen/windows-upload-scripts
upload Windows startup scripts to GCS for CI
2 parents e476ab6 + 98edbf4 commit 4741785

File tree

9 files changed

+75
-0
lines changed

9 files changed

+75
-0
lines changed

build/root/BUILD.root

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ gcs_upload(
3838
":_binary-artifacts-and-hashes",
3939
"//build/release-tars:release-tars-and-hashes",
4040
"//cluster/gce/gci:gcs-release-artifacts-and-hashes",
41+
"//cluster/gce/windows:gcs-release-artifacts-and-hashes",
4142
],
4243
tags = ["manual"],
4344
# Use for_platforms to format the upload path based on the configured
@@ -53,6 +54,7 @@ gcs_upload(
5354
upload_paths = select(for_platforms(for_all = {
5455
"//build/release-tars:release-tars-and-hashes": "",
5556
"//cluster/gce/gci:gcs-release-artifacts-and-hashes": "extra/gce",
57+
"//cluster/gce/windows:gcs-release-artifacts-and-hashes": "extra/gce/windows",
5658
"//:_binary-artifacts-and-hashes": "bin/{OS}/{ARCH}",
5759
})),
5860
)

cluster/gce/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ filegroup(
1717
"//cluster/gce/addons:all-srcs",
1818
"//cluster/gce/gci:all-srcs",
1919
"//cluster/gce/manifests:all-srcs",
20+
"//cluster/gce/windows:all-srcs",
2021
],
2122
tags = ["automanaged"],
2223
)

cluster/gce/windows/BUILD

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
load("@io_k8s_repo_infra//defs:build.bzl", "release_filegroup")
2+
3+
# Having the Windows code from the GCE cluster deploy hosted with the release is
4+
# useful for GKE. This list should match the list in k8s.io/release/lib/releaselib.sh.
5+
6+
# IMPORTANT PLEASE NOTE:
7+
# Any time the file structure in the `windows` directory changes, `windows/BUILD`
8+
# and `k8s.io/release/lib/releaselib.sh` must be manually updated with the changes.
9+
# We HIGHLY recommend not changing the file structure, because consumers of
10+
# Kubernetes releases depend on the release structure remaining stable.
11+
release_filegroup(
12+
name = "gcs-release-artifacts",
13+
srcs = [
14+
"common.psm1",
15+
"configure.ps1",
16+
"k8s-node-setup.psm1",
17+
"testonly/install-ssh.psm1",
18+
"testonly/user-profile.psm1",
19+
],
20+
visibility = ["//visibility:public"],
21+
)
22+
23+
filegroup(
24+
name = "package-srcs",
25+
srcs = glob(["**"]),
26+
tags = ["automanaged"],
27+
visibility = ["//visibility:private"],
28+
)
29+
30+
filegroup(
31+
name = "all-srcs",
32+
srcs = [":package-srcs"],
33+
tags = ["automanaged"],
34+
visibility = ["//visibility:public"],
35+
)

cluster/gce/windows/README-GCE-Windows-kube-up.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Starting a Windows Kubernetes cluster on GCE using kube-up
22

3+
## IMPORTANT PLEASE NOTE!
4+
Any time the file structure in the `windows` directory changes, `windows/BUILD`
5+
and `k8s.io/release/lib/releaselib.sh` must be manually updated with the changes.
6+
We HIGHLY recommend not changing the file structure, because consumers of
7+
Kubernetes releases depend on the release structure remaining stable.
8+
39
## Bring up the cluster
410

511
Prerequisites: a Google Cloud Platform project.
@@ -185,3 +191,4 @@ These steps are based on
185191
user@kubernetes-minion-windows-group-mk0p:C:\\etc\\kubernetes\\logs \
186192
kubetest-logs/
187193
```
194+

cluster/gce/windows/common.psm1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@
1818
and scripts for configuring Windows nodes.
1919
#>
2020

21+
# IMPORTANT PLEASE NOTE:
22+
# Any time the file structure in the `windows` directory changes, `windows/BUILD`
23+
# and `k8s.io/release/lib/releaselib.sh` must be manually updated with the changes.
24+
# We HIGHLY recommend not changing the file structure, because consumers of
25+
# Kubernetes releases depend on the release structure remaining stable.
26+
2127
# Disable progress bar to increase download speed.
2228
$ProgressPreference = 'SilentlyContinue'
2329

cluster/gce/windows/configure.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@
1717
Top-level script that runs on Windows nodes to join them to the K8s cluster.
1818
#>
1919

20+
# IMPORTANT PLEASE NOTE:
21+
# Any time the file structure in the `windows` directory changes, `windows/BUILD`
22+
# and `k8s.io/release/lib/releaselib.sh` must be manually updated with the changes.
23+
# We HIGHLY recommend not changing the file structure, because consumers of
24+
# Kubernetes releases depend on the release structure remaining stable.
25+
2026
$ErrorActionPreference = 'Stop'
2127

2228
# Turn on tracing to debug

cluster/gce/windows/k8s-node-setup.psm1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@
3636
# Execute functions manually or run configure.ps1.
3737
#>
3838

39+
# IMPORTANT PLEASE NOTE:
40+
# Any time the file structure in the `windows` directory changes, `windows/BUILD`
41+
# and `k8s.io/release/lib/releaselib.sh` must be manually updated with the changes.
42+
# We HIGHLY recommend not changing the file structure, because consumers of
43+
# Kubernetes releases depend on the release structure remaining stable.
44+
3945
# TODO: update scripts for these style guidelines:
4046
# - Remove {} around variable references unless actually needed for clarity.
4147
# - Always use single-quoted strings unless actually interpolating variables

cluster/gce/windows/testonly/install-ssh.psm1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@
2222
clusters. DO NOT USE THIS MODULE FOR PRODUCTION.
2323
#>
2424

25+
# IMPORTANT PLEASE NOTE:
26+
# Any time the file structure in the `windows` directory changes, `windows/BUILD`
27+
# and `k8s.io/release/lib/releaselib.sh` must be manually updated with the changes.
28+
# We HIGHLY recommend not changing the file structure, because consumers of
29+
# Kubernetes releases depend on the release structure remaining stable.
30+
2531
Import-Module -Force C:\common.psm1
2632

2733
$OPENSSH_ROOT = 'C:\Program Files\OpenSSH'

cluster/gce/windows/testonly/user-profile.psm1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@
1919
powershellposse.com
2020
#>
2121

22+
# IMPORTANT PLEASE NOTE:
23+
# Any time the file structure in the `windows` directory changes, `windows/BUILD`
24+
# and `k8s.io/release/lib/releaselib.sh` must be manually updated with the changes.
25+
# We HIGHLY recommend not changing the file structure, because consumers of
26+
# Kubernetes releases depend on the release structure remaining stable.
27+
2228

2329
#Function to create the new local user first
2430
function New-LocalUser

0 commit comments

Comments
 (0)