1- anchors :
2- ci_bot :
3- email : &ci_bot_email infra@cloudfoundry.org
4- name : &ci_bot_name CI Bot
5-
61# @ load("@ytt:data", "data")
7- # @ bats_director_tag = "test-stemcells-" + data.values.stemcell_details.os_short_name
82
93# @yaml/text-templated-strings
4+ ---
5+
6+ # @ def metalink_resource(IAAS, HYPERVISOR, FIPS=""):
7+ name : (@= IAAS @)-(@= HYPERVISOR @)(@= FIPS @)
8+ type : metalink-repository
9+ source :
10+ mirror_files :
11+ - destination : s3://storage.googleapis.com/bosh-core-stemcells-candidate(@= FIPS @)/(@= IAAS @)/{{.Name}}
12+ options :
13+ private_key : ((github_deploy_key_bosh-io-stemcells-core-index.private_key))
14+ filters :
15+ - repositorypath : " */(@= IAAS @)-(@= HYPERVISOR @)(@= FIPS @)(@= data.values.stemcell_details.agent_suffix @).meta4"
16+ uri : git+ssh://git@github.com:cloudfoundry/bosh-io-stemcells-core-index.git//dev/(@= data.values.stemcell_details.os_name @)(@= FIPS @)/
17+ url_handlers :
18+ - include :
19+ - (s3|https)://.*
20+ options :
21+ access_key : ((hmac_accesskey))
22+ secret_key : ((hmac_secret))
23+ type : s3
24+ # @ end
25+
26+ # @yaml/text-templated-strings
27+ ---
28+
29+ # @ def build_stemcell(IAAS, HYPERVISOR, FIPS=""):
30+ name : build-(@= IAAS @)-(@= HYPERVISOR @)(@= FIPS @)
31+ serial : true
32+ plan :
33+ - in_parallel :
34+ - get : version
35+ passed :
36+ - build-stemcell
37+ resource : version
38+ trigger : true
39+ - get : bosh-stemcells-ci
40+ - get : os-image-stemcell-builder-registry-image
41+ - get : build-time
42+ passed :
43+ - build-stemcell
44+ trigger : true
45+ - get : bosh-linux-stemcell-builder
46+ passed :
47+ - build-stemcell
48+ resource : bosh-linux-stemcell-builder
49+ - get : stemcells-index
50+ - get : os-image-tarball
51+ passed :
52+ - build-os-image
53+ - task : create-stemcell
54+ file : bosh-stemcells-ci/ci/tasks/build.yml
55+ image : os-image-stemcell-builder-registry-image
56+ params :
57+ HYPERVISOR : # @ HYPERVISOR
58+ IAAS : # @ IAAS
59+ OS_NAME : ubuntu
60+ S3_API_ENDPOINT : storage.googleapis.com
61+ OS_VERSION : (@= data.values.stemcell_details.os_short_name @)(@= FIPS @)
62+ STEMCELL_BUCKET : bosh-core-stemcells-candidate(@= FIPS @)
63+ GIT_USER_EMAIL : (@= data.values.stemcell_details.bot_email @)
64+ GIT_USER_NAME : (@= data.values.stemcell_details.bot_name @)
65+ AGENT_SUFFIX : (@= data.values.stemcell_details.agent_suffix @)
66+ # @ if/end FIPS != "":
67+ UBUNTU_ADVANTAGE_TOKEN : ((ubuntu_advantage_token))
68+ privileged : true
69+ vars :
70+ image_os_tag : (@= data.values.stemcell_details.os_short_name @)
71+ - in_parallel :
72+ - put : (@= IAAS @)-(@= HYPERVISOR @)(@= FIPS @)
73+ attempts : 3
74+ params :
75+ files :
76+ - stemcell/*.tgz
77+ rename : " {{.Version}}/(@= IAAS @)-(@= HYPERVISOR @)(@= FIPS @)(@= data.values.stemcell_details.agent_suffix @).meta4"
78+ options :
79+ author_email : (@= data.values.stemcell_details.bot_email @)
80+ author_name : (@= data.values.stemcell_details.bot_name @)
81+ message : ' dev: (@= data.values.stemcell_details.os_name @)'
82+ version : candidate-build-number/number
83+ # @ end
84+
85+ # @yaml/text-templated-strings
86+ ---
87+
88+ anchors :
89+ bats_director_tag : &bats-director-tag test-stemcells-(@= data.values.stemcell_details.os_short_name @)
90+ ci_bot :
91+ email : &ci_bot_email (@= data.values.stemcell_details.bot_email @)
92+ name : &ci_bot_name (@= data.values.stemcell_details.bot_name @)
1093
1194groups :
1295- name : build
@@ -125,7 +208,7 @@ jobs:
125208 GCP_REGION : europe-north2
126209 GCP_NETWORK_NAME : bosh-concourse
127210 SUBNET_INT : (@= data.values.stemcell_details.subnet_int @)
128- DIRECTOR_TAG : (@= bats_director_tag @)
211+ DIRECTOR_TAG : *bats-director-tag
129212
130213- name : process-high-critical-cves
131214 serial_groups : [log-cves]
@@ -483,62 +566,6 @@ jobs:
483566# ! timeout: 15m
484567# ! serial: true
485568
486- # @ def build_stemcell(IAAS, HYPERVISOR, FIPS=""):
487- name : build-(@= IAAS @)-(@= HYPERVISOR @)(@= FIPS @)
488- serial : true
489- plan :
490- - in_parallel :
491- - get : version
492- passed :
493- - build-stemcell
494- resource : version
495- trigger : true
496- - get : bosh-stemcells-ci
497- - get : os-image-stemcell-builder-registry-image
498- - get : build-time
499- passed :
500- - build-stemcell
501- trigger : true
502- - get : bosh-linux-stemcell-builder
503- passed :
504- - build-stemcell
505- resource : bosh-linux-stemcell-builder
506- - get : stemcells-index
507- - get : os-image-tarball
508- passed :
509- - build-os-image
510- - task : create-stemcell
511- file : bosh-stemcells-ci/ci/tasks/build.yml
512- image : os-image-stemcell-builder-registry-image
513- params :
514- HYPERVISOR : # @ HYPERVISOR
515- IAAS : # @ IAAS
516- OS_NAME : ubuntu
517- S3_API_ENDPOINT : storage.googleapis.com
518- OS_VERSION : (@= data.values.stemcell_details.os_short_name @)(@= FIPS @)
519- STEMCELL_BUCKET : bosh-core-stemcells-candidate(@= FIPS @)
520- GIT_USER_EMAIL : *ci_bot_email
521- GIT_USER_NAME : *ci_bot_name
522- AGENT_SUFFIX : (@= data.values.stemcell_details.agent_suffix @)
523- # @ if/end FIPS != "":
524- UBUNTU_ADVANTAGE_TOKEN : ((ubuntu_advantage_token))
525- privileged : true
526- vars :
527- image_os_tag : (@= data.values.stemcell_details.os_short_name @)
528- - in_parallel :
529- - put : (@= IAAS @)-(@= HYPERVISOR @)(@= FIPS @)
530- attempts : 3
531- params :
532- files :
533- - stemcell/*.tgz
534- rename : " {{.Version}}/(@= IAAS @)-(@= HYPERVISOR @)(@= FIPS @)(@= data.values.stemcell_details.agent_suffix @).meta4"
535- options :
536- author_email : *ci_bot_email
537- author_name : *ci_bot_name
538- message : ' dev: (@= data.values.stemcell_details.os_name @)'
539- version : candidate-build-number/number
540- # @ end
541-
542569# @ for iaas in data.values.stemcell_details.include_iaas:
543570- # @ build_stemcell(iaas.iaas, iaas.hypervisor)
544571# @ end
@@ -596,7 +623,7 @@ jobs:
596623 GCP_PROJECT_ID : ((gcp_project_id))
597624 GCP_ZONE : europe-north2-a
598625 GCP_SUBNET_NAME : stemcell-builder-integration-(@= data.values.stemcell_details.subnet_int @)
599- TAG : (@= bats_director_tag @)
626+ TAG : *bats-director-tag
600627 - task : deploy-director
601628 file : bosh-stemcells-ci/ci/tasks/gcp/deploy-director.yml
602629 image : bosh-integration-image
@@ -611,7 +638,7 @@ jobs:
611638 INTERNAL_CIDR : 10.100.(@= data.values.stemcell_details.subnet_int @).0/24
612639 INTERNAL_GW : 10.100.(@= data.values.stemcell_details.subnet_int @).1
613640 RESERVED_RANGE : ' 10.100.(@= data.values.stemcell_details.subnet_int @).2 - 10.100.(@= data.values.stemcell_details.subnet_int @).63, 10.100.(@= data.values.stemcell_details.subnet_int @).126 - 10.100.(@= data.values.stemcell_details.subnet_int @).254'
614- TAG : (@= bats_director_tag @)
641+ TAG : *bats-director-tag
615642 - task : prepare-bats
616643 file : bosh-stemcells-ci/ci/tasks/bats/iaas/gcp/prepare-bats-config.yml
617644 image : bosh-integration-image
@@ -932,38 +959,18 @@ resources:
932959- name : weekly
933960 type : time
934961 source :
962+ initial_version : true
935963 start : 3:00 -0700
936964 stop : 4:30 -0700
937965 days :
938966 - Saturday
939- initial_version : true
940967
941968- name : bosh-agent
942969 type : metalink-repository
943970 source :
944971 uri : git+https://github.com/cloudfoundry/bosh-agent-index.git/
945972 version : " *"
946973
947- # @ def metalink_resource(IAAS, HYPERVISOR, FIPS=""):
948- name : (@= IAAS @)-(@= HYPERVISOR @)(@= FIPS @)
949- type : metalink-repository
950- source :
951- mirror_files :
952- - destination : s3://storage.googleapis.com/bosh-core-stemcells-candidate(@= FIPS @)/(@= IAAS @)/{{.Name}}
953- options :
954- private_key : ((github_deploy_key_bosh-io-stemcells-core-index.private_key))
955- filters :
956- - repositorypath : " */(@= IAAS @)-(@= HYPERVISOR @)(@= FIPS @)(@= data.values.stemcell_details.agent_suffix @).meta4"
957- uri : git+ssh://git@github.com:cloudfoundry/bosh-io-stemcells-core-index.git//dev/(@= data.values.stemcell_details.os_name @)(@= FIPS @)/
958- url_handlers :
959- - include :
960- - (s3|https)://.*
961- options :
962- access_key : ((hmac_accesskey))
963- secret_key : ((hmac_secret))
964- type : s3
965- # @ end
966-
967974# @ for iaas in data.values.stemcell_details.include_iaas:
968975- # @ metalink_resource(iaas.iaas, iaas.hypervisor)
969976# @ end
0 commit comments