forked from solo-io/wasm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudbuild.yaml
98 lines (87 loc) · 3.44 KB
/
cloudbuild.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
steps:
- name: gcr.io/cloud-builders/gcloud
args: ['container', 'clusters', 'get-credentials', 'wasme-ci-cluster-istio-1-5', '--zone', 'us-central1-a']
id: 'get-kubeconfig'
- name: gcr.io/cloud-builders/gsutil
entrypoint: 'bash'
args: ['-c', 'mkdir -p /go/pkg && cd /go/pkg && gsutil cat gs://$PROJECT_ID-cache/wasme/wasme-mod.tar.gz | tar -xzf -']
id: 'untar-mod-cache'
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.2.1'
args: ['install-deps']
env:
- 'TAGGED_VERSION=$TAG_NAME'
id: 'install dependencies'
# NOTE: Do not randomize the ginkgo specs.
# The `build` suite must run before the `operator` suite
- name: 'gcr.io/$PROJECT_ID/e2e-go-mod-ginkgo:wasme'
env:
- 'TAGGED_VERSION=$TAG_NAME'
- 'BUILD_ID=$BUILD_ID'
- 'IMAGE_REGISTRY=gcr.io/$PROJECT_ID'
- 'WASM_IMAGE_REGISTRY=yuval-test.solo.io'
- 'FILTER_IMAGE_TAG=yuval-test.solo.io/ilackarms/test-image:$BUILD_ID'
- 'IMAGE_PUSH=1'
- 'WASME_LOGIN_USERNAME=ilackarms'
- 'SKIP_PACKAGES=pkg/deploy/local' # this test runs in circleci
entrypoint: 'make'
args: ['run-tests']
secretEnv:
- 'GITHUB_TOKEN'
- 'WASME_LOGIN_PASSWORD'
id: 'run-tests'
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.2.1'
args: ['build-images']
env:
- 'TAGGED_VERSION=$TAG_NAME'
- 'BUILD_ID=$BUILD_ID'
secretEnv: ['GITHUB_TOKEN']
id: 'build-images'
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.2.1'
args: ['operator-gen', 'manifest-gen']
env:
- 'TAGGED_VERSION=$TAG_NAME'
- 'BUILD_ID=$BUILD_ID'
secretEnv: ['GITHUB_TOKEN']
id: 'build-operator'
- name: 'gcr.io/cloud-builders/docker'
entrypoint: 'bash'
env:
- 'DOCKER_CONFIG=/workspace/docker-config'
args: ['-c', 'docker login quay.io --username "solo-io+solobot" --password $$QUAY_IO_PASSWORD']
secretEnv: ['QUAY_IO_PASSWORD']
id: 'docker-login'
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.2.1'
args: ['publish-images', '-B']
env:
- 'DOCKER_CONFIG=/workspace/docker-config'
- 'TAGGED_VERSION=$TAG_NAME'
secretEnv: ['GITHUB_TOKEN']
id: 'publish-images'
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.2.1'
args: ['upload-github-release-assets', 'publish-docs', '-B']
env:
- 'GCLOUD_PROJECT_ID=$PROJECT_ID'
- 'TAGGED_VERSION=$TAG_NAME'
- 'PROJECT_ROOT=github.com/solo-io/wasme'
secretEnv: ['GITHUB_TOKEN']
id: 'upload-github-release-assets'
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==
# to create the WASME_PUSH_TOKEN:
# echo -n PASSSWORD | gcloud kms encrypt \
# --plaintext-file=- \
# --ciphertext-file=- \
# --location=global \
# --keyring=build \
# --key=build-key | base64
WASME_LOGIN_PASSWORD: CiQABlzmSY4tslkGgQoco9hESHjD2pcQi+G6OOMKFFwuebg88+MSNQCCPGSG96Vtu5qZOZ72j1fLaL/vKWvJAvPf89FZbw4OMbV0q+P5uXb6C0WFeQt0UUSKk2My
timeout: 1200s
tags: ['wasme']
options:
machineType: 'N1_HIGHCPU_32'
volumes:
- name: 'gopath'
path: '/go'