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

feat(release): publish JSII Python Artifacts to AWS CodeArtifact #3475

Merged
merged 5 commits into from
Mar 25, 2024

Conversation

timothymathison
Copy link
Contributor

Makes pypi publisher job support targeting AWS CodeArtifact. Re-uses the CodeArtifactOptions already added to support publishing of NPM packages to CodeArtifact.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Comment on lines +538 to +539
name: "Generate CodeArtifact Token",
run: `echo "TWINE_PASSWORD=$(aws codeartifact get-authorization-token --domain ${domain} --domain-owner ${account} --region ${region} --query authorizationToken --output text)" >> $GITHUB_ENV`,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately publib does not natively support codeartifact for python like it does for npm. So had to add this step.

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 95.40230% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 96.32%. Comparing base (41a2b73) to head (5c3d5fd).
Report is 1 commits behind head on main.

Files Patch % Lines
src/release/publisher.ts 95.40% 4 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3475   +/-   ##
=======================================
  Coverage   96.32%   96.32%           
=======================================
  Files         191      191           
  Lines       37407    37485   +78     
  Branches     3489     3500   +11     
=======================================
+ Hits        36032    36108   +76     
- Misses       1375     1377    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

* @param url Of code artifact domain
* @returns domain, account, and region of code artifact domain
*/
export function awsCodeArtifactInfoFromUrl(url?: string): AwsCodeArtifactInfo {
Copy link
Contributor

Choose a reason for hiding this comment

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

No need for this to be exported.

Suggested change
export function awsCodeArtifactInfoFromUrl(url?: string): AwsCodeArtifactInfo {
function awsCodeArtifactInfoFromUrl(url?: string): AwsCodeArtifactInfo {

/**
* Info extracted from AWS CodeArtifact URL
*/
export interface AwsCodeArtifactInfo {
Copy link
Contributor

Choose a reason for hiding this comment

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

No need for this to be exported and part of the public API.

Suggested change
export interface AwsCodeArtifactInfo {
interface AwsCodeArtifactInfo {

Copy link
Contributor

@mrgrain mrgrain left a comment

Choose a reason for hiding this comment

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

Couple of minor changes. Note that removing the export will also require an update the the generated docs again.

@mrgrain mrgrain changed the title feat: Support Publishing of JSII Python Artifacts to AWS CodeArtifact feat(release): support publishing of JSII Python Artifacts to AWS CodeArtifact Mar 25, 2024
@mrgrain mrgrain changed the title feat(release): support publishing of JSII Python Artifacts to AWS CodeArtifact feat(release): publish JSII Python Artifacts to AWS CodeArtifact Mar 25, 2024
Copy link
Contributor

@mrgrain mrgrain left a comment

Choose a reason for hiding this comment

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

Nice one! This was long overdue

@mergify mergify bot merged commit cf67e86 into projen:main Mar 25, 2024
14 checks passed
@timothymathison timothymathison deleted the codeartifact-pipy-support branch March 25, 2024 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants