Skip to content

PHPC-2391: Update drivers tools to v2 #1573

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

Merged
merged 2 commits into from
Jun 4, 2024

Conversation

alcaeus
Copy link
Member

@alcaeus alcaeus commented Jun 4, 2024

PHPC-2391

This PR updates drivers-github-tools to v2 and makes the necessary adjustments. Alongside with those changes, this now removes the old fixed token in favour of generating a temporary token for the mongodb-dbx-release-bot app. The release commit and tags will be attributed to this bot in future, as it will be for other drivers.

I've tested these changes in my fork and applied the same configuration here. Note that once this PR is merged and we remove the old configuration, releases for 1.18 will no longer work!

@@ -8,10 +8,24 @@ on:

jobs:
build-pecl:
environment: release
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The environment safeguards credentials as they won't be available to other CI jobs. In addition to that, we can add extra checks to releases, e.g. requirements for reviews, time delays, etc.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name: "Create PECL package"
runs-on: "ubuntu-latest"
permissions:
id-token: write
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This permission is necessary so the new token can be generated.

Comment on lines -50 to -53
garasign_username: ${{ secrets.GRS_CONFIG_USER1_USERNAME }}
garasign_password: ${{ secrets.GRS_CONFIG_USER1_PASSWORD }}
artifactory_username: ${{ secrets.ARTIFACTORY_USER }}
artifactory_password: ${{ secrets.ARTIFACTORY_PASSWORD }}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are now automatically configured through the setup action.

Comment on lines +52 to +53
id-token: write
contents: write
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

id-token is necessary for the temporary token, contents in order to push the commit and tag.

Comment on lines -87 to -91
- name: "Set git author information"
run: |
git config user.name "${GIT_AUTHOR_NAME}"
git config user.email "${GIT_AUTHOR_EMAIL}"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is automatically done by the setup action.

garasign_password: ${{ secrets.GRS_CONFIG_USER1_PASSWORD }}
artifactory_username: ${{ secrets.ARTIFACTORY_USER }}
artifactory_password: ${{ secrets.ARTIFACTORY_PASSWORD }}
command: "$(pwd)/.github/workflows/commit-and-tag.sh ${{ env.PACKAGE_VERSION }} ${{ env.GPG_KEY_ID }} tag-message"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: the GPG key ID is no longer set in the environment but instead retrieved from the AWS secrets manager, and the setup action exposes it through an env var.

@alcaeus alcaeus requested a review from jmikola June 4, 2024 12:22
@jmikola
Copy link
Member

jmikola commented Jun 4, 2024

Note that once this PR is merged and we remove the old configuration, releases for 1.18 will no longer work!

Is this even a concern? IIRC, we never used the release automation to make a 1.18.x release.

Would it make sense to remove those workflow configs from the v1.18 branch if they can't be used?

@alcaeus
Copy link
Member Author

alcaeus commented Jun 4, 2024

Is this even a concern? IIRC, we never used the release automation to make a 1.18.x release.

Not really - I just wanted to leave the info somewhere.

Would it make sense to remove those workflow configs from the v1.18 branch if they can't be used?

We could - OTOH it would entail a manual merge-up to work around the automation.

@@ -8,10 +8,24 @@ on:

jobs:
build-pecl:
environment: release
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alcaeus alcaeus merged commit c5668a8 into mongodb:v1.19 Jun 4, 2024
72 of 73 checks passed
@alcaeus alcaeus deleted the update-drivers-tools-v2 branch June 4, 2024 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants