forked from kgateway-dev/kgateway
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathpublish-artifacts.yaml
117 lines (105 loc) · 2.89 KB
/
publish-artifacts.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
steps:
- name: 'gcr.io/$PROJECT_ID/prepare-go-workspace:0.11.2'
id: 'prepare-workspace'
args:
- '--repo-name'
- '$REPO_NAME'
- '--repo-sha'
- '$COMMIT_SHA'
- '--repo-output-dir'
- '.'
env:
- 'GIT_SSH_CONFIG=FALSE'
- name: 'gcr.io/cloud-builders/gsutil'
id: 'untar-mod-cache'
dir: &dir /workspace/gloo
entrypoint: 'bash'
args:
- '-c'
- |
mkdir -p /go/pkg
cd /go/pkg
gsutil cat gs://$PROJECT_ID-cache/gloo/gloo-mod.tar.gz | tar -xzf - || echo "untar mod cache failed; continuing because we can download deps as we need them"
- name: 'gcr.io/cloud-builders/docker'
id: 'docker-login'
entrypoint: 'bash'
args:
- '-c'
- |
docker login quay.io --username "solo-io+solobot" --password $$QUAY_IO_PASSWORD
secretEnv:
- 'QUAY_IO_PASSWORD'
waitFor:
- 'prepare-workspace'
- name: 'gcr.io/cloud-builders/gcloud'
id: 'prepare-gcr-zone'
args:
- 'config'
- 'set'
- 'compute/zone'
- 'us-central1-a'
# Run make targets to push docker images to quay.io
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.11.2'
id: 'publish-docker'
args:
- 'publish-docker'
dir: *dir
secretEnv:
- 'GITHUB_TOKEN'
waitFor:
- 'docker-login'
# Publish helm chart, compile manifests, produce release artifacts, deploy docs
# isolating this portion of the release in order to force the manifest to be regenerated with the tagged version
- name: 'gcr.io/cloud-builders/gcloud'
id: 'gcr-auth'
dir: *dir
args:
- 'auth'
- 'configure-docker'
waitFor:
- 'publish-docker'
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.11.2'
id: 'release-chart'
dir: *dir
args:
- 'publish-helm-chart'
- 'publish-glooctl'
env:
- 'HELM_REPOSITORY_CACHE=/builder/home/.cache/helm/registry'
- 'GCLOUD_PROJECT_ID=$PROJECT_ID'
secretEnv:
- 'GITHUB_TOKEN'
waitFor:
- 'gcr-auth'
# Run make targets to retag and push docker images to GCR
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.11.2'
id: 'docker-push-extended-gcr'
dir: *dir
args:
- 'publish-docker-retag'
env:
- 'ORIGINAL_IMAGE_REGISTRY=quay.io/solo-io'
- 'IMAGE_REGISTRY=gcr.io/gloo-edge'
secretEnv:
- 'GITHUB_TOKEN'
waitFor:
- 'gcr-auth'
- 'prepare-gcr-zone'
- 'publish-docker'
secrets:
- kmsKeyName: 'projects/solo-public/locations/global/keyRings/build/cryptoKeys/build-key'
secretEnv:
GITHUB_TOKEN: 'CiQABlzmSYYiveU0gTxGH2139eaBUedjV3vNCxQmJU+nRPlfQ/YSUQCCPGSGzbGp49fwDYuefAx9V94b8mivdp9AqB7zQAa07VtGJmrGdg9ZuhKGFrrgqxwABE0LLVNHyngCSHYSYMH8Vn/mRtT7wQuEHBlKVGtqPw=='
QUAY_IO_PASSWORD: 'CiQABlzmSRx5TcOqbldXa/d/+bkmAfpNAWa3PTS06WvuloZL+vASaQCCPGSGCogonVZVEUNx4G3YJtWi18gSuNx4PvLe08q8xAflTMFkjsyQirAOK3Y2oCvgYwiw/ITcuydjkpMjxDygFyENXS9FKFJoAXHlPQE5qidKr8xxmxF5ezhmjGB0gjyjXIIkbSEnBg=='
timeout: '3600s'
tags:
- 'gloo'
options:
machineType: 'N1_HIGHCPU_32'
env:
- 'DOCKER_CONFIG=/workspace/docker-config'
- 'TAGGED_VERSION=$TAG_NAME'
- 'TEST_ASSET_ID=$_PR_NUM'
volumes:
- name: 'gopath'
path: '/go'