Skip to content

Commit

Permalink
Action update (#56)
Browse files Browse the repository at this point in the history
* Update main-cp.yml

* Use ibmint

Signed-off-by: Trevor Dolby <[email protected]>

* Debug

Signed-off-by: Trevor Dolby <[email protected]>

* Checkout update

Signed-off-by: Trevor Dolby <[email protected]>

---------

Signed-off-by: Trevor Dolby <[email protected]>
  • Loading branch information
trevor-dolby-at-ibm-com authored Apr 15, 2024
1 parent 52f307f commit 5dc2c3d
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 19 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main-cp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ jobs:
password: ${{ secrets.CP_PASSWORD }}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Build the application and test it
shell: bash
run: |
echo "Loading ACE profile"
export LICENSE=accept
set +e # Don't fail on error if the profile has already been loaded
. /opt/ibm/ace-12/server/bin/mqsiprofile
set -e # Fail on error - this must be done after the profile in case the container has the profile loaded already
echo ========================================================================
Expand All @@ -49,4 +49,4 @@ jobs:
echo ========================================================================
echo Running unit tests
echo ========================================================================
IntegrationServer -w /tmp/test-work-dir --no-nodejs --start-msgflows false --test-project TeaRESTApplication_UnitTest --test-junit-options --reports-dir=junit-reports
IntegrationServer -w /tmp/test-work-dir --no-nodejs --start-msgflows false --test-project TeaRESTApplication_UnitTest
44 changes: 28 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ name: CI
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main, aceaas-and-minikube ]
branches: [ main, action-update ]
pull_request:
branches: [ main, aceaas-and-minikube ]
branches: [ main, action-update ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -20,25 +20,37 @@ jobs:
runs-on: ubuntu-latest
container:
image: tdolby/experimental:ace-minimal-12.0.11.0-alpine
options: -u 0
env:
LICENSE: accept
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

- name: Install gradle
run: |
# ace-minimal doesn't have gradle so we install it here.
# LD_LIBRARY_PATH includes glibc to make ACE work but that
# breaks apk so we unset it.
unset LD_LIBRARY_PATH || /bin/true
apk add gradle
- uses: actions/checkout@v4

- name: Build the application and test it
shell: bash
run: |
# This shell has mqsiprofile already loaded
echo "Running Gradle build and unit test"
gradle -PCLASSPATH=$CLASSPATH
echo "Loading ACE profile"
export LICENSE=accept
set +e # Don't fail on error if the profile has already been loaded
. /opt/ibm/ace-12/server/bin/mqsiprofile
set -e # Fail on error - this must be done after the profile in case the container has the profile loaded already
echo ========================================================================
echo Building application
echo ========================================================================
# Using --compile-maps-and-schemas for 12.0.11 and later . . .
ibmint package --input-path . --output-bar-file $PWD/tea-application-combined.bar --project TeaSharedLibraryJava --project TeaSharedLibrary --project TeaRESTApplication --compile-maps-and-schemas
echo ========================================================================
echo Building unit tests
echo ========================================================================
# Create the unit test work directory
mqsicreateworkdir /tmp/test-work-dir
mqsibar -w /tmp/test-work-dir -a $PWD/tea-application-combined.bar
# Build just the unit tests
ibmint deploy --input-path . --output-work-directory /tmp/test-work-dir --project TeaRESTApplication_UnitTest
echo ========================================================================
echo Running unit tests
echo ========================================================================
IntegrationServer -w /tmp/test-work-dir --no-nodejs --start-msgflows false --test-project TeaRESTApplication_UnitTest --test-junit-options --reports-dir=junit-reports

0 comments on commit 5dc2c3d

Please sign in to comment.