Skip to content

Commit

Permalink
Add RMT release config generation
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Selzo <[email protected]>
  • Loading branch information
aramprice and selzoc committed Sep 11, 2024
1 parent c9d1e31 commit ac20345
Show file tree
Hide file tree
Showing 3 changed files with 141 additions and 1 deletion.
79 changes: 78 additions & 1 deletion ci/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
#@ load("@ytt:data", "data")


#! ************************************
#! Secrets we need to run this pipeline
#! ************************************
Expand Down Expand Up @@ -58,6 +57,9 @@ secrets:
- &docker_username ((docker.username))
- &docker_password ((docker.password))

#! Access token for our service account user in Github Enterprise
- &ghe_svc_account_personal_access_token ((svc-bosh-ecosystem-ghe-personal-access-token))

#! **************
#! End of secrets
#! **************
Expand Down Expand Up @@ -232,6 +234,15 @@ resources:
branch: master
private_key: *homebrew_ci_bot_private_key

- name: gormt-repo
type: git
icon: github
tags: [ broadcom ]
source:
uri: https://github.gwd.broadcom.net/TNZ/gormt.git
username: [email protected]
password: *ghe_svc_account_personal_access_token

- name: bbr-artefacts
type: s3
icon: aws
Expand Down Expand Up @@ -437,6 +448,13 @@ resources:
username: *docker_username
password: *docker_password

- name: bosh-ecosystem-registry-image
type: registry-image
source:
repository: bosh/bosh-ecosystem-concourse
username: *docker_username
password: *docker_password

- name: every-monday
type: time
icon: timer-outline
Expand Down Expand Up @@ -1010,6 +1028,65 @@ jobs:
repository: updated-homebrew-tap
rebase: true

- name: publish-to-rmt
plan:
- in_parallel:
- get: main
trigger: true
passed: [ publish-to-github ]
- get: bbr-artefacts
passed: [ publish-to-github ]
params:
unpack: true
- get: s3-config-validator-artefacts
params:
unpack: true
passed: [ publish-to-github ]
- get: release-version
passed: [ publish-to-github ]
- get: gormt-repo
tags: [ broadcom ]
- get: bosh-ecosystem-registry-image
- load_var: version-number
file: release-version/number
- task: build-release-config
file: main/ci/tasks/build-release-config/task.yml
image: bosh-ecosystem-registry-image
params:
RELEASE_CONTACT: "[email protected]"
RELEASE_TITLE: BOSH Backup and Restore
RELEASE_PRODUCT_NAME: BOSH Backup and Restore
RELEASE_DISPLAY_GROUP: BOSH Backup and Restore
RELEASE_TYPE: Release Update / MP
RELEASE_STATUS: GA
RELEASE_PRODUCT_SLUG: stemcells-ubuntu-jammy
RELEASE_VERSION: ((.:version-number))
# - task: create-rmt-release
# image: bosh-ecosystem-registry-image
# tags: [ broadcom ]
# file: gormt-repo/concourse_examples/tasks/create-release.yml
# params:
# RMT_RMT_EMAIL: [email protected]
# RMT_RMT_HOST: ((rmt-prod-host))
# RMT_RMT_USERNAME: ((rmt-prod-user.username))
# RMT_RMT_PASSWORD: ((rmt-prod-user.password))
# RMT_SFTP_HOST: ((sftp-prod-host))
# RMT_SFTP_USERNAME: ((sftp-prod-user.username))
# RMT_SFTP_PASSWORD: ((sftp-prod-user.password))
# RMT_VERBOSE: true
# on_failure:
# task: cleanup-rmt-please-instructions
# config:
# platform: linux
# image: bosh-ecosystem-registry-image
# run:
# path: bash
# args:
# - -exc
# - |
# echo "Make sure any failed releases in RMT are cleaned up!"


- name: claim-env
plan:
- in_parallel:
Expand Down
37 changes: 37 additions & 0 deletions ci/tasks/build-release-config/task.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env bash
set -euo pipefail

root_dir=$(pwd)

today="$(date '+%m/%d/%Y')"
one_year_from_now="$(date -v +1y '+%m/%d/%Y')"
docs_link="https://docs.vmware.com/en/Compliance-Scanner-for-VMware-Tanzu/1.3/addon-compliance-tools/GUID-index.html"

# copy all the stuff to release-files dir

cat > "$root_dir/release-config/release.yml" <<RELEASE_METADATA
---
business_unit: Tanzu and Cloud Health
contact: ${RELEASE_CONTACT}
title: ${RELEASE_TITLE}
product_name: ${RELEASE_PRODUCT_NAME}
display_group: ${RELEASE_DISPLAY_GROUP}
version: ${RELEASE_VERSION}
type: ${RELEASE_TYPE}
status: ${RELEASE_STATUS}
lang: EN
docs_link: "${docs_link}"
ga_date_mm/dd/yyyy: ${today}
published_date_mm/dd/yyyy: ${today}
end_of_support_date_mm/dd/yyyy: ${one_year_from_now}
export_control_status: SCREENING_REQUIRED
files:
- file: ../release-files/bbr-${RELEASE_VERSION}-darwin-amd64
- file: ../release-files/bbr-${RELEASE_VERSION}-linux-amd64
- file: ../release-files/bbr-${RELEASE_VERSION}.tar
- file: ../release-files/bbr-s3-config-validator-${RELEASE_VERSION}-linux-amd64
- file: ../release-files/bbr-s3-config-validator-${RELEASE_VERSION}.README.md
RELEASE_METADATA

echo "Release config:"
cat "$root_dir/release-config/release.yml"
26 changes: 26 additions & 0 deletions ci/tasks/build-release-config/task.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
platform: linux

inputs:
- name: bosh-ecosystem-registry-image
- name: main
- name: bbr-artefacts
- name: s3-config-validator-artefacts

outputs:
- name: release-config
- name: release-files

run:
path: main/ci/tasks/build-release-config/task.sh

params:
RELEASE_CONTACT:
RELEASE_TITLE:
RELEASE_PRODUCT_NAME:
RELEASE_DISPLAY_GROUP:
RELEASE_TYPE:
RELEASE_STATUS:
RELEASE_SKU:
RELEASE_PRODUCT_SLUG:
RELEASE_VERSION:

0 comments on commit ac20345

Please sign in to comment.