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

NH-82783: add jar signing using signpath.io for for GitHub release. #251

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

cleverchuk
Copy link
Contributor

@cleverchuk cleverchuk commented Aug 1, 2024

We're integrating signpath.io jar signing feature into the build pipeline. This PR adds a job that sends a signing request to signpath.io then waits for the processing to complete by polling the signing request data endpoint every 5 seconds. Once the endpoint responds with final status of the signing request, we proceed to downloading the signed jar. We either failing to download the signed jar which will fail the job or we succeed which will cause the job to continue to the next step of uploading the signed jar to GitHub release. This job has an implicit dependency on the github_release job and should be run after the github_release has completed. This implicit dependency will be turned into an explicit one in a follow-on PR.

@cleverchuk cleverchuk requested a review from a team as a code owner August 1, 2024 19:30
Copy link
Contributor

@cheempz cheempz left a comment

Choose a reason for hiding this comment

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

Thanks @cleverchuk! had a question and a comment :)

echo "Status -> $status_state"

sleep 5
done
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we should have a max retry in the above loop, so that any signing service issues/outages do not hold up release process, we just won't have the signed version of the jar.

And to be safe, how about we only download the jar when status is "Completed"?

Copy link
Contributor Author

@cleverchuk cleverchuk Aug 2, 2024

Choose a reason for hiding this comment

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

I wonder if we should have a max retry in the above loop, so that any signing service issues/outages do not hold up release process, we just won't have the signed version of the jar.

Turned it into a separate job. Added the -f flag which fails the job on server issue

And to be safe, how about we only download the jar when status is "Completed"?

It looks like it's not necessary because it's a separate job now?

SIGN_PATH_SIGNING_POLICY: ${{ secrets.SIGN_PATH_SIGNING_POLICY }}
SIGN_PATH_ORG_ID: ${{ secrets.SIGN_PATH_ORG_ID }}
SIGN_PATH_ARTIFACT_SLUG: ${{ secrets.SIGN_PATH_ARTIFACT_SLUG }}

Copy link
Contributor

Choose a reason for hiding this comment

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

Were these set based on info in Keeper? Wondering if the Keeper entry is updated, or even still needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, they were excluding SIGN_PATH_ARTIFACT_SLUG which doesn't exist there(or I missed it 🤷‍♂️ ).

Copy link
Contributor

@cheempz cheempz left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the revisit @cleverchuk!

@cleverchuk cleverchuk merged commit 74c2544 into main Aug 5, 2024
11 checks passed
@cleverchuk cleverchuk deleted the cc/NH-82783 branch August 5, 2024 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants