Skip to content

Commit

Permalink
# This is a combination of 23 commits.
Browse files Browse the repository at this point in the history
# This is the 1st commit message:

update

# This is the commit message IsantePlus#2:

Update ci.yml
# This is the commit message IsantePlus#3:

fix

# This is the commit message IsantePlus#4:

fix

# This is the commit message IsantePlus#5:

xds github workflow

# This is the commit message IsantePlus#6:

fix

# This is the commit message IsantePlus#7:

fix

# This is the commit message IsantePlus#8:

fix

# This is the commit message IsantePlus#9:

update

# This is the commit message IsantePlus#10:

update

# This is the commit message IsantePlus#11:

update

# This is the commit message IsantePlus#12:

update

# This is the commit message IsantePlus#13:

update

# This is the commit message IsantePlus#14:

update

# This is the commit message IsantePlus#15:

update

# This is the commit message IsantePlus#16:

update

# This is the commit message IsantePlus#17:

update

# This is the commit message IsantePlus#18:

update

# This is the commit message IsantePlus#19:

update

# This is the commit message IsantePlus#20:

update

# This is the commit message IsantePlus#21:

update

# This is the commit message IsantePlus#22:

Fixes for github actions and tests

# This is the commit message IsantePlus#23:

Mvn fix
  • Loading branch information
HerbertYiga committed Oct 11, 2022
1 parent 1a48cde commit cfed325
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 42 deletions.
49 changes: 16 additions & 33 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,35 +19,23 @@ env:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
maven-tests:
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 8.0.232
- name: Set up Maven
uses: stCarolas/setup-maven@v4
with:
maven-version: 3.6.3
- name: Cache Maven packages
uses: actions/cache@v2
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- uses: s4u/[email protected]

java-version: '8'
distribution: 'adopt'
cache: maven

- name: Build with Maven
run: mvn -P 'github-packages' install -DskipTests
run: mvn --batch-mode --update-snapshots package

docker-build-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

Expand All @@ -67,17 +55,12 @@ jobs:
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build Docker image
- name: Build and Publish Docker image
uses: docker/build-push-action@v2
with:
context: .
push: false
tags: ghcr.io/isanteplus/openhim-mediator-xds:ci
load: true
build-args: |
USERNAME=${{ github.actor }}
TOKEN=${{ secrets.GITHUB_TOKEN }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=inline,ref=user/app:buildcache
cache-to: type=inline,ref=user/app:buildcache,mode=max


22 changes: 13 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
# build stage build the jar with all our resources
FROM openjdk:8-jdk as build
FROM maven:3.6-jdk-8 as build

VOLUME /tmp
WORKDIR /
WORKDIR /app

ADD . .
ADD pom.xml ./

RUN apt-get update
RUN apt-get install -y maven
RUN mvn clean install -DskipTests
RUN mvn verify

COPY mediator-xds-1.0.3-jar-with-dependencies.jar /root/mediator-xds-1.0.3-jar-with-dependencies.jar
ADD src ./

ENTRYPOINT java -jar mediator-xds-1.0.3-jar-with-dependencies.jar --conf mediator.properties
RUN mvn clean package -DskipTests

FROM openjdk:8-jdk as run

COPY --from=build /app/target/mediator-xds-1.0.3-jar-with-dependencies.jar /mediator-xds-1.0.3-jar-with-dependencies.jar
COPY --from=build /app/src/main/resources/mediator.properties /mediator.properties

ENTRYPOINT java -jar /mediator-xds-1.0.3-jar-with-dependencies.jar --conf /mediator.properties

0 comments on commit cfed325

Please sign in to comment.