-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jade Carino <[email protected]>
- Loading branch information
1 parent
dc512e5
commit fe9263c
Showing
3 changed files
with
117 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,86 @@ | ||
name: PR build | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
build-simplatform: | ||
name: Build Simplatform web application and tests | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '17' | ||
distribution: 'semeru' | ||
|
||
- name: Set up Maven 3.9.0 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'maven' | ||
maven-version: '3.9.0' | ||
|
||
- name: Print Githash | ||
run: | | ||
echo $GITHUB_SHA > ./simplatform.githash | ||
- name: Building galasa-simplatform-application using maven | ||
run: | | ||
set -o pipefail | ||
mvn -f galasa-simplatform-application/pom.xml -X deploy -Dgpg.skip=true \ | ||
-Dgalasa.source.repo=https://development.galasa.dev/gh/maven-repo/obr \ | ||
-Dgalasa.central.repo=https://repo.maven.apache.org/maven2/ \ | ||
-Dgalasa.release.repo=file:${{ github.workspace }}/repo \ | ||
--batch-mode --errors --fail-at-end \ | ||
--settings ${{ github.workspace }}/settings.xml 2>&1 | tee galasa-simplatform-application-build.log | ||
- name: Upload galasa-simplatform-application Maven Build Log | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: galasa-simplatform-application-build-log | ||
path: galasa-simplatform-application-build.log | ||
retention-days: 7 | ||
|
||
- name: Building galasa-simbank-tests using maven | ||
run: | | ||
set -o pipefail | ||
mvn -f galasa-simbank-tests/pom.xml -X deploy -Dgpg.skip=true \ | ||
-Dgalasa.source.repo=https://development.galasa.dev/gh/maven-repo/obr \ | ||
-Dgalasa.central.repo=https://repo.maven.apache.org/maven2/ \ | ||
-Dgalasa.release.repo=file:${{ github.workspace }}/repo \ | ||
--batch-mode --errors --fail-at-end \ | ||
--settings ${{ github.workspace }}/settings.xml 2>&1 | tee galasa-simbank-tests-build.log | ||
- name: Upload galasa-simbank-tests Maven Build Log | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: galasa-simbank-tests-build-log | ||
path: galasa-simbank-tests-build.log | ||
retention-days: 7 | ||
|
||
- name: Build Simplatform image for testing | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: dockerfiles/dockerfile.simplatform | ||
load: true | ||
tags: simplatform-maven-artefacts:test | ||
build-args: | | ||
baseVersion=latest | ||
dockerRepository=ghcr.io | ||
branch=main | ||
- name: Build Simplatform jar image for testing | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: dockerfiles/dockerfile.simplatform-amd64 | ||
load: true | ||
tags: simplatform-jar:test |
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,11 @@ | ||
ARG baseVersion | ||
ARG dockerRepository | ||
FROM ${dockerRepository}/galasa-dev/base-image:${baseVersion} | ||
|
||
ARG branch | ||
|
||
RUN sed -i "s/--branchname--/${branch}/" /usr/local/apache2/conf/httpd.conf | ||
RUN sed -i 's/--repositoryname--/simplatform/' /usr/local/apache2/conf/httpd.conf | ||
|
||
COPY repo/ /usr/local/apache2/htdocs/ | ||
COPY simplatform.githash /usr/local/apache2/htdocs/simplatform.githash |
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,20 @@ | ||
FROM harbor.galasa.dev/docker_proxy_cache/library/openjdk:11-jdk | ||
|
||
RUN mkdir /galasa | ||
|
||
RUN useradd -u 1000 -d /galasa galasa && \ | ||
chown -R galasa:galasa /galasa | ||
|
||
WORKDIR /galasa | ||
|
||
USER galasa | ||
|
||
COPY galasa-simplatform-application/galasa-simplatform-3270/target/galasa-simplatform-0.24.0.jar /galasa/simplatform.jar | ||
|
||
VOLUME /galasa/.galasa | ||
VOLUME /galasa/load | ||
|
||
EXPOSE 2080/tcp | ||
EXPOSE 2023/tcp | ||
EXPOSE 2027/tcp | ||
EXPOSE 2040/tcp |