-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from trevor-dolby-at-ibm-com/cp4i-image-build
Cp4i image build
- Loading branch information
Showing
1 changed file
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |