Skip to content

Commit c58f748

Browse files
committed
Add license enforcement related jobs
1 parent 8588771 commit c58f748

File tree

3 files changed

+124
-18
lines changed

3 files changed

+124
-18
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
product-name: tpsm
2+
product-properties:
3+
.properties.license_key:
4+
value: ((license_key))
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
opsman-version: 3.0.37+LTS-T
1+
opsman-version: 3.1.0+LTS-T
22
pks-version: 1.17.0
33
tas-version: 6.0.12+LTS-T
44
healthwatch-version: 2.3.1

pipelines/pipeline.yml

Lines changed: 119 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,19 @@ groups:
66
- jobs:
77
- install-opsman
88
- expiring-certificates
9+
- expiring-licenses
910
- delete-installation
1011
- test-platform-automation
1112
- export-installation
1213
- upgrade-opsman
1314
- download-upload-and-stage-healthwatch-pas-exporter
1415
- download-upload-and-stage-healthwatch
1516
- download-upload-and-stage-tas
17+
- download-upload-and-stage-example-licensed-product
1618
- configure-healthwatch-pas-exporter
1719
- configure-healthwatch
1820
- configure-tas
21+
- configure-example-licensed-product
1922
- apply-product-changes
2023
- run-tas-smoketest-errand
2124
- collect-telemetry
@@ -48,8 +51,8 @@ resources:
4851
secret_access_key: ((platform-automation/main/s3_with_role.secret_access_key))
4952
aws_role_arn: ((platform-automation/main/s3_with_role.role_arn))
5053
region_name: ((platform-automation/main.s3_region_name))
51-
bucket: ((platform-automation/main.s3_pivnet_products_bucket))
52-
regexp: .*tasks-(.*).zip
54+
bucket: ref-pipeline-product-staging
55+
regexp: platform-automation-tasks-(.*).zip
5356

5457
- name: platform-automation-image
5558
type: s3-with-arn
@@ -70,7 +73,28 @@ resources:
7073
region_name: ((platform-automation/main.s3_region_name))
7174
bucket: ((platform-automation/main.s3_pivnet_products_bucket))
7275
regexp: .*telemetry-(.*).tgz
73-
# code_snippet reference-resources-s3 end yaml
76+
77+
- name: example-licensed-product
78+
type: s3-with-arn
79+
source:
80+
access_key_id: ((platform-automation/main/s3_with_role.access_key_id))
81+
secret_access_key: ((platform-automation/main/s3_with_role.secret_access_key))
82+
aws_role_arn: ((platform-automation/main/s3_with_role.role_arn))
83+
region_name: ((platform-automation/main.s3_region_name))
84+
bucket: ref-pipeline-product-staging
85+
regexp: example-licensed-product-tpsm-(.*).pivotal
86+
87+
- name: opsman-image-file
88+
type: s3-with-arn
89+
source:
90+
access_key_id: ((platform-automation/main/s3_with_role.access_key_id))
91+
secret_access_key: ((platform-automation/main/s3_with_role.secret_access_key))
92+
aws_role_arn: ((platform-automation/main/s3_with_role.role_arn))
93+
region_name: ((platform-automation/main.s3_region_name))
94+
bucket: ref-pipeline-product-staging
95+
regexp: ops-manager-gcp-(.*).yml
96+
97+
# code_snippet reference-resources-s3 end yaml
7498

7599
# code_snippet export-installation-resource-usage start yaml
76100
- name: installation
@@ -104,7 +128,14 @@ resources:
104128
source:
105129
private_key: ((platform-automation/main/docs-ref-pipeline-repo-key.private_key))
106130
uri: ((platform-automation/main.docs-ref-pipeline-repo-uri))
107-
branch: develop
131+
branch: license_key_changes
132+
133+
- name: credentials
134+
type: git
135+
source:
136+
private_key: ((platform-automation/main/docs-ref-pipeline-repo-key.private_key))
137+
uri: ((platform-automation/main.platform_automation_deployments_ghe_uri))
138+
branch: main
108139
# code_snippet resources-configurations end yaml
109140

