Skip to content

Commit

Permalink
GH Actions (#156)
Browse files Browse the repository at this point in the history
* Prep for daily builds

* Fix sed command

* Update sed commands

* Update test.yml

Co-authored-by: Austin Seto <[email protected]>
Co-authored-by: Gilbert Kwan <[email protected]>
  • Loading branch information
3 people authored Jan 8, 2021
1 parent b448468 commit e1afbf4
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 19 deletions.
24 changes: 11 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# This workflow will test the guide application.
# For more information about building and testing Java,
# see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Test application

on:
Expand Down Expand Up @@ -34,27 +30,29 @@ jobs:
defaults:
run:
working-directory: finish

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
- name: Set up JDK 8
uses: actions/setup-java@v1
with:
java-version: 1.8
java-version: 8
- run: unset _JAVA_OPTIONS

- name: Run tests
run: chmod +x ../scripts/travisTest.sh && sudo ../scripts/travisTest.sh

run: sudo ../scripts/testApp.sh
- name: Post tests
if: always()
run: |
logsPath=$(sudo find . -name "console.log");
sudo cat $logsPath | sudo grep Launching
- name: Archive server logs if failed
- name: Archive backend logs if failed
if: failure()
uses: actions/upload-artifact@v2
with:
name: server-logs
path: finish/backendServices/target/liberty/wlp/usr/servers/defaultServer/logs/
- name: Archive frontend logs if failed
if: failure()
uses: actions/upload-artifact@v2
with:
name: server-logs
path: finish/target/liberty/wlp/usr/servers/guideServer/logs/
path: finish/frontendUI/target/liberty/wlp/usr/servers/defaultServer/logs/
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ target/
finish/target/
start/target/

bin/

.classpath
.factorypath
.project
Expand Down
18 changes: 18 additions & 0 deletions scripts/dailyBuild.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash
while getopts t:d:b:u: flag;
do
case "${flag}" in
t) DATE="${OPTARG}";;
d) DRIVER="${OPTARG}";;
b) BUILD="${OPTARG}";;
u) DOCKER_USERNAME="${OPTARG}";;
esac
done

sed -i "\#<artifactId>liberty-maven-plugin</artifactId>#a<configuration><install><runtimeUrl>https://public.dhe.ibm.com/ibmdl/export/pub/software/openliberty/runtime/nightly/"$DATE"/"$DRIVER"</runtimeUrl></install></configuration>" frontendUI/pom.xml
cat frontendUI/pom.xml

sed -i "\#<artifactId>liberty-maven-plugin</artifactId>#,\#<configuration>#c<artifactId>liberty-maven-plugin</artifactId><version>3.3.1</version><configuration><install><runtimeUrl>https://public.dhe.ibm.com/ibmdl/export/pub/software/openliberty/runtime/nightly/"$DATE"/"$DRIVER"</runtimeUrl></install>" backendServices/pom.xml
cat backendServices/pom.xml

../scripts/testApp.sh
6 changes: 0 additions & 6 deletions scripts/travisTest.sh → scripts/testApp.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
#!/bin/bash
set -euxo pipefail

##############################################################################
##
## Travis CI test script
##
##############################################################################

# LMP 3.0+ goals are listed here: https://github.com/OpenLiberty/ci.maven#goals

# Test the backendServices
Expand Down

0 comments on commit e1afbf4

Please sign in to comment.