Skip to content

updated the workflows meant for FP build,test,push on ARM and X86 #26

updated the workflows meant for FP build,test,push on ARM and X86

updated the workflows meant for FP build,test,push on ARM and X86 #26

name: Forcingprocessor X Datastream Integration on X86
on:
workflow_dispatch:
inputs:
branch_name:
description: 'Branch name to build from (leave empty to use current branch)'
required: false
default: ''
type: string
ds_tag:
description: 'DS Docker version tag which you want to test with'
required: false
default: ''
type: string
fp_tag:
description: 'FP Docker version tag which you want to test with'
required: false
default: ''
type: string
push:
branches:
- main
- fp_workflow
- trivy_scan
paths:
- 'docker/**'
- 'src/forcingprocessor/**'
- '!src/forcingprocessor/README.md'
pull_request:
paths:
- 'docker/**'
- 'src/forcingprocessor/**'
- '!src/forcingprocessor/README.md'
permissions:
contents: read
security-events: write
jobs:
build-test-docker-x86:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{secrets.DOCKERHUB_USERNAME}}
password: ${{secrets.DOCKERHUB_TOKEN}}
- name: Configure AWS
run: |
aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }}
aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws configure set region us-east-1
# - name: Install packages for datastream
# run: |
# curl -L -O https://github.com/lynker-spatial/hfsubsetCLI/releases/download/v1.1.0/hfsubset-v1.1.0-linux_amd64.tar.gz && tar -xzvf hfsubset-v1.1.0-linux_amd64.tar.gz && sudo mv ./hfsubset /usr/bin/hfsubset && sudo apt-get install git pip pigz -y
- name: Build docker containers
run : |
if [ -z "${{ inputs.fp_tag }}" ]; then
echo "FP_TAG input not provided, building forcingprocessor containers..."
TAG=latest-x86 docker compose -f docker/docker-compose.yml build forcingprocessor-deps
TAG=latest-x86 docker compose -f docker/docker-compose.yml build forcingprocessor
else
echo "FP_TAG input provided (${{ inputs.fp_tag }}), skipping forcingprocessor build and using existing images..."
fi
- name: clone ngen
run: |
git clone --single-branch --branch main --depth 1 https://github.com/CIROH-UA/datastreamcli.git
- name: Test docker containers
working-directory: datastreamcli
env:
DS_TAG: ${{ inputs.ds_tag || 'latest-x86' }}
FP_TAG: ${{ inputs.fp_tag || 'latest-x86' }}
run : |
docker images
curl -L -O https://ngen-datastream.s3.us-east-2.amazonaws.com/palisade.gpkg
./scripts/datastream -s 202006200100 -e 202006200200 -C NWM_RETRO_V3 -d $(pwd)/data/datastream_test -g $(pwd)/palisade.gpkg -R $(pwd)/configs/ngen/realization_sloth_nom_cfe_pet.json