You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Being able to publish designated libs to package managers would be very useful.
For instance, if I had a monorepo as such:
A
|- B (py)
|- C (java)
|- D (ts)
|- E (ts)
If I wanted to say publish packages B, C and D to CodeArtifact we should support the following config on the PDKPipeline:
interfacePublishConfig{packagesToPublish?: string[];}interfaceCodeArtifactPublishConfigextendsPublishConfig{codeArtifactArn?: string;// If this is set, all other options are ignoredauthTokenSecretArn?: string;// defaults to a generated secret with the token pre-initializedauthTokenRotation?: boolean;// defaults to truedomainName: string;domainOwner?: string;//defaults to pipeline accountrepositoryName: string;}newpdk_pipeline.PDKPipeline(this,'ApplicationPipeline',{primarySynthDirectory: 'packages/infra/cdk.out',repositoryName: 'monorepo',publishAssetsInParallel: false,crossAccountKeys: true,synth: {},publishConfig: {codeArtifactPublishConfig: {domainName: '<domain>',repositoryName: '<repo-name>',packagesToPublish: ['B','C','D']},}});
In this instance, the Pipeline is configured to publish artifacts to a a new CodeArtifact. In terms of how this would work, a high level algorithm is as follows:
Scan the repo based on the packagesToPublish to identify candidate packages for publishing. (Not sure if we should fail silently or loudly if a package is listed for publishing which is not supported i.e: GO)
Generate a .versionrc file in the root with a list of bumpFiles.
bump the versions by using standard-version. We will need to potentially write custom updates for languages like python or java as we will need to update pom.xml and *.toml
build all packages so that a dist dir is created in each package
unbump all packages that were previously bumped
run git diff --ignore-space-at-eol --exit-code (this makes sure src is identical to how it was before we bumped)
Use npx publlib to publish each package
This can later be extended to have MavenPublishConfig, PyPiPublishConfig, etc.
The text was updated successfully, but these errors were encountered:
This issue is now marked as stale because it hasn't seen activity for a while. Add a comment or it will be closed soon. If you wish to exclude this issue from being marked as stale, add the "backlog" label.
Being able to publish designated libs to package managers would be very useful.
For instance, if I had a monorepo as such:
If I wanted to say publish packages B, C and D to CodeArtifact we should support the following config on the PDKPipeline:
In this instance, the Pipeline is configured to publish artifacts to a a new CodeArtifact. In terms of how this would work, a high level algorithm is as follows:
packagesToPublish
to identify candidate packages for publishing. (Not sure if we should fail silently or loudly if a package is listed for publishing which is not supported i.e: GO).versionrc
file in the root with a list of bumpFiles.pom.xml
and*.toml
dist
dir is created in each packagegit diff --ignore-space-at-eol --exit-code
(this makes sure src is identical to how it was before we bumped)npx publlib
to publish each packageThis can later be extended to have MavenPublishConfig, PyPiPublishConfig, etc.
The text was updated successfully, but these errors were encountered: