Skip to content

Commit 445a800

Browse files
committed
build: finish migration of nightly release to gcb
Delete the github workflow. The new gcb workflow is tested. Go Nightly v2023.12.2718 was released from GCB. Change-Id: Ief89f3f914832c300981fe666e5d1ef82ff41558 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/553015 Commit-Queue: Hyang-Ah Hana Kim <[email protected]> Reviewed-by: Suzy Mueller <[email protected]> TryBot-Result: kokoro <[email protected]>
1 parent bb6f0ea commit 445a800

File tree

2 files changed

+76
-111
lines changed

2 files changed

+76
-111
lines changed

.github/workflows/release-nightly.yml

Lines changed: 0 additions & 75 deletions
This file was deleted.

build/release-nightly.yaml

Lines changed: 76 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,84 @@
11
# This workflow will be triggered daily.
22
# For local testing, run:
3-
# gcloud builds submit --config release-nightly.yaml
3+
# gcloud builds submit --config release-nightly.yaml --no-source
44
# This will check out the vscode-go repo master branch and run the build from it.
55
steps:
66
# TODO: check build/test status
7-
- id: clone vscode-go repo
8-
name: "gcr.io/cloud-builders/git"
9-
args: ['clone', '--branch=master', "--depth=1", 'https://go.googlesource.com/vscode-go', 'vscode-go']
10-
- id: adjust file permissions
11-
name: "gcr.io/cloud-builders/docker"
12-
entrypoint: "chown"
13-
args: ["-R", "1000:1000", "/workspace", "/builder/home"] # ci-image sets USER to node whose uid/gid are 1000.
14-
dir: "/"
15-
- id: install npm dependencies
16-
name: "us-docker.pkg.dev/$PROJECT_ID/vscode-go-docker-repo/ci-image"
17-
entrypoint: npm
18-
args: ["ci"]
19-
dir: "vscode-go"
20-
- id: prepare nightly release
21-
name: "us-docker.pkg.dev/$PROJECT_ID/vscode-go-docker-repo/ci-image"
22-
entrypoint: "bash"
23-
args: ["build/all.bash", 'prepare_nightly']
24-
dir: "vscode-go"
25-
- id: build .vsix
26-
name: "us-docker.pkg.dev/$PROJECT_ID/vscode-go-docker-repo/ci-image"
27-
entrypoint: npm
28-
args: ["run", "package"] # we build vsix before running tests to avoid including unintentional changes.
29-
dir: "vscode-go"
30-
- id: run tests
31-
name: "us-docker.pkg.dev/$PROJECT_ID/vscode-go-docker-repo/ci-image"
32-
entrypoint: "bash"
33-
args: ["build/all.bash", "test_nightly"]
34-
dir: "vscode-go"
35-
env:
36-
- "IN_RELEASE_WORKFLOW=true"
7+
- name: gcr.io/cloud-builders/git
8+
args:
9+
- clone
10+
- '--branch=master'
11+
- '--depth=1'
12+
- 'https://go.googlesource.com/vscode-go'
13+
- vscode-go
14+
id: clone vscode-go repo
15+
- name: gcr.io/cloud-builders/docker
16+
args:
17+
- '-R'
18+
- '1000:1000'
19+
- /workspace
20+
- /builder/home
21+
dir: /
22+
id: adjust file permissions
23+
entrypoint: chown
24+
- name: us-docker.pkg.dev/$PROJECT_ID/vscode-go-docker-repo/ci-image
25+
args:
26+
- ci
27+
dir: vscode-go
28+
id: install npm dependencies
29+
entrypoint: npm
30+
- name: us-docker.pkg.dev/$PROJECT_ID/vscode-go-docker-repo/ci-image
31+
args:
32+
- build/all.bash
33+
- prepare_nightly
34+
dir: vscode-go
35+
id: prepare nightly release
36+
entrypoint: bash
37+
- name: us-docker.pkg.dev/$PROJECT_ID/vscode-go-docker-repo/ci-image
38+
args:
39+
- run
40+
- package
41+
dir: vscode-go
42+
id: build .vsix
43+
entrypoint: npm
44+
- name: ubuntu
45+
args:
46+
- '-c'
47+
- ls -1 go-nightly-*.vsix | tee /workspace/vsix_name.txt
48+
dir: vscode-go
49+
id: store the vsix file name
50+
entrypoint: bash
51+
- name: us-docker.pkg.dev/$PROJECT_ID/vscode-go-docker-repo/ci-image
52+
env:
53+
- IN_RELEASE_WORKFLOW=true
54+
args:
55+
- build/all.bash
56+
- test_nightly
57+
dir: vscode-go
58+
id: run tests
59+
entrypoint: bash
60+
- name: us-docker.pkg.dev/$PROJECT_ID/vscode-go-docker-repo/ci-image
61+
args:
62+
- '-c'
63+
- >
64+
npx vsce publish -i $(cat /workspace/vsix_name.txt) -p $$VSCE_TOKEN
65+
--baseContentUrl=https://github.com/golang/vscode-go
66+
--baseImagesUrl=https://github.com/golang/vscode-go
67+
dir: vscode-go
68+
id: publish nightly extension
69+
entrypoint: bash
70+
secretEnv:
71+
- VSCE_TOKEN
72+
timeout: 1800s
3773
options:
38-
substitution_option: "ALLOW_LOOSE"
39-
machineType: 'E2_HIGHCPU_8' # tests need powerful cpus to avoid timeout.
40-
images: ['us-docker.pkg.dev/$PROJECT_ID/vscode-go-docker-repo/ci-image:latest']
74+
machineType: E2_HIGHCPU_8
75+
substitutionOption: ALLOW_LOOSE
4176
artifacts:
4277
objects:
43-
location: "gs://$PROJECT_ID/nightly"
44-
paths: ["vscode-go/*.vsix"] # vsix file base name includes the extension version.
78+
location: 'gs://$PROJECT_ID/nightly'
79+
paths:
80+
- vscode-go/*.vsix
81+
availableSecrets:
82+
secretManager:
83+
- versionName: projects/$PROJECT_ID/secrets/$_VSCE_TOKEN/versions/latest
84+
env: VSCE_TOKEN

0 commit comments

Comments
 (0)