Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0fc1816bb6 | ||
|
|
a07bfe0c97 |
47
.github/workflows/build.yml
vendored
47
.github/workflows/build.yml
vendored
@@ -1,47 +0,0 @@
|
|||||||
name: SonarCloud
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- sonar
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-16.04
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v1
|
|
||||||
- name: Set up JDK
|
|
||||||
uses: actions/setup-java@v1
|
|
||||||
with:
|
|
||||||
java-version: '11'
|
|
||||||
- name: Cache SonarCloud packages
|
|
||||||
uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: ~/.sonar/cache
|
|
||||||
key: ${{ runner.os }}-sonar
|
|
||||||
restore-keys: ${{ runner.os }}-sonar
|
|
||||||
- name: Cache Maven packages
|
|
||||||
uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: ~/.m2
|
|
||||||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
|
||||||
restore-keys: ${{ runner.os }}-m2
|
|
||||||
- name: Analyze with SonarCloud
|
|
||||||
run: mvn -B verify sonar:sonar -Dsonar.projectKey=sofieneBK_hands-on-hexagonal-architecture-with-spring-boot -Dsonar.organization=sofienebk -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
|
||||||
|
|
||||||
- name: Build with Maven
|
|
||||||
run: mvn -B package --file pom.xml
|
|
||||||
|
|
||||||
- name: Deploy to EB
|
|
||||||
uses: einaregilsson/beanstalk-deploy@v13
|
|
||||||
with:
|
|
||||||
aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
||||||
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
||||||
aws_session_token: ${{ secrets.AWS_SESSION_TOKEN }}
|
|
||||||
application_name: spring-java-11
|
|
||||||
environment_name: Springjava11-env
|
|
||||||
version_label: ${{github.SHA}}
|
|
||||||
region: us-east-1
|
|
||||||
deployment_package: ms-launcher/target/ms-launcher-1.0-SNAPSHOT.jar
|
|
||||||
@@ -38,9 +38,4 @@ public class BookController {
|
|||||||
public void deleteBookByID(@PathVariable long id) {
|
public void deleteBookByID(@PathVariable long id) {
|
||||||
bookServicePort.deleteBookById(id);
|
bookServicePort.deleteBookById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/health")
|
|
||||||
public String health() {
|
|
||||||
return "HEALTH CHECK OK";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package org.example;
|
|||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
public class LibraryApplication {
|
public class LibraryApplication {
|
||||||
@@ -11,9 +10,4 @@ public class LibraryApplication {
|
|||||||
SpringApplication.run(LibraryApplication.class, args);
|
SpringApplication.run(LibraryApplication.class, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/")
|
|
||||||
public String health() {
|
|
||||||
return "HEALTH CHECK OK!";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
server.port=5000
|
|
||||||
Reference in New Issue
Block a user