Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Release|CI/CD] adjust release pipelines #6366

Merged
merged 24 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
7f0594a
add cutom token to be able to push to release branch
EgorPopelyaev Oct 22, 2024
cdf3ca7
adjsut git config
EgorPopelyaev Oct 22, 2024
a99cdf9
add gh auth
EgorPopelyaev Oct 22, 2024
928b61e
rename env to GITHUB_TOKEN
EgorPopelyaev Oct 22, 2024
3247be1
debug
EgorPopelyaev Oct 22, 2024
ab76c56
more dbug
EgorPopelyaev Oct 22, 2024
3524a54
test with explicit permissions
EgorPopelyaev Oct 22, 2024
8d73a4b
add REPO
EgorPopelyaev Oct 29, 2024
eee0fbd
use special token for checkout
EgorPopelyaev Oct 31, 2024
e053aa5
add token to the rc-automation
EgorPopelyaev Oct 31, 2024
679451c
change apply tag
EgorPopelyaev Oct 31, 2024
b93ce4c
add message to the git tag
EgorPopelyaev Oct 31, 2024
436cdf6
add permission for attestation
EgorPopelyaev Oct 31, 2024
134720d
more permissions
EgorPopelyaev Oct 31, 2024
6e686ca
do not use check from rel org
EgorPopelyaev Nov 4, 2024
a7fef6a
switch to the large runners
EgorPopelyaev Nov 1, 2024
2e10b8a
test a key for the commits signatures
EgorPopelyaev Nov 4, 2024
c8fc806
test from the current branch
EgorPopelyaev Nov 4, 2024
b0c9156
revert nack the test
EgorPopelyaev Nov 4, 2024
9caaaa5
Merge branch 'master' of https://github.com/paritytech/polkadot-sdk i…
EgorPopelyaev Nov 4, 2024
98f648f
update pgpkey secret name
EgorPopelyaev Nov 4, 2024
169e5ed
update pgpkms key secret name
EgorPopelyaev Nov 4, 2024
cc77724
cleanup
EgorPopelyaev Nov 5, 2024
df69ba9
Merge branch 'master' of https://github.com/paritytech/polkadot-sdk i…
EgorPopelyaev Nov 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/scripts/common/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,10 @@ function import_gpg_keys() {
EGOR="E6FC4D4782EB0FA64A4903CCDB7D3555DD3932D3"
MORGAN="2E92A9D8B15D7891363D1AE8AF9E6C43F7F8C4CF"
PARITY_RELEASES="90BD75EBBB8E95CB3DA6078F94A4029AB4B35DAE"
PARITY_RELEASES_SIGN_COMMITS="D8018FBB3F534D866A45998293C5FB5F6A367B51"

echo "Importing GPG keys from $GPG_KEYSERVER"
for key in $SEC $EGOR $MORGAN $PARITY_RELEASES; do
for key in $SEC $EGOR $MORGAN $PARITY_RELEASES $PARITY_RELEASES_SIGN_COMMITS; do
(
echo "Importing GPG key $key"
gpg --no-tty --quiet --keyserver $GPG_KEYSERVER --recv-keys $key
Expand Down
47 changes: 40 additions & 7 deletions .github/workflows/release-10_rc-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,46 @@ jobs:
- name: "RelEng: Polkadot Release Coordination"
room: '!cqAmzdIcbOFwrdrubV:parity.io'
environment: release
env:
PGP_KMS_KEY: ${{ secrets.PGP_KMS_SIGN_COMMITS_KEY }}
PGP_KMS_HASH: ${{ secrets.PGP_KMS_HASH }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}

steps:
- name: Install pgpkkms
run: |
# Install pgpkms that is used to sign commits
pip install git+https://github.com/paritytech-release/pgpkms.git@5a8f82fbb607ea102d8c178e761659de54c7af69

- name: Generate content write token for the release automation
id: generate_write_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.RELEASE_AUTOMATION_APP_ID }}
private-key: ${{ secrets.RELEASE_AUTOMATION_APP_PRIVATE_KEY }}
owner: paritytech-release

- name: Checkout sources
uses: actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc # v4.1.7
with:
fetch-depth: 0
token: ${{ steps.generate_write_token.outputs.token }}

- name: Import gpg keys
run: |
. ./.github/scripts/common/lib.sh

import_gpg_keys

- name: Config git
run: |
git config --global commit.gpgsign true
git config --global gpg.program /home/runner/.local/bin/pgpkms-git
git config --global user.name "ParityReleases"
git config --global user.email "[email protected]"
git config --global user.signingKey "D8018FBB3F534D866A45998293C5FB5F6A367B51"

- name: Compute next rc tag
# if: ${{ steps.get_rel_product.outputs.product == 'polkadot' }}
Expand Down Expand Up @@ -58,13 +92,12 @@ jobs:
fi

