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 db81494
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 16 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
5 changes: 5 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions .vscode/settings.json

This file was deleted.

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 eclipse-temurin:17-jdk
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"]


6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
// implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
developmentOnly 'org.springframework.boot:spring-boot-docker-compose'
Expand All @@ -33,7 +33,7 @@ dependencies {
implementation 'org.apache.jena:jena-arq:3.16.0'

// Database
runtimeOnly 'org.postgresql:postgresql'
// runtimeOnly 'org.postgresql:postgresql'

// Lombok annotation helpers
compileOnly 'org.projectlombok:lombok'
Expand All @@ -49,7 +49,7 @@ dependencies {

// Tests
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'com.h2database:h2'
// testRuntimeOnly 'com.h2database:h2'
}

test {
Expand Down

0 comments on commit db81494

Please sign in to comment.