|
10 | 10 | # the License. |
11 | 11 |
|
12 | 12 | steps: |
13 | | - - name: 'gcr.io/cloud-builders/gcloud' |
14 | | - id: setup-gpg |
15 | | - entrypoint: 'bash' |
16 | | - secretEnv: ['GPG_KEY'] |
17 | | - args: |
18 | | - - '-c' |
19 | | - - | |
20 | | - set -e |
21 | | - # Set a persistent GPG home in /workspace so other steps can see it |
22 | | - export GNUPGHOME=/workspace/.gnupg |
23 | | - mkdir -p $$GNUPGHOME |
24 | | - chmod 700 $$GNUPGHOME |
25 | | -
|
26 | | - # Configure loopback mode for non-interactive signing |
27 | | - echo "pinentry-mode loopback" >> $$GNUPGHOME/gpg.conf |
28 | | - echo "allow-loopback-pinentry" >> $$GNUPGHOME/gpg-agent.conf |
29 | | -
|
30 | | - # Import the key directly from the secret environment variable |
31 | | - echo "$$GPG_KEY" | gpg --batch --import |
32 | | - echo "GPG key imported into $$GNUPGHOME." |
| 13 | +# - name: 'gcr.io/cloud-builders/gcloud' |
| 14 | +# id: setup-gpg |
| 15 | +# entrypoint: 'bash' |
| 16 | +## secretEnv: ['GPG_KEY'] |
| 17 | +# args: |
| 18 | +# - '-c' |
| 19 | +# - | |
| 20 | +# set -e |
| 21 | +# # Set a persistent GPG home in /workspace so other steps can see it |
| 22 | +# export GNUPGHOME=/workspace/.gnupg |
| 23 | +# mkdir -p $$GNUPGHOME |
| 24 | +# chmod 700 $$GNUPGHOME |
| 25 | +# |
| 26 | +# # Configure loopback mode for non-interactive signing |
| 27 | +# echo "pinentry-mode loopback" >> $$GNUPGHOME/gpg.conf |
| 28 | +# echo "allow-loopback-pinentry" >> $$GNUPGHOME/gpg-agent.conf |
| 29 | +# |
| 30 | +# # Import the key directly from the secret environment variable |
| 31 | +# echo "$$GPG_KEY" | gpg --batch --import |
| 32 | +# echo "GPG key imported into $$GNUPGHOME." |
33 | 33 |
|
34 | 34 | - name: 'gcr.io/cloud-builders/mvn:3.8-jdk-8' |
35 | 35 | id: maven-package |
36 | | - entrypoint: 'bash' |
37 | | - secretEnv: [ 'GPG_PASSPHRASE' ] |
| 36 | + entrypoint: 'mvn' # Directly use mvn as entrypoint |
38 | 37 | args: |
39 | | - - '-c' |
40 | | - - | |
41 | | - set -e |
42 | | - export GNUPGHOME=/workspace/.gnupg |
43 | | - |
44 | | - mvn deploy -B -V -DskipTests \ |
45 | | - - deploy |
46 | | - - -P |
47 | | - - common-artifacts, version-release |
48 | | - - Dgpg.passphrase="$${CDAP_GPG_PASSPHRASE}" |
49 | | - - -Dmaven.wagon.http.retryHandler.count=5 |
50 | | - - -Dmaven.wagon.httpconnectionManager.ttlSeconds=30 |
| 38 | + - 'deploy' |
| 39 | + - '-B' |
| 40 | + - '-V' |
| 41 | + - '-DskipTests' |
| 42 | + - '-Pcommon-artifacts,version-release' |
| 43 | + - '-DaltDeploymentRepository=local::default::file:///workspace/target' |
| 44 | + - '-Dmaven.wagon.http.retryHandler.count=5' |
| 45 | + - '-Dmaven.wagon.httpconnectionManager.ttlSeconds=30' |
| 46 | +# env: |
| 47 | +# - 'GNUPGHOME=/workspace/.gnupg' |
| 48 | + # secretEnv: [ 'GPG_PASSPHRASE' ] |
51 | 49 |
|
52 | | - - name: 'bash' |
53 | | - id: create-exit-gate-manifest |
54 | | - entrypoint: 'bash' |
55 | | - args: |
56 | | - - '-c' |
57 | | - - | |
58 | | - # Correctly access the output variable from determine-deploy using $$_STEP_ID_KEY |
59 | | - if [[ "$$_DETERMINE_DEPLOY_IS_SNAPSHOT" == "false" ]]; then |
60 | | - set -e |
61 | | - MANIFEST_FILE="/workspace/exit_gate_manifest.textproto" |
62 | | - echo '# -*- protobuffer -*-' > "$${MANIFEST_FILE}" |
63 | | - echo '# proto-file: security/opensource/exit_gate_v1/onboarded/proto/publishing_manifest.proto' >> "$${MANIFEST_FILE}" |
64 | | - echo '# proto-message: PublishingManifest' >> "$${MANIFEST_FILE}" |
65 | | - echo '' >> "$${MANIFEST_FILE}" |
66 | | - echo 'publish_all: true' >> "$${MANIFEST_FILE}" |
67 | | - echo "Created manifest file: $${MANIFEST_FILE}" |
68 | | - waitFor: ['maven-package'] |
69 | 50 |
|
70 | | - - name: 'gcr.io/cloud-builders/gsutil' |
71 | | - id: upload-exit-gate-manifest |
72 | | - entrypoint: 'bash' |
73 | | - args: |
74 | | - - '-c' |
75 | | - - | |
76 | | - set -e |
77 | | - GCS_MANIFEST_DIR="gs://oss-exit-gate-prod-projects-bucket/cloud-data-fusion/mavencentral/manifests/" |
78 | | - MANIFEST_FILE="/workspace/exit_gate_manifest.textproto" |
79 | | - MANIFEST_FILENAME="release_$$(date -u +%Y%m%d%H%M%S).textproto" |
80 | | - echo "Uploading manifest to $${GCS_MANIFEST_DIR}$${MANIFEST_FILENAME}" |
81 | | - gsutil cp "$${MANIFEST_FILE}" "$${GCS_MANIFEST_DIR}$${MANIFEST_FILENAME}" |
82 | | - echo "Manifest uploaded successfully. OSS Exit Gate process should now be triggered." |
83 | | - waitFor: ['create-exit-gate-manifest'] |
| 51 | +# - name: 'bash' |
| 52 | +# id: create-exit-gate-manifest |
| 53 | +# entrypoint: 'bash' |
| 54 | +# args: |
| 55 | +# - '-c' |
| 56 | +# - | |
| 57 | +# set -e |
| 58 | +# MANIFEST_FILE="/workspace/exit_gate_manifest.textproto" |
| 59 | +# echo '# -*- protobuffer -*-' > "$${MANIFEST_FILE}" |
| 60 | +# echo '# proto-file: security/opensource/exit_gate_v1/onboarded/proto/publishing_manifest.proto' >> "$${MANIFEST_FILE}" |
| 61 | +# echo '# proto-message: PublishingManifest' >> "$${MANIFEST_FILE}" |
| 62 | +# echo '' >> "$${MANIFEST_FILE}" |
| 63 | +# echo 'publish_all: true' >> "$${MANIFEST_FILE}" |
| 64 | +# echo "Created manifest file: $${MANIFEST_FILE}" |
| 65 | +# waitFor: ['maven-package'] |
| 66 | +# |
| 67 | +# - name: 'gcr.io/cloud-builders/gsutil' |
| 68 | +# id: upload-exit-gate-manifest |
| 69 | +# entrypoint: 'bash' |
| 70 | +# args: |
| 71 | +# - '-c' |
| 72 | +# - | |
| 73 | +# set -e |
| 74 | +# GCS_MANIFEST_DIR="gs://oss-exit-gate-prod-projects-bucket/cloud-data-fusion/mavencentral/manifests/" |
| 75 | +# MANIFEST_FILE="/workspace/exit_gate_manifest.textproto" |
| 76 | +# MANIFEST_FILENAME="release_$$(date -u +%Y%m%d%H%M%S).textproto" |
| 77 | +# echo "Uploading manifest to $${GCS_MANIFEST_DIR}$${MANIFEST_FILENAME}" |
| 78 | +# gsutil cp "$${MANIFEST_FILE}" "$${GCS_MANIFEST_DIR}$${MANIFEST_FILENAME}" |
| 79 | +# echo "Manifest uploaded successfully. OSS Exit Gate process should now be triggered." |
| 80 | +# waitFor: ['create-exit-gate-manifest'] |
84 | 81 |
|
85 | 82 |
|
86 | 83 | substitutions: |
87 | 84 | _VERSION: '0.25.0-SNAPSHOT' |
88 | 85 |
|
89 | | -# |
90 | 86 | #artifacts: |
91 | 87 | # mavenArtifacts: |
92 | | -# - repository: 'https://us-maven.pkg.dev/oss-exit-gate-prod/cloud-data-fusion--mavencentral' |
| 88 | +# - repository: 'https://us-east1-maven.pkg.dev/komalyd-dev/my-test-maven-repo' |
93 | 89 | # deployFolder: '/workspace/target/' |
94 | 90 | # groupId: 'io.cdap.plugin' |
95 | 91 | # artifactId: 'google-cloud' |
96 | 92 | # version: '${_VERSION}' |
97 | | - |
98 | | -options: |
99 | | - requestedVerifyOption: VERIFIED |
100 | | - machineType: 'E2_HIGHCPU_32' |
| 93 | +# |
| 94 | +#options: |
| 95 | +# requestedVerifyOption: VERIFIED |
| 96 | +# machineType: 'E2_HIGHCPU_32' |
101 | 97 |
|
102 | 98 |
|
103 | | -availableSecrets: |
104 | | - secretManager: |
105 | | - - versionName: projects/cdapio-github-builds/secrets/CDAP_GPG_PASSPHRASE/versions/latest |
106 | | - env: 'CDAP_GPG_PASSPHRASE' |
| 99 | +#availableSecrets: |
| 100 | +# secretManager: |
| 101 | +# - versionName: projects/cdapio-github-builds/secrets/CDAP_GPG_PASSPHRASE/versions/latest |
| 102 | +# env: 'CDAP_GPG_PASSPHRASE' |
0 commit comments