-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
removing notes to avoid failure in GHA printing GITHUB CONTEXT
- Loading branch information
1 parent
e1b4769
commit 435823b
Showing
114 changed files
with
2,816 additions
and
561 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- | ||
name: Documentation | ||
about: Update the documentation | ||
title: 'Documentation: ' | ||
labels: 'alert: NEED ACCOUNT KEY, alert: NEED MORE DEFINITION, alert: NEED CYCLE ASSIGNMENT, type: documentation' | ||
assignees: '' | ||
|
||
--- | ||
|
||
*Replace italics below with details for this issue.* | ||
|
||
## Describe the Task ## | ||
*Provide a description of the task here.* | ||
|
||
### Time Estimate ### | ||
*Estimate the amount of work required here.* | ||
*Issues should represent approximately 1 to 3 days of work.* | ||
|
||
### Sub-Issues ### | ||
Consider breaking the task down into sub-issues. | ||
- [ ] *Add a checkbox for each sub-issue here.* | ||
|
||
### Relevant Deadlines ### | ||
*List relevant project deadlines here or state NONE.* | ||
|
||
### Funding Source ### | ||
*Define the source of funding and account keys here or state NONE.* | ||
|
||
## Define the Metadata ## | ||
|
||
### Assignee ### | ||
- [ ] Select appropriate **assignee** for this issue | ||
|
||
### Labels ### | ||
- [ ] Review default **alert** labels | ||
- [ ] Select **component(s)** | ||
- [ ] Select **priority** | ||
- [ ] Select **requestor(s)** | ||
|
||
### Milestone and Projects ### | ||
- [ ] Select **Milestone** as a **METplus-Wrappers-X.Y.Z** version, **Consider for Next Release**, or **Backlog of Development Ideas** | ||
- [ ] For a **METplus-Wrappers-X.Y.Z** version, select the **METplus-Wrappers-X.Y.Z Development** project | ||
|
||
## Define Related Issue(s) ## | ||
Consider the impact to the other METplus components. | ||
- [ ] [METplus](https://github.com/dtcenter/METplus/issues/new/choose), [MET](https://github.com/dtcenter/MET/issues/new/choose), [METdataio](https://github.com/dtcenter/METdataio/issues/new/choose), [METviewer](https://github.com/dtcenter/METviewer/issues/new/choose), [METexpress](https://github.com/dtcenter/METexpress/issues/new/choose), [METcalcpy](https://github.com/dtcenter/METcalcpy/issues/new/choose), [METplotpy](https://github.com/dtcenter/METplotpy/issues/new/choose) | ||
|
||
## Task Checklist ## | ||
See the [METplus Workflow](https://metplus.readthedocs.io/en/latest/Contributors_Guide/github_workflow.html) for details. | ||
- [ ] Complete the issue definition above, including the **Time Estimate** and **Funding Source**. | ||
- [ ] Fork this repository or create a branch of **develop**. | ||
Branch name: `feature_<Issue Number>_<Description>` | ||
- [ ] Complete the development and test your changes. | ||
- [ ] Add/update log messages for easier debugging. | ||
- [ ] Add/update unit tests. | ||
- [ ] Add/update documentation. | ||
- [ ] Add any new Python packages to the [METplus Components Python Requirements](https://metplus.readthedocs.io/en/develop/Users_Guide/appendixA.html#metplus-components-python-packages) table. | ||
- [ ] For any new datasets, an entry to the [METplus Verification Datasets Guide](https://metplus.readthedocs.io/en/latest/Verification_Datasets/index.html). | ||
- [ ] Push local changes to GitHub. | ||
- [ ] Submit a pull request to merge into **develop**. | ||
Pull request: `feature <Issue Number> <Description>` | ||
- [ ] Define the pull request metadata, as permissions allow. | ||
Select: **Reviewer(s)** and **Development** issue | ||
Select: **Milestone** as the next official version | ||
Select: **METplus-Wrappers-X.Y.Z Development** project for development toward the next official release | ||
- [ ] Iterate until the reviewer(s) accept and merge your changes. | ||
- [ ] Delete your fork or branch. | ||
- [ ] Close this issue. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#!/bin/bash | ||
|
||
# assumes SOURCE_BRANCH is set before calling script | ||
|
||
source "${GITHUB_WORKSPACE}"/.github/jobs/bash_functions.sh | ||
|
||
dockerhub_repo=dtcenter/metplus | ||
dockerhub_repo_analysis=dtcenter/metplus-analysis | ||
|
||
# check if tag is official or bugfix release -- no -betaN or -rcN suffix | ||
is_official=1 | ||
if [[ "${SOURCE_BRANCH}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then | ||
is_official=0 | ||
fi | ||
|
||
# remove v prefix | ||
metplus_version=${SOURCE_BRANCH:1} | ||
|
||
# Get MET tag and adjust MET Docker repo if develop | ||
met_tag=$("${GITHUB_WORKSPACE}"/metplus/component_versions.py -v "${metplus_version}" -o MET -f "{X}.{Y}-latest" --no-get_dev_version) | ||
echo "$met_tag" | ||
|
||
MET_DOCKER_REPO=met | ||
if [ "$met_tag" == "develop" ]; then | ||
MET_DOCKER_REPO=met-dev | ||
fi | ||
|
||
# get METplus Analysis tool versions | ||
METDATAIO_VERSION=$("${GITHUB_WORKSPACE}"/metplus/component_versions.py -v "${metplus_version}" -o METdataio) | ||
METCALCPY_VERSION=$("${GITHUB_WORKSPACE}"/metplus/component_versions.py -v "${metplus_version}" -o METcalcpy) | ||
METPLOTPY_VERSION=$("${GITHUB_WORKSPACE}"/metplus/component_versions.py -v "${metplus_version}" -o METplotpy) | ||
|
||
# Build metplus image | ||
METPLUS_IMAGE_NAME=${dockerhub_repo}:${metplus_version} | ||
if ! time_command docker build -t "$METPLUS_IMAGE_NAME" \ | ||
--build-arg SOURCE_VERSION="$SOURCE_BRANCH" \ | ||
--build-arg MET_TAG="$met_tag" \ | ||
--build-arg MET_DOCKER_REPO="$MET_DOCKER_REPO" \ | ||
-f "${GITHUB_WORKSPACE}"/internal/scripts/docker/Dockerfile \ | ||
"${GITHUB_WORKSPACE}"; then | ||
exit 1 | ||
fi | ||
|
||
# Build metplus-analysis image | ||
METPLUS_A_IMAGE_NAME=${dockerhub_repo_analysis}:${metplus_version} | ||
if ! time_command docker build -t "$METPLUS_A_IMAGE_NAME" \ | ||
--build-arg METPLUS_BASE_TAG="${metplus_version}" \ | ||
--build-arg METDATAIO_VERSION="${METDATAIO_VERSION}" \ | ||
--build-arg METCALCPY_VERSION="${METCALCPY_VERSION}" \ | ||
--build-arg METPLOTPY_VERSION="${METPLOTPY_VERSION}" \ | ||
-f "${GITHUB_WORKSPACE}"/internal/scripts/docker/Dockerfile.metplus-analysis \ | ||
"${GITHUB_WORKSPACE}"; then | ||
exit 1 | ||
fi | ||
|
||
# if official release, create X.Y-latest tag as well | ||
if [ "${is_official}" == 0 ]; then | ||
LATEST_TAG=$(echo "$metplus_version" | cut -f1,2 -d'.')-latest | ||
docker tag "${METPLUS_IMAGE_NAME}" "${dockerhub_repo}:${LATEST_TAG}" | ||
docker tag "${METPLUS_A_IMAGE_NAME}" "${dockerhub_repo_analysis}:${LATEST_TAG}" | ||
echo LATEST_TAG="${LATEST_TAG}" >> "$GITHUB_OUTPUT" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/bash | ||
|
||
# assumes SOURCE_BRANCH is set before calling script | ||
# assumes latest_tag will be set if pushing an official or bugfix release | ||
|
||
source "${GITHUB_WORKSPACE}"/.github/jobs/bash_functions.sh | ||
|
||
# get names of images to push | ||
|
||
dockerhub_repo=dtcenter/metplus | ||
dockerhub_repo_analysis=dtcenter/metplus-analysis | ||
|
||
# remove v prefix | ||
metplus_version=${SOURCE_BRANCH:1} | ||
|
||
METPLUS_IMAGE_NAME=${dockerhub_repo}:${metplus_version} | ||
METPLUS_A_IMAGE_NAME=${dockerhub_repo_analysis}:${metplus_version} | ||
|
||
# skip docker push if credentials are not set | ||
if [ -z ${DOCKER_USERNAME+x} ] || [ -z ${DOCKER_PASSWORD+x} ]; then | ||
echo "DockerHub credentials not set. Skipping docker push" | ||
exit 0 | ||
fi | ||
|
||
echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin | ||
|
||
# push images | ||
|
||
if ! time_command docker push "${METPLUS_IMAGE_NAME}"; then | ||
exit 1 | ||
fi | ||
|
||
if ! time_command docker push "${METPLUS_A_IMAGE_NAME}"; then | ||
exit 1 | ||
fi | ||
|
||
# only push X.Y-latest tag if official or bugfix release | ||
# shellcheck disable=SC2154 | ||
if [ "${LATEST_TAG}" != "" ]; then | ||
if ! time_command docker push "${dockerhub_repo}:${LATEST_TAG}"; then | ||
exit 1 | ||
fi | ||
if ! time_command docker push "${dockerhub_repo_analysis}:${LATEST_TAG}"; then | ||
exit 1 | ||
fi | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.