Skip to content

Commit

Permalink
Merge pull request #1512 from cloudfoundry/ci-remove-upload-to-tanzunet
Browse files Browse the repository at this point in the history
[ci] Remove upload to Pivnet logic
  • Loading branch information
jpalermo authored Jun 24, 2024
2 parents 4115a07 + d07dd22 commit a93191c
Showing 1 changed file with 0 additions and 340 deletions.
340 changes: 0 additions & 340 deletions ci/pipelines/bbr-cli/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,6 @@ secrets:
#! gcr_viewer_key was needed on 2024-03-24 for getting concourse container images from our GCR instance. Generated by using personal creds to log into the mapbu-cryogenics google cloud project.
- &gcr_viewer_key ((gcr.viewer_key))

#! On 2023-11-13 the osspi jobs were moved into this pipeine, the following were the secrets needed. Unsure how they are generated.
- &gitlab_norsk_to_osspi_deploy_key ((gitlab.norsk-to-osspi-deploy-key))
- &osm_username ((osm.username))
- &osm_cc_list ((osm.cc_list))
- &osm_api_key_token ((osm.api_key_token))

#! On 2023-11-10 we needed a pivnet admin token to upload new releases to TanzuNet. Accounts with admin priveleges are obtained
#! by asking the tanzuNet team. Auth tokens for the account can be generated via the webui.
- &pivnet_admin_api_token ((pivnet/cf-lazarus-admin.api_token))

#! On 2023-11-10 we needed we need an API key to OSM to automate OSM operations. This can be obatined by contacting the OSM team.
#! they also are the only people able to rotate it.
- &osm_api_key ((osm.api_key))

#! on 2023-10-24 required to have an expected public key available on the fake director deployed in deploy-fake-director. generated via ssh-keygen
- &jumpbox_public_key ((bbr-cli/test_bosh_director.public_key))

Expand Down Expand Up @@ -119,34 +105,18 @@ groups:
- check-for-changes
- publish-to-github
- update-homebrew-formula
- osspi-bosh-backup-and-restore
- name: release-tanzunet
jobs:
- upload-to-tanzunet
- request-osl
- alert-team-on-release-creation
- publish
- name: bump
jobs:
- bump-golang
- bump-go-module

resource_types:

- name: gitlab
type: registry-image
source:
repository: devtools-docker.artifactory.eng.vmware.com/vmware/runway/resourcetypes/gitlab-resource
tag: 1.0.0

- name: osm
type: registry-image
source:
repository: eu.gcr.io/mapbu-cryogenics/osm-resource
username: _json_key
password: *gcr_viewer_key
tag: latest

- name: shepherd
source:
tag: v1
Expand All @@ -160,14 +130,6 @@ resource_types:
username: _json_key
password: *gcr_viewer_key

- name: pivnet
type: registry-image
source:
repository: us-west2-docker.pkg.dev/mapbu-cryogenics/dockerhub-proxy-cache/pivotalcf/pivnet-resource
tag: latest-final
username: _json_key
password: *gcr_viewer_key

- name: bosh-deployment-resource
type: registry-image
source:
Expand Down Expand Up @@ -198,15 +160,6 @@ resource_types:
password: *gcr_viewer_key

resources:

- name: norsk-to-osspi
type: git
icon: gitlab
source:
uri: git@gitlab.eng.vmware.com:source-insight-tooling/norsk-to-osspi.git
private_key: *gitlab_norsk_to_osspi_deploy_key
branch: main

- name: image-cryogenics-essentials
type: registry-image
icon: docker
Expand All @@ -215,7 +168,6 @@ resources:
username: _json_key
password: *gcr_viewer_key


- name: golang-release
type: git
icon: tag
Expand Down Expand Up @@ -461,20 +413,6 @@ resources:
namespace: official
name: cfd

- name: osl
type: osm
source:
product: p-bosh-backup-and-restore
api_key: *osm_api_key

- name: p-bosh-backup-and-restore
type: pivnet
source:
api_token: *pivnet_admin_api_token
product_slug: p-bosh-backup-and-restore
copy_metadata: false
verbose: false

