Skip to content

Commit

Permalink
Aceaas and minikube (#52)
Browse files Browse the repository at this point in the history
* Merge ACEaaS and Minikube updates (#50)

* buildah experiments

* Add various options for buildah caches

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

* Pipeline updates for ibmint

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

* Add image tag

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

* Add container tage from git commit id

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

* Deploy by image hash

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

* Fix Maven build

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

* Update docker registry parameters

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

* Add whole flow test

* Test machine fix

* Fail on test error

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

* Cleanup for non-CP4i pipeline

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

* Updates for image tag

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

* Image tags and policy project name

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

* Knative in main pipeline

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

* ACE container permissions

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

* More permissions updates

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

* Dynamic DB2 fixup

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

* Fix dynamic DB2 namespace issue

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

* Dynamic DB2 changes

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

* Minikube merge

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

* Minikube updates

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

* Initial ACEaaS work

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

* ACEaaS configuration part 1

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

* Fixes

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

* Change "contents" to "data"

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

* IntegrationRuntime update

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

* Configuration and pipeline updates

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

* ACEaaS end-to-end updates

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

* YAML formatting updates

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

* Version update

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

* Jenkins updates

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

* Add LICENSE=accept

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

* Change userid

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

* Fix entrypoint

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

* Add top command

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

* ACE container attempt 1

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

* ACE container attempt 2

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

* Use ibmint

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

* More ibmint

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

* Path fixup

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

* Try minimal build

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

* Try different image

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

* ACEaaS Jenkins initial commit

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

* Token handling

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

* Fix typo

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

* Quotes fix

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

* Remove debugging

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

* Initial config create option

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

* Error fix

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

* Fix when syntax

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

* Config file generation

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

* Backslahes part 1

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

* More config changes

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

* Fix typo

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

* Backslashes part 2

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

* Fix names

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

* End-to-end attempt 1

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

* End-to-end attempt 2

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

* Cleanup

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

* ACEaaS update

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

* Switch to minikube defaults

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

* Initial pictures

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

* Fix readme

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

* Fix picture

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

* Picture formatting

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

* Add pipeline overview

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

* Link to new picture

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

* Different picture size

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

* Try JPEG

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

* CP4i pipeline

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

* Try PNG

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

* Add Jenkins picture

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

* Add ACEaaS pipeline picture

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

* Add high-level overview

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

* Try JPEG

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

* High-level updates

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

* Further doc updates

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

* Updates

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

* ACEaaS pipeline info

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

* Add doc link

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

* Update cloud resources

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

* Add entitlement key section

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

* Add ace-minimal links

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

* Jenkins ACEaaS updates

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

* Fix typos

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

* Update Tekton docs

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

* Minikube updates

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

* ACEaaS updates

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

* Updates to various docs

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

* Acquire token for ACEaaS tekton

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

* Switch to ace image by default

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

* Add entitlement key docs

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

* Fix escaping

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

* Add Tekton ACEaaS API picture

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

* Add ot4i branch to CI

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

---------

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

* Update repo and branch

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

* Aceaas and minikube updates (#51)

* Update ACEaaS pipeline picture

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

* Fix naming and add comments

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

* Update picture with new names

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

* Containers update

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

* Switch containers

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

* Libpath fix

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

* Change default image

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

* Add container version comments

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

* Backslash comments

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

* Tekton name generation

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

* Tekton dashboard

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

* Fix image link

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

* Update pipelines diagram

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

* Fix wording and diagrams

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

* Picture changes

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

* Minikube and CP4i updates

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

* Fix link

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

* Update pipeline

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

* Minikube fixes and doc updates

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

* Add links

* Update docs

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

* Doc and version fixup

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

* Remove extraneous typescript file

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

---------

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

* Switch default branch

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

---------

Signed-off-by: Trevor Dolby <[email protected]>
  • Loading branch information
trevor-dolby-at-ibm-com authored Apr 9, 2024
1 parent d2af99c commit 409122e
Show file tree
Hide file tree
Showing 117 changed files with 4,754 additions and 881 deletions.
4 changes: 2 additions & 2 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 ]
branches: [ main, aceaas-and-minikube ]
pull_request:
branches: [ main ]
branches: [ main, aceaas-and-minikube ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@ TeaRESTApplication_UnitTest/resources


.gradle

.vscode
85 changes: 55 additions & 30 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
pipeline {
agent { docker { image 'ace-minimal-build:12.0.10.0-alpine' } }
agent { docker {
image 'cp.icr.io/cp/appc/ace:12.0.11.0-r1'
/* image 'ace-minimal:12.0.11.0-alpine' */
args '-e LICENSE=accept --entrypoint ""'
} }
parameters {
/* These values would be better moved to a configuration file and provided by */
/* the Config File Provider plugin (or equivalent), but this is good enough */
Expand All @@ -18,17 +22,40 @@ pipeline {
# Set HOME to somewhere writable by Maven
export HOME=/tmp
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
# Clean up just in case files have been left around
rm -f */maven-reports/TEST*.xml
rm -rf $PWD/ace-server
rm -f */junit-reports/TEST*.xml
rm -rf /tmp/test-work-dir
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
mvn --no-transfer-progress -Dinstall.work.directory=$PWD/ace-server install
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
'''

}
post {
always {
junit '**/maven-reports/TEST*.xml'
junit '**/junit-reports/TEST*.xml'
}
}
}
Expand All @@ -41,50 +68,48 @@ pipeline {

sh '''#!/bin/bash
# Should alread have the projects unpacked
export WORKDIR=$PWD/ace-server
export WORKDIR=/tmp/test-work-dir
# Set HOME to somewhere writable by Maven
export HOME=/tmp
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
mkdir ${WORKDIR}/run/CTPolicies
echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><ns2:policyProjectDescriptor xmlns="http://com.ibm.etools.mft.descriptor.base" xmlns:ns2="http://com.ibm.etools.mft.descriptor.policyProject"><references/></ns2:policyProjectDescriptor>' > ${WORKDIR}/run/CTPolicies/policy.descriptor
cp /tmp/TEAJDBC.policyxml ${WORKDIR}/run/CTPolicies/
mqsisetdbparms -w ${WORKDIR} -n jdbc::tea -u $CT_JDBC_USR -p $CT_JDBC_PSW
sed -i "s/#policyProject: 'DefaultPolicies'/policyProject: 'CTPolicies'/g" ${WORKDIR}/server.conf.yaml
rm -f */maven-reports/TEST*.xml
( cd TeaRESTApplication_ComponentTest && mvn --no-transfer-progress -Dct.work.directory=${WORKDIR} verify )
rm -f */junit-reports/TEST*.xml
echo ========================================================================
echo Building component tests
echo ========================================================================
# Build just the component tests
ibmint deploy --input-path . --output-work-directory ${WORKDIR} --project TeaRESTApplication_ComponentTest
echo ========================================================================
echo Running component tests
echo ========================================================================
IntegrationServer -w ${WORKDIR} --no-nodejs --start-msgflows false --test-project TeaRESTApplication_ComponentTest --test-junit-options --reports-dir=junit-reports
'''
}
post {
always {
junit '**/maven-reports/TEST*.xml'
junit '**/junit-reports/TEST*.xml'
}
}
}

stage('Next stage BAR build') {
steps {
sh '''#!/bin/bash
# Build a single BAR file that contains everything rather than deploying two BAR files.
# Deploying two BAR files (one for the shared library and the other for the application)
# would work, but would take longer on redeploys due to reloading the application on
# each deploy.
#
# The Tekton pipeline doesn't have this issue because the application and library are
# unpacked into a work directory in a container image in that pipeline, so there is no
# deploy to a running server.
mqsipackagebar -w $PWD -a tea-application-combined.bar -y TeaSharedLibrary -k TeaRESTApplication
# Optional compile for XMLNSC, DFDL, and map resources. Useful as long as the target
# broker is the same OS, CPU, and installation including ifixes as the build system.
# mqsibar --bar-file tea-application-combined.bar --compile
'''
}
}

stage('Next stage deploy') {
steps {
sh "bash -c \"mqsideploy -i ${params.integrationNodeHost} -p ${params.integrationNodePort} -e ${params.integrationServerName} -a tea-application-combined.bar\""
sh "bash -c \"export LICENSE=accept ; . /opt/ibm/ace-12/server/bin/mqsiprofile ; mqsideploy -i ${params.integrationNodeHost} -p ${params.integrationNodePort} -e ${params.integrationServerName} -a tea-application-combined.bar\""
}
}

Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pipeline {
string(name: 'integrationServerName', defaultValue: 'default', description: 'Integration server name')
}
environment {
ACE_COMMAND = "C:\\Program Files\\IBM\\ACE\\12.0.10.0\\ace"
ACE_COMMAND = "C:\\Program Files\\IBM\\ACE\\12.0.11.0\\ace"
CT_JDBC = credentials('CT_JDBC')
}
stages {
Expand Down
Loading

0 comments on commit 409122e

Please sign in to comment.