diff --git a/.github/jobs/docker_setup.sh b/.github/jobs/docker_setup.sh index 47116c0232..8cab9ad44d 100755 --- a/.github/jobs/docker_setup.sh +++ b/.github/jobs/docker_setup.sh @@ -43,10 +43,13 @@ elif [ "${EXTERNAL_TRIGGER}" == "true" ]; then MET_TAG=${MET_TAG}-lite fi -# if MET_FORCE_TAG variable is set and not empty, use that version instead -if [ ! -z "$MET_FORCE_TAG" ]; then - MET_TAG=$MET_FORCE_TAG - MET_DOCKER_REPO=met +# if SET_MET_IMAGE variable is set and not empty, use that version instead +# format is : where the repo used is dtcenter/ and +# the tag used is , e.g. met:11.1.0 uses dtcenter/met:11.1.0 +if [ ! -z "$SET_MET_IMAGE" ]; then + force_info=(${SET_MET_IMAGE//:/ }) + MET_DOCKER_REPO=${force_info[0]} + MET_TAG=${force_info[1]} fi echo Using MET_DOCKER_REPO=$MET_DOCKER_REPO diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 556efb70c6..aff2d9a496 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -99,7 +99,7 @@ jobs: DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} EXTERNAL_TRIGGER: ${{ needs.job_control.outputs.external_trigger }} - #MET_FORCE_TAG: 11.0.0 + #SET_MET_IMAGE: met:11.0.0 update_data_volumes: name: Docker Setup - Update Data Volumes diff --git a/docs/Contributors_Guide/continuous_integration.rst b/docs/Contributors_Guide/continuous_integration.rst index 996e93c98d..e404247273 100644 --- a/docs/Contributors_Guide/continuous_integration.rst +++ b/docs/Contributors_Guide/continuous_integration.rst @@ -96,6 +96,8 @@ was saved as a GitHub Secret. Testing Workflow ================ +The testing workflow file is found in **.github/workflows/testing.yml**. + Name ---- @@ -470,7 +472,7 @@ Create/Update METplus Docker Image env: DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - #MET_FORCE_TAG: 10.0.0 + #SET_MET_IMAGE: met:10.0.0 This job calls the **docker_setup.sh** script. This script builds a METplus Docker image and pushes it to DockerHub. @@ -496,15 +498,35 @@ development testing. If testing is done on a stable release, then the corresponding MET stable release will be used. However, there may be an instance where a change in MET breaks something in another METplus component, i.e. METplotpy or METviewer, until a corresponding change is made to that -component. If this occurs then some of the METplus use cases may break. To -allow the tests to run successfully in the meantime, an option was added to -force the version of the MET tag that is used to build the METplus Docker image -that is used for testing. In the **testing.yml** workflow file, -there is a commented variable called -MET_FORCE_TAG that can be uncommented and set to force the version of MET to -use. This variable is found in the **get_image** job under the **env** section +component. If this occurs then some of the METplus use cases may break. + +Another situation that may require a different MET Docker image is if there +are changes in a MET feature or bugfix branch that are needed to test changes +in METplus. + +To allow the tests to run successfully in these cases, an option was added to +force a specific MET Docker image to be used to build the METplus Docker image +that is used for testing. + +In the **testing.yml** workflow file, there is a commented variable called +SET_MET_IMAGE that can be uncommented and set the MET Docker image to use. +This variable is found in the **get_image** job under the **env** section for the step named "Get METplus Image." +The format of the value is : +where the DockerHub repo used is dtcenter/ and the tag used is . + +Stable releases of MET are found in the +`dtcenter/met DockerHub repo `_ +and are named using the X.Y.Z version of the release, +so setting **SET_MET_IMAGE=met:11.1.0** will use dtcenter/met:11.1.0. + +Development versions of MET are found in the +`dtcenter/met-dev DockerHub repo `_ +and are named using the branch name, +so setting **SET_MET_IMAGE=met-dev:feature_XYZ_info** will use +dtcenter/met-dev:feature_XYZ_info. + .. _cg-ci-update-data-volumes: