Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle build #21

Merged
merged 13 commits into from
Oct 20, 2021
Prev Previous commit
Next Next commit
Update gradle build to avoid node.js blowup
Signed-off-by: Trevor Dolby <tdolby@uk.ibm.com>
tdolby-at-uk-ibm-com committed Oct 20, 2021
commit e1d41dd971ea79771fdf0b7c3f454770d36fe472
18 changes: 13 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -28,8 +28,17 @@ jobs:
# Runs a set of commands using the runners shell
- name: Download ACE image
run: |
########################################################################
#
# We move the source to the build directory to make sure it is not in
# the same directory as the downloaded install image. If the source
# stays where it is, then ibmint tries to scan it for projects!
#
########################################################################
echo "Moving source to the build directory"
mkdir build
mv * build || /bin/true

########################################################################
#
# Download ace-minimal image; could use ace-minimal-build but in our
@@ -42,8 +51,10 @@ jobs:
bash moby-download-frozen-image-v2.sh ace-minimal-download tdolby/experimental:ace-minimal-12.0.2.0-alpine
mkdir ace-minimal-image-unzip
cd ace-minimal-download && grep layer.tar manifest.json | tr -d '"' | tr -d ',' | xargs -n 1 tar -C ../ace-minimal-image-unzip -xf && cd - && rm -rf ace-minimal-download

# Not actually running on Alpine, so we undo a hack
sed -i 's/\/bin\/mksh/\/bin\/bash/g' ace-minimal-image-unzip/opt/ibm/ace-12/ace ace-minimal-image-unzip/opt/ibm/ace-12/server/bin/mqsicreateworkdir ace-minimal-image-unzip/opt/ibm/ace-12/server/bin/mqsipackagebar

########################################################################
#
# Set up ACE environment and ensure downloaded image works
@@ -65,18 +76,15 @@ jobs:
export LICENSE=accept
export MQSI_WORKPATH=$PWD/ace-minimal-image-unzip/var/mqsi
. ace-minimal-image-unzip/opt/ibm/ace-12/server/bin/mqsiprofile

# Using ace-minimal without WXS support
export MQSI_NO_CACHE_SUPPORT=1
# Make sure Gradle and others can find the correct javac
# export PATH=$PWD/ace-minimal-image-unzip/opt/ibm/ace-12/common/jdk/bin:$PATH

########################################################################
#
# Run the Gradle build and unit test phases
#
########################################################################
mqsicreateworkdir /tmp/eXp2021WorkDir
cd build
echo "Running ibmint by itself in directory $PWD"
ibmint deploy --input-path $PWD --output-work-directory /tmp/eXp2021WorkDir --project TeaSharedLibraryJava --project TeaSharedLibrary --project TeaRESTApplication --project TeaRESTApplication_UnitTest
echo "Running Gradle build and unit test"
gradle -PCLASSPATH=$CLASSPATH
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -39,8 +39,8 @@ task runUnitTests(type: Exec) {

environment CLASSPATH: project.getProperty("CLASSPATH")


commandLine baseFilePath + fileSep + 'server' + fileSep + 'bin/IntegrationServer', '-w', '/tmp/gradle-test-work-dir', '--test-project', 'TeaRESTApplication_UnitTest'
// Exclude node.js for ace-minimal build
commandLine baseFilePath + fileSep + 'server' + fileSep + 'bin/IntegrationServer', '-w', '/tmp/gradle-test-work-dir', '--test-project', 'TeaRESTApplication_UnitTest', '--admin-rest-api', '-1', '--no-nodejs'
}

defaultTasks 'deleteTestWorkDirectory', 'createTestWorkDirectory', 'buildWithUnitTests', 'runUnitTests'