- name: Apply new tag
uses: tvdias/github-tagger@ed7350546e3e503b5e942dffd65bc8751a95e49d # v0.0.2
with:
# We can't use the normal GITHUB_TOKEN for the following reason:
# https://docs.github.com/en/actions/reference/events-that-trigger-workflows#triggering-new-workflows-using-a-personal-access-token
# RELEASE_BRANCH_TOKEN requires public_repo OAuth scope
repo-token: "${{ secrets.RELEASE_BRANCH_TOKEN }}"
tag: ${{ steps.compute_tag.outputs.new_tag }}
env:
GH_TOKEN: ${{ steps.generate_write_token.outputs.token }}
RC_TAG: ${{ steps.compute_tag.outputs.new_tag }}
run: |
git tag -s $RC_TAG -m "new rc tag $RC_TAG"
git push origin $RC_TAG

- name: Send Matrix message to ${{ matrix.channel.name }}
uses: s3krit/matrix-message-action@70ad3fb812ee0e45ff8999d6af11cafad11a6ecf # v0.0.3
Expand Down
24 changes: 15 additions & 9 deletions .github/workflows/release-branchoff-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,7 @@ on:
required: true

jobs:
check-workflow-can-run:
uses: paritytech-release/sync-workflows/.github/workflows/check-syncronization.yml@main


prepare-tooling:
needs: [check-workflow-can-run]
if: needs.check-workflow-can-run.outputs.checks_passed == 'true'
runs-on: ubuntu-latest
outputs:
node_version: ${{ steps.validate_inputs.outputs.node_version }}
Expand All @@ -45,7 +39,7 @@ jobs:
runs-on: ubuntu-latest
environment: release
env:
PGP_KMS_KEY: ${{ secrets.PGP_KMS_KEY }}
PGP_KMS_KEY: ${{ secrets.PGP_KMS_SIGN_COMMITS_KEY }}
PGP_KMS_HASH: ${{ secrets.PGP_KMS_HASH }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand All @@ -58,32 +52,42 @@ jobs:
# Install pgpkms that is used to sign commits
pip install git+https://github.com/paritytech-release/pgpkms.git@5a8f82fbb607ea102d8c178e761659de54c7af69

- name: Generate content write token for the release automation
id: generate_write_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.RELEASE_AUTOMATION_APP_ID }}
private-key: ${{ secrets.RELEASE_AUTOMATION_APP_PRIVATE_KEY }}
owner: paritytech-release

- name: Checkout sources
uses: actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc # v4.1.7
with:
ref: master
token: ${{ steps.generate_write_token.outputs.token }}

- name: Import gpg keys
run: |
. ./.github/scripts/common/lib.sh

import_gpg_keys


- name: Config git
run: |
git config --global commit.gpgsign true
git config --global gpg.program /home/runner/.local/bin/pgpkms-git
git config --global user.name "ParityReleases"
git config --global user.email "[email protected]"
git config --global user.signingKey "90BD75EBBB8E95CB3DA6078F94A4029AB4B35DAE"
git config --global user.signingKey "D8018FBB3F534D866A45998293C5FB5F6A367B51"

- name: Create stable branch
run: |
git checkout -b "$STABLE_BRANCH_NAME"
git show-ref "$STABLE_BRANCH_NAME"

- name: Bump versions, reorder prdocs and push stable branch
env:
GH_TOKEN: ${{ steps.generate_write_token.outputs.token }}
run: |
. ./.github/scripts/release/release_lib.sh

Expand All @@ -101,4 +105,6 @@ jobs:

reorder_prdocs $STABLE_BRANCH_NAME

gh auth setup-git

git push origin "$STABLE_BRANCH_NAME"
8 changes: 8 additions & 0 deletions .github/workflows/release-build-rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ jobs:
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
AWS_RELEASE_ACCESS_KEY_ID: ${{ secrets.AWS_RELEASE_ACCESS_KEY_ID }}
AWS_RELEASE_SECRET_ACCESS_KEY: ${{ secrets.AWS_RELEASE_SECRET_ACCESS_KEY }}
permissions:
id-token: write
attestations: write
contents: read

build-polkadot-parachain-binary:
needs: [validate-inputs]
Expand All @@ -72,3 +76,7 @@ jobs:
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
AWS_RELEASE_ACCESS_KEY_ID: ${{ secrets.AWS_RELEASE_ACCESS_KEY_ID }}
AWS_RELEASE_SECRET_ACCESS_KEY: ${{ secrets.AWS_RELEASE_SECRET_ACCESS_KEY }}
permissions:
id-token: write
attestations: write
contents: read
2 changes: 1 addition & 1 deletion .github/workflows/release-reusable-rc-buid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:

build-rc:
needs: [set-image]
runs-on: ubuntu-latest
runs-on: ubuntu-latest-m
environment: release
container:
image: ${{ needs.set-image.outputs.IMAGE }}
Expand Down
Loading