From 9c93bc5200b5beb090ae449f8250c587300a326a Mon Sep 17 00:00:00 2001 From: Trevor Dolby <107267051+trevor-dolby-at-ibm-com@users.noreply.github.com> Date: Mon, 15 Apr 2024 08:39:38 -0500 Subject: [PATCH 1/4] Update main-cp.yml --- .github/workflows/main-cp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main-cp.yml b/.github/workflows/main-cp.yml index 6dda839..76ce176 100644 --- a/.github/workflows/main-cp.yml +++ b/.github/workflows/main-cp.yml @@ -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 From bd8c96abc9d4307189b473f217e53a800f35e99a Mon Sep 17 00:00:00 2001 From: Trevor Dolby Date: Mon, 15 Apr 2024 09:17:40 -0500 Subject: [PATCH 2/4] Use ibmint Signed-off-by: Trevor Dolby --- .github/workflows/main.yml | 41 +++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bd3cab7..bf9f2b5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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: @@ -26,19 +26,32 @@ jobs: 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 - 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 + . /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 From 1e8bd914759cd10670166cd8edab0e2cc64f4e69 Mon Sep 17 00:00:00 2001 From: Trevor Dolby Date: Mon, 15 Apr 2024 09:19:40 -0500 Subject: [PATCH 3/4] Debug Signed-off-by: Trevor Dolby --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bf9f2b5..06624e6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,6 +32,7 @@ jobs: run: | echo "Loading ACE profile" export LICENSE=accept + set +e # Don't fail on error . /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 From ac2da1d53c30e166f83e8de5fdf6610b9def8db1 Mon Sep 17 00:00:00 2001 From: Trevor Dolby Date: Mon, 15 Apr 2024 09:21:48 -0500 Subject: [PATCH 4/4] Checkout update Signed-off-by: Trevor Dolby --- .github/workflows/main-cp.yml | 4 ++-- .github/workflows/main.yml | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main-cp.yml b/.github/workflows/main-cp.yml index 76ce176..7b720d7 100644 --- a/.github/workflows/main-cp.yml +++ b/.github/workflows/main-cp.yml @@ -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 ======================================================================== diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 06624e6..d4c5fc2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,21 +20,19 @@ 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 + - 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 + 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 ========================================================================