110141
# code_snippet resources-triggers start yaml
@@ -342,28 +373,17 @@ jobs:
342373
passed: [ export-installation ]
343374
- get: configuration
344375
- get: state
376+
- get: opsman-image-file
345377
- task: prepare-tasks-with-secrets
346378
<<: *prepare-tasks-with-secrets
347379
- task: prepare-image
348380
<<: *prepare-image
349-
- task: download-opsman-image
350-
image: platform-automation-image
351-
file: platform-automation-tasks/tasks/download-product.yml
352-
input_mapping:
353-
config: configuration
354-
vars: configuration
355-
params:
356-
CONFIG_FILE: foundations/((foundation))/config/download-opsman.yml
357-
VARS_FILES: vars/foundations/((foundation))/vars/versions.yml
358-
SOURCE: pivnet
359-
output_mapping:
360-
downloaded-product: opsman-image
361381
# code_snippet upgrade-opsman-usage start yaml
362382
- task: upgrade-opsman
363383
image: platform-automation-image
364384
file: platform-automation-tasks/tasks/upgrade-opsman.yml
365385
input_mapping:
366-
image: opsman-image
386+
image: opsman-image-file
367387
config: configuration
368388
env: configuration
369389
vars: configuration
@@ -550,6 +570,32 @@ jobs:
550570
params:
551571
ENV_FILE: foundations/config/env.yml
552572

573+
- name: download-upload-and-stage-example-licensed-product
574+
serial: true
575+
serial_groups: [ products ]
576+
plan:
577+
- in_parallel:
578+
- get: platform-automation-image
579+
params:
580+
unpack: true
581+
trigger: true
582+
passed: [ "upgrade-opsman" ]
583+
- get: platform-automation-tasks
584+
params:
585+
unpack: true
586+
- get: configuration
587+
- get: example-licensed-product
588+
- task: prepare-tasks-with-secrets
589+
<<: *prepare-tasks-with-secrets
590+
- task: upload-and-stage-example-licensed-product
591+
image: platform-automation-image
592+
file: platform-automation-tasks/tasks/upload-and-stage-product.yml
593+
input_mapping:
594+
product: example-licensed-product
595+
env: configuration
596+
params:
597+
ENV_FILE: foundations/config/env.yml
598+
553599
- name: configure-tas
554600
serial: true
555601
serial_groups: [ install ]
@@ -641,6 +687,36 @@ jobs:
641687
VARS_FILES: |
642688
vars/foundations/((foundation))/vars/director.yml
643689
690+
- name: configure-example-licensed-product
691+
serial: true
692+
serial_groups: [ install ]
693+
plan:
694+
- in_parallel:
695+
- get: platform-automation-image
696+
params:
697+
unpack: true
698+
passed:
699+
- download-upload-and-stage-example-licensed-product
700+
trigger: true
701+
- get: platform-automation-tasks
702+
params:
703+
unpack: true
704+
- get: configuration
705+
- task: prepare-tasks-with-secrets
706+
<<: *prepare-tasks-with-secrets
707+
- task: configure-example-licensed-product
708+
image: platform-automation-image
709+
file: platform-automation-tasks/tasks/configure-product.yml
710+
input_mapping:
711+
config: configuration
712+
env: configuration
713+
secrets: credentials
714+
params:
715+
CONFIG_FILE: foundations/((foundation))/config/example-licensed-product.yml
716+
ENV_FILE: foundations/config/env.yml
717+
VARS_FILES: |
718+
secrets/reference-gcp/secrets/creds-example-licensed-product.yml
719+
644720
- name: apply-product-changes
645721
serial: true
646722
serial_groups: [ install ]
@@ -802,6 +878,32 @@ jobs:
802878
ENV_FILE: foundations/config/env.yml
803879
EXPIRES_WITHIN: 2m
804880
# code_snippet expiring-certificates-usage end
881+
- name: expiring-licenses
882+
serial: true
883+
serial_groups: [ install ]
884+
plan:
885+
- in_parallel:
886+
- get: daily-trigger
887+
trigger: true
888+
- get: platform-automation-image
889+
params:
890+
unpack: true
891+
- get: platform-automation-tasks
892+
params:
893+
unpack: true
894+
- get: configuration
895+
- get: state
896+
- task: prepare-tasks-with-secrets
897+
<<: *prepare-tasks-with-secrets
898+
# code_snippet expiring-certificates-usage start yaml
899+
- task: expiring-licenses
900+
image: platform-automation-image
901+
file: platform-automation-tasks/tasks/expiring-licenses.yml
902+
input_mapping:
903+
env: configuration
904+
params:
905+
ENV_FILE: foundations/config/env.yml
906+
EXPIRES_WITHIN: 3m
805907
- name: stage-configure-apply-telemetry
806908
serial_groups: [install]
807909
plan:

0 commit comments

Comments
 (0)