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

Support a config field for adding/updating link to source project tree #107

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

patrasap0908
Copy link

@patrasap0908 patrasap0908 commented Mar 27, 2021

This PR adds support for a configuration field that'll cause the screwdrivercd_version utility to add/update the link to the current build's source project tree using the associated commit's SHA-1 hash in the package's metadata.

Description

Defined a new configuration field named link_to_project and leveraged existing functions to read the value of the field from the config file. Generated the link to the associated source project tree using Screwdriver's environment variables, SCM_URL and SD_BUILD_SHA. It sets link_to_project = "${SCM_URL} + '/tree/' + ${SD_BUILD_SHA}" in the package's metadata.

Related Issue

#43

Motivation and Context

This feature adds a link to the source project tree to the metadata for every new package version for improved tracking and visibility.

How Has This Been Tested?

Unit tests have been added to tests/test_versioners.py.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

License

I confirm that this contribution is made under a Apache 2.0 license and that I have the authority necessary to make this contribution on behalf of its copyright owner.

@patrasap0908
Copy link
Author

@dwighthubbard, let me know if this is what you had in mind.

@patrasap0908 patrasap0908 changed the title Support a config field for adding/updating link to build-triggering commit Support a config field for adding/updating link to source project tree Mar 27, 2021
@patrasap0908 patrasap0908 marked this pull request as ready for review March 27, 2021 16:51
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

1 participant