This repository has been archived by the owner on Mar 18, 2024. It is now read-only.
Release 6402060693 / main #863
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This pipeline builds the sfpowerscripts & sfp cli plugin | |
# Needs following secrets | |
# NPM_TOKEN : Token to npm.js for dx@scale scope | |
# DOCKER_USERNAME : Token to username for ghcr.io for publishing docker | |
# DOCKER_SECRET: Password/Token for ghcr.io for publishing docker | |
# | |
# Needs the following env vars | |
# The repo name (for docker registry) has to be set in each job due to a limitiation with github actions | |
# as global vars (non secrets) cant be passed down to other jobs | |
name: 'Release' | |
on: | |
push: | |
branches: | |
- main | |
- feat/docker-test | |
paths-ignore: | |
- 'docs/**' | |
- '**.md' | |
- 'decision records/**' | |
- 'demoreel/**' | |
- 'prerequisites/**' | |
workflow_dispatch: | |
run-name: Release ${{ github.run_id }} / ${{ github.ref_name }} | |
# Merge to Develop, create builds | |
jobs: | |
build: | |
name: 'build packages' | |
uses: ./.github/workflows/buildPackages.yml | |
with: | |
version: ${{ github.ref }} | |
publish: true | |
environment: build | |
secrets: | |
npm-token: ${{ secrets.NPM_TOKEN }} | |
# On successfull creation of packages,(or even if lerna skips), create docker image | |
build-docker: | |
name: 'build docker image' | |
uses: ./.github/workflows/sfpowerscripts-build-docker.yml | |
with: | |
job-environment: 'build-docker' | |
suffix-tag: ${{ github.run_id }} | |
repo: 'dxatscale' | |
image: 'sfpowerscripts-rc' | |
secrets: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
token: ${{ secrets.DOCKER_SECRET }} | |
needs: [ build ] | |
#Promotion Stages | |
# Sfpowercripts | |
sfpowerscripts-alpha: | |
name: 'sfpowerscripts alpha' | |
uses: ./.github/workflows/promotePackage.yml | |
with: | |
version: 'alpha' | |
pathToPackageJson: 'packages/sfpowerscripts-cli/package.json' | |
environment: sfpowerscripts-alpha | |
secrets: | |
npm-token: ${{ secrets.NPM_TOKEN }} | |
needs: [ build ] | |
alpha-docker: | |
name: 'promote docker to alpha' | |
uses: ./.github/workflows/sfpowerscripts-promote-docker.yml | |
with: | |
job-environment: 'sfpowerscripts-alpha-docker' | |
repo: 'dxatscale' | |
new-tag: alpha | |
image: 'sfpowerscripts-rc' | |
secrets: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
token: ${{ secrets.DOCKER_SECRET }} | |
needs: [ build-docker ] | |
sfpowerscripts-beta: | |
name: 'sfpowerscripts beta' | |
uses: ./.github/workflows/promotePackage.yml | |
with: | |
version: 'beta' | |
pathToPackageJson: 'packages/sfpowerscripts-cli/package.json' | |
environment: sfpowerscripts-beta | |
secrets: | |
npm-token: ${{ secrets.NPM_TOKEN }} | |
needs: [ build ] | |
beta-docker: | |
name: 'promote docker to beta' | |
uses: ./.github/workflows/sfpowerscripts-promote-docker.yml | |
with: | |
job-environment: 'sfpowerscripts-beta-docker' | |
repo: 'dxatscale' | |
new-tag: beta | |
image: 'sfpowerscripts-rc' | |
secrets: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
token: ${{ secrets.DOCKER_SECRET }} | |
needs: [ build-docker ] | |
sfpowerscripts-prod: | |
name: 'sfpowerscripts prod' | |
uses: ./.github/workflows/promotePackage.yml | |
with: | |
version: 'latest' | |
pathToPackageJson: 'packages/sfpowerscripts-cli/package.json' | |
environment: sfpowerscripts-prod | |
secrets: | |
npm-token: ${{ secrets.NPM_TOKEN }} | |
needs: [ build ] | |
sfp-prod: | |
name: 'sfp prod' | |
uses: ./.github/workflows/promotePackage.yml | |
with: | |
version: 'latest' | |
pathToPackageJson: 'packages/sfp-cli/package.json' | |
environment: sfp-prod | |
secrets: | |
npm-token: ${{ secrets.NPM_TOKEN }} | |
needs: [ build ] | |
prod-docker: | |
name: 'copy rc docker to prod' | |
uses: ./.github/workflows/sfpowerscripts-copy-docker.yml | |
with: | |
job-environment: 'sfpowerscripts-prod-docker' | |
secrets: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
token: ${{ secrets.DOCKER_SECRET }} | |
signing_secret: ${{ secrets.SIGNING_SECRET }} | |
cosign_password: ${{ secrets.COSIGN_PASSWORD }} | |
needs: [ build-docker ] | |