Skip to content

Commit

Permalink
Merge pull request #4 from trevor-dolby-at-ibm-com/cp4i-image-build
Browse files Browse the repository at this point in the history
Cp4i image build
  • Loading branch information
trevor-dolby-at-ibm-com authored Aug 2, 2024
2 parents a631304 + eea78f5 commit 597aafd
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/cp4i-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: CP4i Image Build

on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
container:
image: tdolby/experimental:ace-minimal-12.0.11.0-alpine
env:
LICENSE: accept
volumes:
- /var/run/docker.sock:/var/run/docker.sock
options: -u 0
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- 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 ========================================================================
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
- name: Create the container structure
run: |
rm -rf /tmp/build
mkdir -p /tmp/build
cp tekton/Dockerfile /tmp/build/Dockerfile
- name: Install docker
run: |
unset LD_LIBRARY_PATH || /bin/true
apk add docker

0 comments on commit 597aafd

Please sign in to comment.