Skip to content

Commit

Permalink
Update develop-ref after #1977, #2001, #2005, #2006, #2007, and #2012. (
Browse files Browse the repository at this point in the history
#2016)

Co-authored-by: Julie Prestopnik <jpresto@seneca.rap.ucar.edu>
Co-authored-by: johnhg <johnhg@ucar.edu>
Co-authored-by: Seth Linden <linden@kiowa.rap.ucar.edu>
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>
Co-authored-by: j-opatz <59586397+j-opatz@users.noreply.github.com>
Co-authored-by: Howard Soh <hsoh@kiowa.rap.ucar.edu>
Co-authored-by: John Halley Gotway <johnhg@kiowa.rap.ucar.edu>
Co-authored-by: jprestop <jpresto@ucar.edu>
Co-authored-by: Seth Linden <linden@ucar.edu>
Co-authored-by: hsoh-u <hsoh@ucar.edu>
Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>
Co-authored-by: John Halley Gotway <johnhg@seneca.rap.ucar.edu>
Co-authored-by: MET Tools Test Account <met_test@seneca.rap.ucar.edu>
Co-authored-by: mo-mglover <78152252+mo-mglover@users.noreply.github.com>
  • Loading branch information
13 people authored Jan 16, 2022
1 parent fa61672 commit 90bea06
Show file tree
Hide file tree
Showing 99 changed files with 4,902 additions and 990 deletions.
40 changes: 40 additions & 0 deletions .github/jobs/build_and_push_docker_image.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#! /bin/bash

# utility function to run command get log the time it took to run
function time_command {
local start_seconds=$SECONDS
echo "RUNNING: $*"
"$@"
local error=$?

local duration=$(( SECONDS - start_seconds ))
echo "TIMING: Command took `printf '%02d' $(($duration / 60))`:`printf '%02d' $(($duration % 60))` (MM:SS): '$*'"
if [ ${error} -ne 0 ]; then
echo "ERROR: '$*' exited with status = ${error}"
fi
return $error
}

prefix=refs/heads/
branch_name=${GITHUB_REF#"$prefix"}
DOCKERHUB_TAG=dtcenter/met:${branch_name}

DOCKERFILE_DIR=${GITHUB_WORKSPACE}/scripts/docker

echo "::group::Docker Build Command"
time_command docker build -t ${DOCKERHUB_TAG} \
--build-arg SOURCE_BRANCH=$branch_name \
$DOCKERFILE_DIR
echo "::endgroup::"

# 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

echo "::group::Docker Push Command"
time_command docker push ${DOCKERHUB_TAG}
echo "::endgroup::"
46 changes: 46 additions & 0 deletions .github/workflows/build_docker_and_trigger_metplus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Build Docker Image and Trigger METplus Workflow

on:
push:
branches:
- develop
paths-ignore:
- 'met/docs/**'

jobs:
build_met_docker:
name: Handle Docker Image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build and Push Docker Image
run: .github/jobs/build_and_push_docker_image.sh
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
trigger_metplus:
name: Trigger METplus testing workflow
runs-on: ubuntu-latest
needs: build_met_docker
steps:
- name: Print GitHub values for reference
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/github-script@v5
with:
github-token: ${{ secrets.METPLUS_BOT_TOKEN }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: 'dtcenter',
repo: 'METplus',
workflow_id: 'testing.yml',
ref: 'develop',
inputs: {
repository: '${{ github.repository }}',
ref: '${{ github.ref }}',
actor: '${{ github.actor }}',
sha: '${{ github.sha }}',
pusher_email: '${{ github.event.pusher.email }}'
},
});
1 change: 1 addition & 0 deletions met/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ bin
share
Makefile
Makefile.in
make.log

# tilda files generated by emacs
*~
Expand Down
7 changes: 7 additions & 0 deletions met/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ AC_CONFIG_HEADERS([config.h])

AM_INIT_AUTOMAKE([1.9 foreign])

# OpenMP

AC_OPENMP()

CPPFLAGS="${CPPFLAGS} ${OPENMP_CFLAGS}"
LDFLAGS="${LDFLAGS} ${OPENMP_CFLAGS}"

#
# Look for the NetCDF library
#
Expand Down
7 changes: 7 additions & 0 deletions met/data/config/EnsembleStatConfig_default
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ ens = {
];
}

//
// IDs for ensemble members
// Only set if processing a single file with all ensembles
//
ens_member_ids = [];
control_id = "";

////////////////////////////////////////////////////////////////////////////////

//
Expand Down
7 changes: 7 additions & 0 deletions met/data/config/GenEnsProdConfig_default
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ ens = {
];
}

//
// IDs for ensemble members
// Only set if processing a single file with all ensembles
//
ens_member_ids = [];
control_id = "";

////////////////////////////////////////////////////////////////////////////////

//
Expand Down
Loading

0 comments on commit 90bea06

Please sign in to comment.