Skip to content

Commit

Permalink
update 10.0 (#3119)
Browse files Browse the repository at this point in the history
  • Loading branch information
k80bowman authored Dec 4, 2024
2 parents ca4f120 + d323623 commit de474be
Show file tree
Hide file tree
Showing 14 changed files with 218 additions and 176 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/create-cli-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ on:

jobs:
check-for-moratorium:
if: fromJSON(inputs.isStableCandidate)
uses: ./.github/workflows/ctc.yml
if: ${{ fromJSON(inputs.isStableCandidate) }}
uses: ./.github/workflows/tps-check-lock.yml
secrets: inherit

get-version-channel:
needs: [check-for-moratorium]
runs-on: ubuntu-latest
outputs:
channel: ${{ steps.getVersion.outputs.channel }}
Expand All @@ -36,7 +38,7 @@ jobs:
path: './packages/cli/package.json'

publish-npm:
needs: [get-version-channel]
needs: [get-version-channel, check-for-moratorium]
# if NOT isStableCandidate confirm dist tag is in package.json version
if: fromJSON(needs.get-version-channel.outputs.isStableRelease) || (!fromJSON(inputs.isStableCandidate) && !!needs.get-version-channel.outputs.channel)
uses: ./.github/workflows/publish-npm.yml
Expand All @@ -46,12 +48,12 @@ jobs:
secrets: inherit

pack-upload:
needs: [ publish-npm ]
needs: [publish-npm, check-for-moratorium]
uses: ./.github/workflows/pack-upload.yml
secrets: inherit

promote:
needs: [get-version-channel, pack-upload]
needs: [get-version-channel, pack-upload, check-for-moratorium]
if: needs.pack-upload.result == 'success'
uses: ./.github/workflows/promote-release.yml
with:
Expand All @@ -61,8 +63,8 @@ jobs:
secrets: inherit

publish-docs:
needs: [ get-version-channel, promote ]
needs: [get-version-channel, promote, check-for-moratorium]
uses: ./.github/workflows/devcenter-doc-update.yml
with:
isStableRelease: ${{ fromJSON(needs.get-version-channel.outputs.isStableRelease) }}
isStableRelease: ${{ fromJSON(inputs.isStableCandidate) }}
secrets: inherit
68 changes: 0 additions & 68 deletions .github/workflows/ctc.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/devcenter-doc-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
update-devcenter-command-docs:
name: Update Devcenter command docs
runs-on: ubuntu-latest
if: fromJSON(inputs.isStableRelease)
if: ${{ fromJSON(inputs.isStableRelease) }}
steps:
- uses: actions/checkout@v4
- name: Use Node.js 16.x
Expand Down
16 changes: 4 additions & 12 deletions .github/workflows/promote-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,10 @@ jobs:
change-management:
needs: [ promote ]
if: fromJSON(inputs.isStableRelease)
runs-on: ubuntu-latest
environment: ChangeManagement
env:
TPS_API_APP_ID: ${{ secrets.TPS_API_APP_ID }}
TPS_API_RELEASE_ACTOR_EMAIL: ${{ secrets.TPS_API_RELEASE_ACTOR_EMAIL }}
TPS_API_STAGE: ${{ secrets.TPS_API_STAGE }}
TPS_API_TOKEN_PARAM: ${{ secrets.TPS_API_TOKEN_PARAM }}
TPS_API_URL_PARAM: ${{ secrets.TPS_API_URL_PARAM }}
steps:
- uses: actions/checkout@v4
- run: yarn --immutable --network-timeout 1000000
- run: ./scripts/postrelease/change_management
uses: ./.github/workflows/tps-record-release.yml
secrets: inherit
with:
isStableRelease: ${{ fromJSON(inputs.isStableRelease) }}

create-fig-autocomplete-pr:
if: fromJSON(inputs.isStableRelease)
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/start-gh-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ on:
- closed

jobs:
check-for-moratorium:
uses: ./.github/workflows/tps-check-lock.yml
secrets: inherit

get-source-branch-name:
needs: [check-for-moratorium]
# GHA does not provide short name for branch being merged in. This shortens it so we can validate it with startsWith()
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
Expand All @@ -22,7 +27,7 @@ jobs:
run: echo "sourceName=${GITHUB_HEAD_REF#refs/heads/}" >> $GITHUB_OUTPUT

start-release:
needs: [ get-source-branch-name ]
needs: [get-source-branch-name, check-for-moratorium]
if: startsWith(needs.get-source-branch-name.outputs.sourceName, 'release-')
uses: ./.github/workflows/tag-create-github-release.yml
secrets: inherit
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/tps-check-lock.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Check for moratorium

on: [workflow_dispatch, workflow_call]

jobs:
moratoriumCheck:
runs-on: ubuntu-latest
environment: ChangeManagement
steps:
# checkout required to get github.sha
- uses: actions/checkout@v3
- env:
TPS_API_TOKEN: ${{ secrets.TPS_API_TOKEN_PARAM }}
run: ./scripts/release/tps_check_lock cli ${{ github.sha }}
30 changes: 30 additions & 0 deletions .github/workflows/tps-record-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Publish release to Change Management

on:
workflow_dispatch:
inputs:
isStableCandidate:
type: boolean
description: Is this a stable/prod candidate?
required: true
default: false
workflow_call:
inputs:
isStableCandidate:
type: boolean
description: Is this a stable/prod candidate?
required: true
default: false

jobs:
publishToChangeManagement:
runs-on: ubuntu-latest
if: ${{ fromJSON(inputs.isStableCandidate) }}
environment: ChangeManagement
steps:
# checkout required to get github.sha
- uses: actions/checkout@v3
- env:
ACTOR_EMAIL: ${{ secrets.TPS_API_RELEASE_ACTOR_EMAIL
TPS_API_TOKEN: ${{ secrets.TPS_API_TOKEN_PARAM }}
run: ./scripts/postrelease/tps_record_release cli ${{ github.sha }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ node_modules

# TEMP
/packages/**/converted/*

tpsGetLock_response.txt
tpsRecordRelease_response.txt
2 changes: 1 addition & 1 deletion packages/cli/src/commands/git/remote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ extra arguments will be passed to git remote add
$ heroku git:remote -a example
# set git remote heroku-staging to https://git.heroku.com/example.git
$ heroku git:remote --remote heroku-staging -a example`
$ heroku git:remote --remote heroku-staging -a example-staging`

static flags = {
app: flags.string({char: 'a', description: 'the Heroku app to use'}),
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/global_telemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const provider = new NodeTracerProvider({
const headers = {Authorization: `Bearer ${process.env.IS_HEROKU_TEST_ENV !== 'true' ? getToken() : ''}`}

const exporter = new OTLPTraceExporter({
url: isDev ? 'https://backboard-staging.herokuapp.com/otel/v1/traces' : 'https://backboard.heroku.com/otel/v1/traces',
url: isDev ? 'https://backboard.staging.herokudev.com/otel/v1/traces' : 'https://backboard.heroku.com/otel/v1/traces',
headers,
compression: 'none',
})
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/test/unit/global_telemetry.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ describe('telemetry', function () {
const mockTelemetry = telemetry.setupTelemetry(mockConfig, mockOpts)
telemetry.initializeInstrumentation()

const honeycombAPI = nock(`${isDev ? 'https://backboard-staging.herokuapp.com/otel' : 'https://backboard.heroku.com/otel'}`)
const honeycombAPI = nock(`${isDev ? 'https://backboard.staging.herokudev.com/otel' : 'https://backboard.heroku.com/otel'}`)
.post('/v1/traces', identity)
.reply(200)

Expand Down
83 changes: 0 additions & 83 deletions scripts/postrelease/change_management

This file was deleted.

Loading

0 comments on commit de474be

Please sign in to comment.