Skip to content

Commit

Permalink
update deploy CI to use gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Jan 9, 2025
1 parent d976c4b commit e65b290
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ jobs:
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '11'
java-version: '17'

- name: Run tests
run: mvn test
run: ./gradlew test

- name: Build with Maven
run: mvn clean package
- name: Build with Gradle
run: ./gradlew clean build

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand Down
6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
FROM openjdk:11-jre
FROM openjdk:17-jre
RUN rm -rf /usr/local/tomcat/webapps/*
RUN mkdir -p /logs
COPY ./target/API-Gateway-0.0.1-SNAPSHOT.jar /usr/local/tomcat/webapps/API-Gateway-0.0.1-SNAPSHOT.jar
COPY ./build/libs/api-gateway-1.0-SNAPSHOT.jar /usr/local/tomcat/webapps/API-Gateway-0.0.1-SNAPSHOT.jar
EXPOSE 8080
CMD ["sh","-c", "java -jar /usr/local/tomcat/webapps/API-Gateway-0.0.1-SNAPSHOT.jar"]


0 comments on commit e65b290

Please sign in to comment.