Skip to content

Commit

Permalink
move files and delete script
Browse files Browse the repository at this point in the history
  • Loading branch information
busraarsln committed Nov 15, 2023
1 parent 28fbbfc commit 0e7c0ee
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 53 deletions.
58 changes: 30 additions & 28 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,36 +26,38 @@ jobs:
cache: 'maven'

# - name: Build Conformance-Gateway
# run: cd Conformance-Gateway && mvn clean -U -B package -DskipTests
# run: |
# cd Conformance-Gateway
# find . -name "pom.xml" -exec mvn install -U -B -DskipTests -f '{}' \;

- name: Run the app
run: |
ls
cd Conformance-Gateway/spring-boot && docker-compose -f docker-compose.yml up -d -V --build
cd Conformance-Gateway && docker-compose -f docker-compose.yml up -d -V --build
# - name: Fetch Backend Status
# run: |
# sleep 10
# status=$(curl -s http://localhost:8080/actuator/health | jq -r '.status')
# retries=12
#
# while [[ "$status" != "UP" ]] && [[ $retries -gt 0 ]]; do
# echo "Status is '$status' - waiting 5 secs ($retries retries left)"
# sleep 5
# retries=$((retries - 1))
# status=$(curl -s http://localhost:8080/actuator/health | jq -r '.status')
# done
#
# echo "Final status is '$status'"
# if [[ "$status" != "UP" ]]; then
# curl -v http://localhost:8080/actuator/health || :
# exit 1
# fi
#
# echo "::set-output name=STATUS::$status"
# id: healthcheck
#
# - name: Confirm microservice status
# if: ${{ steps.healthcheck.outputs.STATUS == 'UP' }}
# run: |
# echo "The Conformance-Gateway service is UP."
- name: Fetch Backend Status
run: |
sleep 10
status=$(curl -s http://localhost:8080/actuator/health | jq -r '.status')
retries=12
while [[ "$status" != "UP" ]] && [[ $retries -gt 0 ]]; do
echo "Status is '$status' - waiting 5 secs ($retries retries left)"
sleep 5
retries=$((retries - 1))
status=$(curl -s http://localhost:8080/actuator/health | jq -r '.status')
done
echo "Final status is '$status'"
if [[ "$status" != "UP" ]]; then
curl -v http://localhost:8080/actuator/health || :
exit 1
fi
echo "::set-output name=STATUS::$status"
id: healthcheck

- name: Confirm microservice status
if: ${{ steps.healthcheck.outputs.STATUS == 'UP' }}
run: |
echo "The Conformance-Gateway service is UP."
36 changes: 36 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
FROM maven:3.8.5-openjdk-17-slim as builder

WORKDIR /build

COPY core core
RUN mvn install -DskipTests -f core


COPY booking booking
RUN mvn install -DskipTests -f booking


COPY ebl-issuance ebl-issuance
RUN mvn install -DskipTests -f ebl-issuance


COPY ebl-surrender ebl-surrender
RUN mvn install -DskipTests -f ebl-surrender


COPY sandbox sandbox
RUN mvn install -DskipTests -f sandbox


COPY spring-boot spring-boot
RUN mvn install -DskipTests -f spring-boot


FROM openjdk:17-alpine3.14

EXPOSE 8080

VOLUME /tmp

COPY --from=builder /build/spring-boot/target/*.jar app.jar
ENTRYPOINT ["java","-jar","/app.jar"]
File renamed without changes.
23 changes: 0 additions & 23 deletions spring-boot/Dockerfile

This file was deleted.

2 changes: 0 additions & 2 deletions spring-boot/build.sh

This file was deleted.

0 comments on commit 0e7c0ee

Please sign in to comment.