jobs:
- name: system-test-director
serial: true
Expand Down Expand Up @@ -1232,281 +1170,3 @@ jobs:
popd
done
popd
- name: osspi-bosh-backup-and-restore
serial: true
plan:
- in_parallel:
- get: norsk-to-osspi
- get: main
params: { submodules: all }
trigger: true
- task: single-package-for-repo
file: norsk-to-osspi/tasks/osspi/run-single-package-for-repo.yaml
input_mapping:
repo1: norsk-to-osspi
repo2: main
params:
REPO: repo2
OSM_ENVIRONMENT: production
OSM_PACKAGE_GROUP_NAME: 'bosh-backup-and-restore-release'
OSM_PACKAGE_GROUP_VERSION: 'Latest'
API_KEY: *osm_api_key_token
USERNAME: *osm_username
PRODUCT: 'p-bosh-backup-and-restore'
VERSION: 'Latest'

- name: upload-to-tanzunet
serial: true
plan:
- in_parallel:
- get: release-version
- get: bbr-release
trigger: true
params:
globs:
- bbr-*
- get: image-cryogenics-essentials
- load_var: version-number
file: release-version/number
- task: create-pivnet-metadata
image: image-cryogenics-essentials
params:
DEBUG: true
config:
platform: linux
inputs:
- name: bbr-release
- name: release-version
outputs:
- name: release-metadata
run:
path: /bin/bash
args:
- -c
- |
[ -z "$DEBUG" ] || set -x
set -euo pipefail
: "${VERSION:="$(cat release-version/number)"}"
TODAY="$(date "+%Y-%m-%d")"
cat > release-metadata/release.yml <<EOF
---
release:
version: "$VERSION"
release_type: Maintenance Release
eula_slug: vmware_eula
description: |
BOSH Backup and Restore binary and S3 Config Validator
BBR can be used to back up and restore many bosh releases and bosh directors. This includes TAS, and the bosh director that ships with Ops Manager. You should always use the latest version of the BBR CLI to back up and restore from any version of Ops Manager or TAS.
If you are upgrading TAS, we recommend you take a backup immediately before upgrading, and immediately after a successful upgrade. This is because backups from the old version of TAS may not be compatible with the new version of TAS.
release_notes_url: https://docs.pivotal.io/bbr/bbr-rn.html
availability: Admins Only
release_date: "$TODAY"
dependency_specifiers: []
product_files:
- file: bbr-release/bbr-${VERSION}.tar
upload_as: BOSH Backup and Restore
description: |
BBR and BBR-s3-config-validator binaries for Linux and Darwin.
file_type: "Software"
docs_url: "https://docs.pivotal.io/bbr/index.html"
platforms: ["Linux", "Darwin"]
included_files: ["bbr", "bbr-mac", "checksum256", "bbr-s3-config-validator", "bbr-s3-config-validator.README.md"]
- file: bbr-release/bbr-${VERSION}-linux-amd64
upload_as: BOSH Backup and Restore Linux
description: |
BBR binary for Linux
file_type: "Software"
docs_url: "https://docs.pivotal.io/bbr/index.html"
platforms: ["Linux"]
- file: bbr-release/bbr-${VERSION}-darwin-amd64
upload_as: BOSH Backup and Restore Darwin
description: |
BBR binary for Darwin
file_type: "Software"
docs_url: "https://docs.pivotal.io/bbr/index.html"
platforms: ["Darwin"]
- file: bbr-release/bbr-s3-config-validator-${VERSION}-linux-amd64
upload_as: BOSH Backup and Restore S3 Configuration Validator Linux
description: |
BBR-s3-config-validator binary for Linux
file_type: "Software"
docs_url: "https://docs.pivotal.io/bbr/index.html"
platforms: ["Linux"]
- file: bbr-release/bbr-s3-config-validator-${VERSION}.README.md
upload_as: BOSH Backup and Restore S3 Configuration Validator README
description: |
BBR-s3-config-validator README
file_type: "Documentation"
docs_url: "https://docs.pivotal.io/bbr/index.html"
platforms: ["Linux"]
EOF
[ -z "$DEBUG" ] || cat release-metadata/*
- put: p-bosh-backup-and-restore
params:
metadata_file: release-metadata/release.yml
s3_filepath_prefix: product-files/bosh-backup-restore
file_glob: bbr-release/bbr-*[^.sha256]
override: true

- name: request-osl
plan:
- get: p-bosh-backup-and-restore
trigger: true
passed:
- upload-to-tanzunet
- load_var: pivnet-metadata
file: p-bosh-backup-and-restore/metadata.yaml
format: yaml
- get: release-version
params:
bump: final
#! Hack to convert number to string in YAML
build: |
((.:pivnet-metadata.release.id))
build_without_version: true
passed:
- upload-to-tanzunet
- load_var: version
file: release-version/number
format: trim
- put: osl
params:
version: ((.:version))
user: *osm_username
cc_list: *osm_cc_list
license: VMW_Proprietary
release_type: GA
associated_bossd_release: 400400894

- name: alert-team-on-release-creation
plan:
- in_parallel:
- get: cryogenics-ci
- get: every-day
trigger: true
- get: p-bosh-backup-and-restore
passed:
- request-osl
- get: image-cryogenics-essentials
- load_var: pivnet-metadata
file: p-bosh-backup-and-restore/metadata.yaml
format: yaml
- get: release-version
params:
bump: final
#! Hack to convert number to string in YAML
build: |
((.:pivnet-metadata.release.id))
build_without_version: true
passed:
- request-osl
- load_var: version
file: release-version/number
format: trim
- try:
do:
- task: check-if-clone-request-has-been-approved
image: image-cryogenics-essentials
file: cryogenics-ci/release-automation/check-if-clone-request-has-been-approved/task.yml
params:
VERSION: ((.:version))
OSM_API_KEY: *osm_api_key
PRODUCT_NAME: p-bosh-backup-and-restore
- load_var: osm-release-id
file: osm/release_id
format: trim
- put: gchat-cryo-notification
params:
text: |
*p-bosh-backup-and-restore:* The OSM team have validated the cloning request for `((.:version))`.
Next steps <users/all>:
1. Follow the <https://osm.eng.vmware.com/oss/#/release/((.:osm-release-id))|link> to generate the OSL.
- name: publish
serial: true
plan:
- in_parallel:
#! We have added this step just to be able to place the publish job in the
#! end of the pipeline because we wanted to use a time dimension to
#! represent the flow (therefore this job should be the last).
- get: p-bosh-backup-and-restore
passed:
- request-osl
- get: osl
trigger: true
- get: image-cryogenics-essentials
- load_var: osl-metadata
file: osl/metadata.json
format: json
- task: create-pivnet-metadata
image: image-cryogenics-essentials
params:
VERSION: ((.:osl-metadata.version))
DEBUG: true
config:
platform: linux
inputs:
- name: osl
outputs:
- name: release-metadata

run:
path: /bin/bash
args:
- -c
- |
[ -z "$DEBUG" ] || set -x
set -euo pipefail
: "${VERSION:?}"
: "${BUILD_METADATA:="${VERSION/${VERSION%+*}/}"}"
if [ -z "$BUILD_METADATA" ]
then
>&2 cat <<EOF
It seems the OSL Release Version \"$VERSION\" does not contain the Pivnet Release ID in its build metadata.
A version format similar to \"1.2.3+456\" was expected where \"456\" it the Pivnet Release ID.
This is required so that the OSL file can be attached to the right release.
Maybe you might want to manually attach the OSL to the Pivnet Release this time round?
EOF
exit 1
fi
cat > release-metadata/existing-release.yml << EOF
existing_release:
id: ${BUILD_METADATA/+/}
product_files:
- file: osl/download/open_source_license_bosh_backup_and_restore_${VERSION}_ga.txt
file_type: Open Source License
file_version: ${VERSION}
- file: osl/download/vmware_p_bosh_backup_and_restore_${VERSION}_odp.tar.gz
file_type: Open Source License
file_version: ${VERSION}
EOF
[ -z "$DEBUG" ] || cat release-metadata/*
- put: p-bosh-backup-and-restore
params:
file_glob: osl/download/*
metadata_file: release-metadata/existing-release.yml
s3_filepath_prefix: product-files/bosh-backup-restore
- put: gchat-cryo-notification
params:
text: |
*p-bosh-backup-and-restore:* The OSL and ODP files for version `((.:osl-metadata.version))` have been uploaded to Tanzunet!
Next steps <users/all>:
1. make the release publicly available on <https://network.pivotal.io/products/p-bosh-backup-and-restore|Tanzunet>

0 comments on commit a93191c

Please sign in to comment.