-
Notifications
You must be signed in to change notification settings - Fork 86
70 lines (64 loc) · 2.5 KB
/
Copy pathcloudbuild.yaml
File metadata and controls
70 lines (64 loc) · 2.5 KB
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
# Copyright © 2025 Cask Data, Inc.
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
steps:
- name: 'gcr.io/cloud-builders/mvn:3.8-jdk-8'
id: maven-package
entrypoint: 'mvn'
args:
- clean
- -B
- -V
- -DskipTests
- deploy
- -P
- common-artifacts
- oss-exit-gate
- -Dmaven.wagon.http.retryHandler.count=5
- -Dmaven.wagon.httpconnectionManager.ttlSeconds=30
- name: 'bash'
id: create-exit-gate-manifest
entrypoint: 'bash'
args:
- '-c'
- |
set -e
MANIFEST_FILE="/workspace/exit_gate_manifest.textproto"
echo '# -*- protobuffer -*-' > "$${MANIFEST_FILE}"
echo '# proto-file: security/opensource/exit_gate_v1/onboarded/proto/publishing_manifest.proto' >> "$${MANIFEST_FILE}"
echo '# proto-message: PublishingManifest' >> "$${MANIFEST_FILE}"
echo '' >> "$${MANIFEST_FILE}"
echo 'publish_all: true' >> "$${MANIFEST_FILE}"
echo "Created manifest file: $${MANIFEST_FILE}"
waitFor: ['maven-package']
- name: 'gcr.io/cloud-builders/gsutil'
id: upload-exit-gate-manifest
entrypoint: 'bash'
args:
- '-c'
- |
set -e
MANIFEST_FILE="/workspace/exit_gate_manifest.textproto"
# Use a timestamp to create a unique manifest filename for each release
MANIFEST_FILENAME="release_$(date -u +%Y%m%d%H%M%S).textproto"
echo "Uploading manifest to $${SECURE_PUBLISH_BUCKET}$${MANIFEST_FILENAME}"
gsutil cp "$${MANIFEST_FILE}" "$${SECURE_PUBLISH_BUCKET}$${MANIFEST_FILENAME}"
echo "Manifest uploaded successfully. OSS Exit Gate process should now be triggered."
waitFor: ['create-exit-gate-manifest']
artifacts:
mavenArtifacts:
- repository: 'https://us-maven.pkg.dev/oss-exit-gate-prod/cloud-data-fusion--mavencentral'
deployFolder: '/workspace/target/'
groupId: 'io.cdap.plugin'
artifactId: 'google-cloud'
version: $VERSION
options:
requestedVerifyOption: VERIFIED
machineType: 'E2_HIGHCPU_32'