-
Notifications
You must be signed in to change notification settings - Fork 5
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
DAS-2070 - Implement GitHub workflows CI/CD. #1
Conversation
@lyonthefrog - good catches. I made some changes in the latest commit to fix most of those:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have already commented on my successful tests and one issue that has already been resolved (sds's), so I approve this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found some typos that need to be fixed, a suggestion for extracting the changelog differently. But overall, this is looking great.
README.md
Outdated
Initially service Docker images will be hosted in AWS Elastic Container | ||
Registry (ECR). When this repository is migrated to the NASA GitHub | ||
organisation, service images will be published to ghcr.io, instead. | ||
The CI/CD for HyBIG is contained in GitHub workslofws in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CI/CD for HyBIG is contained in GitHub workslofws in the | |
The CI/CD for HyBIG is contained in GitHub worksflows in the |
README.md
Outdated
You can reach out to the maintainers of this repository via email: | ||
|
||
* [email protected] | ||
* [email protected] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* matthew.savioe@colorado.edu | |
* matthew.savoie@colorado.edu |
I don't love email, but I should be able to ignore it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gah! Sorry!
bin/extract-release-notes.sh
Outdated
|
||
CHANGELOG_FILE="CHANGELOG.md" | ||
VERSION_PATTERN="^## v" | ||
# Count number of versions in version file: | ||
number_of_versions=$(grep -c "${VERSION_PATTERN}" ${CHANGELOG_FILE}) | ||
|
||
if [ ${number_of_versions} -gt 1 ] | ||
then | ||
grep -B 9999 -m 2 "${VERSION_PATTERN}" ${CHANGELOG_FILE} | sed '$d' | sed '$d' | ||
else | ||
cat ${CHANGELOG_FILE} | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CHANGELOG_FILE="CHANGELOG.md" | |
VERSION_PATTERN="^## v" | |
# Count number of versions in version file: | |
number_of_versions=$(grep -c "${VERSION_PATTERN}" ${CHANGELOG_FILE}) | |
if [ ${number_of_versions} -gt 1 ] | |
then | |
grep -B 9999 -m 2 "${VERSION_PATTERN}" ${CHANGELOG_FILE} | sed '$d' | sed '$d' | |
else | |
cat ${CHANGELOG_FILE} | |
fi | |
# File name | |
CHANGELOG_FILE="CHANGELOG.md" | |
# Regular expression | |
VERSION_PATTERN="^## v" | |
# Read the file and extract text between the first two occurrences of the VERSION_PATTERN | |
result=$(awk "/$VERSION_PATTERN/{c++; if(c==2) exit;} c==1" "$CHANGELOG_FILE") | |
# Print the result | |
echo "$result" | grep -v "^#" |
What do you think? I suppose you'd have to update the comment too.
bin/extract-release-notes.sh
Outdated
# 2023-06-16: Created. | ||
# 2023-10-10: Copied from earthdata-varinfo repository to HOSS. | ||
# 2024-01-03: Copied from HOSS repository to the Swath Projector. | ||
# 2024-01-23: Copied from Swath Projector repository to HyBIG. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# 2024-01-23: Copied from Swath Projector repository to HyBIG. | |
# 2024-01-23: Copied and modified from Swath Projector repository to HyBIG. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@flamingbear - I think I fixed up all the typos and adopted all the changes you suggested. Thanks for catching all that.
There was a problem hiding this 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 updates
Description
This PR implements CI/CD to run the
unittest
suite for all PRs. It also adds a Docker image publication workflow for when changes are merged into themain
branch containing an update todocker/service_version.txt
.The workflows are essentially copies of those used in the HOSS and Swath Projector repositories.
Jira Issue ID
DAS-2070
Local Test Steps
It's probably good to check the
bin/build-image
,bin/build-test
andbin/run-test
scripts all work on your local machine (given the change in image name).You can also test this all works with Harmony locally:
bin/build-image
.packages/util/env-defaults
updateHYBIG_SERVICE_QUEUE_URLS
to use an image name ofghcr.io/nasa/harmony-browse-image-generator:latest
. (It should just be a case of replacingsds
withghcr.io/nasa
)services/harmony/env-defaults
update the HyBIG image:HYBIG_IMAGE=ghcr.io/nasa/harmony-browse-image-generator:latest
.npm run build-all
.bin/bootstrap-harmony
.HARMONY_HOST_URL='http:localhost:3000'
. The tests should run and complete.Things to look for on this PR itself:
PR Acceptance Checklist
(Already prepared for v1.0.0)CHANGELOG.md
updated to include high level summary of PR changes.(Already at 1.0.0)docker/service_version.txt
updated if publishing a release.Tests added/updated and passing.(No new tests needed)