Skip to content

Add execption logging to workflow executor #675

Add execption logging to workflow executor

Add execption logging to workflow executor #675

Workflow file for this run

name: Workflows CI
on:
push:
branches: [ dev, staging, test, release-** ]
pull_request:
branches: [ dev, staging, test, release-** ]
jobs:
Run_Engine_Tests:
name: Run_Engine_Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup_Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: PIP_Install
run: "pip install -r ./src/engine/src/requirements.txt"
- name: OWE_Python_SDK_Tests
run: ./src/engine/src/owe_python_sdk/tests/run.sh
- name: OWE_Engine_Tests
run: ./src/engine/src/tests/run.sh
Run_API_Tests:
name: Run_API_Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup_Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: PIP_Install
run: "pip install -r ./src/api/src/requirements.txt"
- name: Run_API_Tests
run: echo "FIXME - Need to figure out why tests not running -- ./src/api/src/tests/run.sh"
Run_Engine_Streams_Tests:
name: Run_Engine_Streams_Tests
runs-on: ubuntu-latest
steps:
- run: "echo 'Running Engine Streams Tests'"
Resolve_Image_Tag:
runs-on: ubuntu-latest
outputs:
image_tag: ${{ steps.set_image_tag.outputs.image_tag }}
steps:
- name: Extract_Branch_Name
# Map a step output to a job output
shell: bash
run: echo "branch_name=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Check_Is_Production_Release
id: check_is_production_release
shell: bash
run: |
if [ "${{ contains(steps.extract_branch.outputs.branch_name, 'release-') }}" = true ]; then
echo "is_production_release=true" >> $GITHUB_OUTPUT;
else
echo "is_production_release=false" >> $GITHUB_OUTPUT;
fi
- name: Extract Production Release Version
if: ${{ steps.check_is_production_release.outputs.is_production_release == 'true' }}
shell: bash
run: echo version=$(echo ${{ steps.extract_branch.outputs.branch_name }} | sed -e 's!release-!!') >> $GITHUB_OUTPUT
id: extract_version
- name: Extract_Image_Tag
shell: bash
run: |
if [ "${{ steps.check_is_production_release.outputs.is_production_release }}" == true ]; then
echo "image_tag=${{ steps.extract_version.outputs.version }}" >> $GITHUB_OUTPUT;
else
echo "image_tag=${{ steps.extract_branch.outputs.branch_name }}" >> $GITHUB_OUTPUT;
fi
id: set_image_tag
Build_Push_Image_Api:
needs:
- Resolve_Image_Tag
- Run_API_Tests
runs-on: ubuntu-latest
name: Build_Push_Api_Image
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.TAPIS_DOCKERHUB_USERNAME }}
password: ${{ secrets.TAPIS_DOCKERHUB_ACCESS_TOKEN }}
- name: Build_Tapis_Workflows_Api_Image
run: |
BRANCH="${{ needs.Resolve_Image_Tag.outputs.image_tag }}"
if [ "${{ contains(needs.Resolve_Image_Tag.outputs.image_tag, 'refs/pull/') }}" == true ]; then
BRANCH=dev
fi
docker build -f src/api/src/Dockerfile -t tapis/workflows-api:$BRANCH .
- name: Push_All_Tags
run: docker push --all-tags tapis/workflows-api
Build_Push_Image_Engine:
needs:
- Resolve_Image_Tag
- Run_Engine_Tests
runs-on: ubuntu-latest
name: Build_Push_Engine_Image
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.TAPIS_DOCKERHUB_USERNAME }}
password: ${{ secrets.TAPIS_DOCKERHUB_ACCESS_TOKEN }}
- name: Build_Tapis_Workflows_Engine_Image
run: |
BRANCH="${{ needs.Resolve_Image_Tag.outputs.image_tag }}"
if [ "${{ contains(needs.Resolve_Image_Tag.outputs.image_tag, 'refs/pull/') }}" == true ]; then
BRANCH=dev
fi
docker build -f src/engine/src/Dockerfile -t tapis/workflows-pipelines:$BRANCH .
- name: Push_All_Tags
run: docker push --all-tags tapis/workflows-pipelines
Build_Push_Image_Engine_Streams:
needs:
- Resolve_Image_Tag
- Run_Engine_Streams_Tests
runs-on: ubuntu-latest
name: Build_Push_Engine_Streams_Image
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.TAPIS_DOCKERHUB_USERNAME }}
password: ${{ secrets.TAPIS_DOCKERHUB_ACCESS_TOKEN }}
- name: Build_Tapis_Workflows_Engine_Streams_Image
run: |
BRANCH="${{ needs.Resolve_Image_Tag.outputs.image_tag }}"
if [ "${{ contains(needs.Resolve_Image_Tag.outputs.image_tag, 'refs/pull/') }}" == true ]; then
BRANCH=dev
fi
docker build -f src/engine-streams/src/Dockerfile -t tapis/workflow-engine-streams:$BRANCH .
- name: Push_All_Tags
run: docker push --all-tags tapis/workflow-engine-streams
Build_Push_Image_Python_Singularity:
needs:
- Resolve_Image_Tag
runs-on: ubuntu-latest
name: Build_Push_Python_Sinuglarity_Image
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.TAPIS_DOCKERHUB_USERNAME }}
password: ${{ secrets.TAPIS_DOCKERHUB_ACCESS_TOKEN }}
- name: Build_Tapis_Python_Singularity_Image
run: |
docker build -f src/engine/src/contrib/tapis/images/python-singularity/Dockerfile -t tapis/workflows-python-singularity:0.1.0 src/engine/src/contrib/tapis/images/python-singularity
- name: Push_All_Tags
run: docker push --all-tags tapis/workflows-python-singularity