Skip to content

Commit

Permalink
Update develop-ref after #2769 and #2785 (#2788)
Browse files Browse the repository at this point in the history
removing notes to avoid failure in GHA printing GITHUB CONTEXT
  • Loading branch information
github-actions[bot] authored Nov 13, 2024
1 parent e1b4769 commit 435823b
Show file tree
Hide file tree
Showing 114 changed files with 2,816 additions and 561 deletions.
68 changes: 68 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation.md
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.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/enhancement_request.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Enhancement request
about: Improve something that it's currently doing
title: ''
title: 'Enhancement: '
labels: 'alert: NEED ACCOUNT KEY, alert: NEED MORE DEFINITION, alert: NEED CYCLE ASSIGNMENT, type: enhancement'
assignees: ''

Expand Down
62 changes: 62 additions & 0 deletions .github/jobs/docker_build_metplus_images.sh
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
46 changes: 46 additions & 0 deletions .github/jobs/docker_push_metplus_images.sh
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
3 changes: 2 additions & 1 deletion .github/jobs/docker_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ echo "TIMING: docker pull ${DOCKERHUB_TAG} took `printf '%02d' $(($duration / 60
# set DOCKERFILE_PATH that is used by docker hook script get_met_version
export DOCKERFILE_PATH=${GITHUB_WORKSPACE}/internal/scripts/docker/Dockerfile

MET_TAG=`${GITHUB_WORKSPACE}/internal/scripts/docker/hooks/get_met_version`
metplus_version=$(head -n 1 "${GITHUB_WORKSPACE}/metplus/VERSION")
MET_TAG=$("${GITHUB_WORKSPACE}"/metplus/component_versions.py -v "${metplus_version}" -o MET -f "{X}.{Y}-latest" --no-get_dev_version)

MET_DOCKER_REPO=met-dev
if [ "${MET_TAG}" != "develop" ]; then
Expand Down
Loading

0 comments on commit 435823b

Please sign in to comment.