Skip to content

Conversation

nbaillie
Copy link

Description:
This PR allows devs to run the gdk component publish command and restrict publishing new versions of the component only when changes are found in the Recipe or Artifact or both.
Feature is controlled by the only_on_change option in the publish section of the gdk config. e.g:
"publish": { "bucket": "ggv2artifacts", "region": "eu-west-2", "options": { "only_on_change": ["RECIPE","ARTIFACTS"] } }

This change necessary:
As if you use gdk component publish in a pipeline, you do not want to publish if there have been no changes. Currently it always publish and this leads to having a new version of the component for every pipeline run.

This change tested:

  • linting with make tests_unit and expanded to cover the new options.
  • Integ with make tests_integration and adapted to cover the new options.
  • linting with make tests_unit
  • Additional testing locally with a helloworld component via cli

Additional information:

  • Diff for Recipe is custom
  • Diff for Artifact uses Digest from latest published recipe version of component

Checklist:

  • Updated the README if applicable
  • Updated or added new unit tests
  • Updated or added new integration tests
  • Updated or added new end-to-end tests
  • If your code makes a remote network call, it was tested with a proxy
  • You confirm that the change is backwards compatible

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@nbaillie nbaillie changed the title feat:only_publish_on_change feat: only_publish_on_change Nov 18, 2024
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.

1 participant