From 79e4b8c541144985db2d7674f03bb241436ae247 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sat, 4 May 2024 23:37:19 -0400 Subject: [PATCH 01/91] Primere pipeline --- src/.github/workflows/pipeline-ci.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/.github/workflows/pipeline-ci.yml diff --git a/src/.github/workflows/pipeline-ci.yml b/src/.github/workflows/pipeline-ci.yml new file mode 100644 index 00000000..8ce69d31 --- /dev/null +++ b/src/.github/workflows/pipeline-ci.yml @@ -0,0 +1,26 @@ +name: CI +on: + push: +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Clonar repo + uses: actions/checkout@v4 + + - name: Setup Java JDK + uses: actions/setup-java@v4.2.1 + with: + java-version: '17' + distribution: 'temurin' + + + - name: Compilar codigo Maven + run: | + mvn package + + - name: Compilar gradle + run: | + gradle build + + From e964ee086e96524296ddd2ed2d034f40f77a4651 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sat, 4 May 2024 23:48:36 -0400 Subject: [PATCH 02/91] Delete src/.github/workflows directory --- src/.github/workflows/pipeline-ci.yml | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 src/.github/workflows/pipeline-ci.yml diff --git a/src/.github/workflows/pipeline-ci.yml b/src/.github/workflows/pipeline-ci.yml deleted file mode 100644 index 8ce69d31..00000000 --- a/src/.github/workflows/pipeline-ci.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: CI -on: - push: -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Clonar repo - uses: actions/checkout@v4 - - - name: Setup Java JDK - uses: actions/setup-java@v4.2.1 - with: - java-version: '17' - distribution: 'temurin' - - - - name: Compilar codigo Maven - run: | - mvn package - - - name: Compilar gradle - run: | - gradle build - - From fda89a1b67c91bc10eee1853492fdf890b3413a6 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sat, 4 May 2024 23:49:58 -0400 Subject: [PATCH 03/91] Pipeline ahora si --- .github/workflows/pipeline-ci.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/pipeline-ci.yml diff --git a/.github/workflows/pipeline-ci.yml b/.github/workflows/pipeline-ci.yml new file mode 100644 index 00000000..8411e76a --- /dev/null +++ b/.github/workflows/pipeline-ci.yml @@ -0,0 +1,24 @@ +name: CI +on: + push: +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Clonar repo + uses: actions/checkout@v4 + + - name: Setup Java JDK + uses: actions/setup-java@v4.2.1 + with: + java-version: '17' + distribution: 'temurin' + + + - name: Compilar codigo + run: | + mvn package + + - name: Gradle build + run: | + gradle build From 6888e14599fd442c164835801424ebd51bf9f5b2 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sat, 4 May 2024 23:51:46 -0400 Subject: [PATCH 04/91] Cambio java 8 --- .github/workflows/pipeline-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pipeline-ci.yml b/.github/workflows/pipeline-ci.yml index 8411e76a..e1d2f85d 100644 --- a/.github/workflows/pipeline-ci.yml +++ b/.github/workflows/pipeline-ci.yml @@ -11,7 +11,7 @@ jobs: - name: Setup Java JDK uses: actions/setup-java@v4.2.1 with: - java-version: '17' + java-version: '8' distribution: 'temurin' From 8ed97376d05ad7d2554bcc6a244b67feddec0fbf Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sat, 4 May 2024 23:54:35 -0400 Subject: [PATCH 05/91] gradle agregado --- .github/workflows/pipeline-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pipeline-ci.yml b/.github/workflows/pipeline-ci.yml index e1d2f85d..eab4fbf4 100644 --- a/.github/workflows/pipeline-ci.yml +++ b/.github/workflows/pipeline-ci.yml @@ -18,7 +18,7 @@ jobs: - name: Compilar codigo run: | mvn package + + - name: Build with Gradle + uses: gradle/actions@v3.3.2 - - name: Gradle build - run: | - gradle build From 9f5338059ae1646cfdac351cd5f1a32d22e2a2a1 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 00:00:39 -0400 Subject: [PATCH 06/91] compilar con maven --- .github/workflows/pipeline-ci.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/pipeline-ci.yml b/.github/workflows/pipeline-ci.yml index eab4fbf4..41467d20 100644 --- a/.github/workflows/pipeline-ci.yml +++ b/.github/workflows/pipeline-ci.yml @@ -17,8 +17,4 @@ jobs: - name: Compilar codigo run: | - mvn package - - - name: Build with Gradle - uses: gradle/actions@v3.3.2 - + mvn package From 05a5370a30888b072615d95874b79c2ed0b0c5a1 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 00:04:12 -0400 Subject: [PATCH 07/91] Probando pruebas unitarias --- .github/workflows/pipeline-ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pipeline-ci.yml b/.github/workflows/pipeline-ci.yml index 41467d20..3dc9d6e2 100644 --- a/.github/workflows/pipeline-ci.yml +++ b/.github/workflows/pipeline-ci.yml @@ -17,4 +17,7 @@ jobs: - name: Compilar codigo run: | - mvn package + mvn package + + - name: Pruebas Unitarias + run: mvn test From 0f3d389d7a498ce2dfb30d13ca5029f35fb4dab5 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 00:07:04 -0400 Subject: [PATCH 08/91] Cambiando mensaje de GreetingService --- src/main/java/com/example/testingweb/GreetingService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/example/testingweb/GreetingService.java b/src/main/java/com/example/testingweb/GreetingService.java index 6661c82b..83f51575 100644 --- a/src/main/java/com/example/testingweb/GreetingService.java +++ b/src/main/java/com/example/testingweb/GreetingService.java @@ -5,6 +5,6 @@ @Service public class GreetingService { public String greet() { - return "Hello, World"; + return "Hola, soy Esteban Espinoza"; } } From 3ef54ac1d8b928ddf9ca5f53cbb5939ef2ea76c4 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 00:10:07 -0400 Subject: [PATCH 09/91] Update HomeController.java: cambio mensaje --- src/main/java/com/example/testingweb/HomeController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/example/testingweb/HomeController.java b/src/main/java/com/example/testingweb/HomeController.java index 6472ecdf..f1adfa78 100644 --- a/src/main/java/com/example/testingweb/HomeController.java +++ b/src/main/java/com/example/testingweb/HomeController.java @@ -9,7 +9,7 @@ public class HomeController { @RequestMapping("/") public @ResponseBody String greeting() { - return "Hello, World"; + return "Hola, Soy Esteban Espinoza"; } } From 0c2931eb05fd67538728044bc72cc8320b6d68a2 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 00:20:37 -0400 Subject: [PATCH 10/91] Update pipeline-ci.yml --- .github/workflows/pipeline-ci.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/pipeline-ci.yml b/.github/workflows/pipeline-ci.yml index 3dc9d6e2..e034892d 100644 --- a/.github/workflows/pipeline-ci.yml +++ b/.github/workflows/pipeline-ci.yml @@ -21,3 +21,17 @@ jobs: - name: Pruebas Unitarias run: mvn test + + - name: Setup Java JDK 17 + uses: actions/setup-java@v4.2.1 + with: + java-version: '17' + distribution: 'temurin' + + # - name: Analisis SonarCloud + # run: | + # mvn clean verify org.sonarsource.scanner.maven:sonar-maven-plugin:3.11.0.3922:sonar \ + # -Dsonar.token=${{ secrets.SONAR_TOKEN }} \ + # -Dsonar.host.url=https://sonarcloud.io \ + # -Dsonar.organization=devops-lab-final \ + # -Dsonar.projectKey=devOps-lab-final_ms-aumento-voto From 6089f23e444fcb45fac315fdbb6f2ad9a3b649e7 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 00:23:40 -0400 Subject: [PATCH 11/91] Jacoco Plugin maven --- pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pom.xml b/pom.xml index a5c9e6e2..af7f7fbb 100644 --- a/pom.xml +++ b/pom.xml @@ -37,6 +37,11 @@ org.springframework.boot spring-boot-maven-plugin + + org.jacoco + jacoco-maven-plugin + 0.8.13-SNAPSHOT + From e25ee17a624d7193dc3d20bb2b069fbe54130e56 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 00:26:41 -0400 Subject: [PATCH 12/91] test con jacoco --- .github/workflows/pipeline-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pipeline-ci.yml b/.github/workflows/pipeline-ci.yml index e034892d..c5042ac5 100644 --- a/.github/workflows/pipeline-ci.yml +++ b/.github/workflows/pipeline-ci.yml @@ -20,7 +20,7 @@ jobs: mvn package - name: Pruebas Unitarias - run: mvn test + run: mvn clean test jacoco:report - name: Setup Java JDK 17 uses: actions/setup-java@v4.2.1 From c0d474fb6374ef188fe245b6d27bbc968c56a0cf Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 00:40:51 -0400 Subject: [PATCH 13/91] Update pom.xml jacoco config --- pom.xml | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index af7f7fbb..cc94c430 100644 --- a/pom.xml +++ b/pom.xml @@ -41,7 +41,41 @@ org.jacoco jacoco-maven-plugin 0.8.13-SNAPSHOT - + + + default-prepare-agent + + prepare-agent + + + + default-report + + report + + + + default-check + + check + + + + + BUNDLE + + + COMPLEXITY + COVEREDRATIO + 0.60 + + + + + + + + From e2d3969fdfea2266608860e65ab7864f9e671ec4 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 00:42:54 -0400 Subject: [PATCH 14/91] Update pom.xml --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index cc94c430..3939f6fa 100644 --- a/pom.xml +++ b/pom.xml @@ -39,8 +39,8 @@ org.jacoco - jacoco-maven-plugin - 0.8.13-SNAPSHOT + jacoco-maven-plugin + 0.8.13-SNAPSHOT default-prepare-agent From b1b6d20825b41ff11d97de5ab96b28ae71df3a4e Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 00:47:57 -0400 Subject: [PATCH 15/91] Agregadas dependencias jacoco --- pom.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pom.xml b/pom.xml index 3939f6fa..fd0edb56 100644 --- a/pom.xml +++ b/pom.xml @@ -29,6 +29,12 @@ spring-boot-starter-test test + + + org.jacoco + jacoco-maven-plugin + 0.8.12 + From e713d5b0ec20b13a25c811a13aec0ba484717ecc Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 00:48:42 -0400 Subject: [PATCH 16/91] actualizada version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index fd0edb56..6bf1baec 100644 --- a/pom.xml +++ b/pom.xml @@ -46,7 +46,7 @@ org.jacoco jacoco-maven-plugin - 0.8.13-SNAPSHOT + 0.8.12 default-prepare-agent From 3c5dcf57f8d962f48a8f6efd086e51acd42ceee1 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 00:51:24 -0400 Subject: [PATCH 17/91] Update pipeline-ci.yml --- .github/workflows/pipeline-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pipeline-ci.yml b/.github/workflows/pipeline-ci.yml index c5042ac5..e034892d 100644 --- a/.github/workflows/pipeline-ci.yml +++ b/.github/workflows/pipeline-ci.yml @@ -20,7 +20,7 @@ jobs: mvn package - name: Pruebas Unitarias - run: mvn clean test jacoco:report + run: mvn test - name: Setup Java JDK 17 uses: actions/setup-java@v4.2.1 From b64dd4cf7d99da845f145cbaf90b928c5d6e1edb Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 00:54:05 -0400 Subject: [PATCH 18/91] jacoco otra vez --- pom.xml | 64 ++++++++++++++++++--------------------------------------- 1 file changed, 20 insertions(+), 44 deletions(-) diff --git a/pom.xml b/pom.xml index 6bf1baec..cb15880c 100644 --- a/pom.xml +++ b/pom.xml @@ -29,12 +29,7 @@ spring-boot-starter-test test - - - org.jacoco - jacoco-maven-plugin - 0.8.12 - + @@ -44,44 +39,25 @@ spring-boot-maven-plugin - org.jacoco - jacoco-maven-plugin - 0.8.12 - - - default-prepare-agent - - prepare-agent - - - - default-report - - report - - - - default-check - - check - - - - - BUNDLE - - - COMPLEXITY - COVEREDRATIO - 0.60 - - - - - - - - + org.jacoco + jacoco-maven-plugin + 0.8.12 + + + + prepare-agent + + + + + report + test + + report + + + + From ccb0bcbabf863084038f70e8c05ca13a4ff18649 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 01:05:12 -0400 Subject: [PATCH 19/91] jacoco otra vez --- pom.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pom.xml b/pom.xml index cb15880c..ab80cb92 100644 --- a/pom.xml +++ b/pom.xml @@ -42,6 +42,20 @@ org.jacoco jacoco-maven-plugin 0.8.12 + + + + BUNDLE + + + LINE + COVEREDRATIO + 0.85 + + + + + From 8bf7b33c70261202b7eba819c8e72b8f3b2cde5a Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 01:07:01 -0400 Subject: [PATCH 20/91] Update pom.xml --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ab80cb92..134d5910 100644 --- a/pom.xml +++ b/pom.xml @@ -50,7 +50,7 @@ LINE COVEREDRATIO - 0.85 + 0.02 From 5ef52d3d2ca778e719b5ec1a67c04053d39a900e Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 01:16:47 -0400 Subject: [PATCH 21/91] Update pom.xml --- pom.xml | 71 ++++++++++++++++++++++++++++++--------------------------- 1 file changed, 38 insertions(+), 33 deletions(-) diff --git a/pom.xml b/pom.xml index 134d5910..36272ea2 100644 --- a/pom.xml +++ b/pom.xml @@ -39,39 +39,44 @@ spring-boot-maven-plugin - org.jacoco - jacoco-maven-plugin - 0.8.12 - - - - BUNDLE - - - LINE - COVEREDRATIO - 0.02 - - - - - - - - - prepare-agent - - - - - report - test - - report - - - - +org.jacoco +jacoco-maven-plugin +0.8.13-SNAPSHOT + + +default-prepare-agent + +prepare-agent + + + +default-report + +report + + + +default-check + +check + + + + +BUNDLE + + +COMPLEXITY +COVEREDRATIO +0.60 + + + + + + + + From 780037b14e19132fea250f62bcba8d004f634a0d Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 01:18:03 -0400 Subject: [PATCH 22/91] jacoco 12 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 36272ea2..f5c5bdb4 100644 --- a/pom.xml +++ b/pom.xml @@ -41,7 +41,7 @@ org.jacoco jacoco-maven-plugin -0.8.13-SNAPSHOT +0.8.12 default-prepare-agent From 50140f11c8ecac89695d7d837701f6c2b81a11f5 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 01:29:57 -0400 Subject: [PATCH 23/91] dependencia --- pom.xml | 81 ++++++++++++++++++++++++++++++--------------------------- 1 file changed, 43 insertions(+), 38 deletions(-) diff --git a/pom.xml b/pom.xml index f5c5bdb4..7db64d7f 100644 --- a/pom.xml +++ b/pom.xml @@ -29,6 +29,11 @@ spring-boot-starter-test test + + org.jacoco + jacoco-maven-plugin + 0.8.12 + @@ -39,44 +44,44 @@ spring-boot-maven-plugin -org.jacoco -jacoco-maven-plugin -0.8.12 - - -default-prepare-agent - -prepare-agent - - - -default-report - -report - - - -default-check - -check - - - - -BUNDLE - - -COMPLEXITY -COVEREDRATIO -0.60 - - - - - - - - + org.jacoco + jacoco-maven-plugin + 0.8.12 + + + default-prepare-agent + + prepare-agent + + + + default-report + + report + + + + default-check + + check + + + + + BUNDLE + + + COMPLEXITY + COVEREDRATIO + 0.60 + + + + + + + + From eb0ad98235c5c4890c34234211fc11c6a60f4b4c Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 01:31:05 -0400 Subject: [PATCH 24/91] umbral --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7db64d7f..0eca4649 100644 --- a/pom.xml +++ b/pom.xml @@ -73,7 +73,7 @@ COMPLEXITY COVEREDRATIO - 0.60 + 0.20 From 67d835bd4acb564292b5e9c39463fa9c0d6bfb4f Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 01:35:11 -0400 Subject: [PATCH 25/91] Update pom.xml counter line --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0eca4649..c508e9fe 100644 --- a/pom.xml +++ b/pom.xml @@ -71,7 +71,7 @@ BUNDLE - COMPLEXITY + LINE COVEREDRATIO 0.20 From 826a08097d9e4c1e34d88b4276c81f99d8dc3e79 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 01:36:21 -0400 Subject: [PATCH 26/91] mvn clean package --- .github/workflows/pipeline-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pipeline-ci.yml b/.github/workflows/pipeline-ci.yml index e034892d..a3182a0d 100644 --- a/.github/workflows/pipeline-ci.yml +++ b/.github/workflows/pipeline-ci.yml @@ -17,7 +17,7 @@ jobs: - name: Compilar codigo run: | - mvn package + mvn clean package - name: Pruebas Unitarias run: mvn test From 04541abff8a4ae543fb92ea0bfa367c95ba2fc32 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 01:50:06 -0400 Subject: [PATCH 27/91] Agregado config default Jacoco --- pom.xml | 48 ++++++++++++++---------------------------------- 1 file changed, 14 insertions(+), 34 deletions(-) diff --git a/pom.xml b/pom.xml index c508e9fe..d4e80d51 100644 --- a/pom.xml +++ b/pom.xml @@ -47,40 +47,20 @@ org.jacoco jacoco-maven-plugin 0.8.12 - - - default-prepare-agent - - prepare-agent - - - - default-report - - report - - - - default-check - - check - - - - - BUNDLE - - - LINE - COVEREDRATIO - 0.20 - - - - - - - + + + + prepare-agent + + + + report + prepare-package + + report + + + From 1346b3586a800786d10f70fe6bf6f4c9f9854dd3 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 01:52:43 -0400 Subject: [PATCH 28/91] probando jacoco action --- .github/workflows/pipeline-ci.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pipeline-ci.yml b/.github/workflows/pipeline-ci.yml index a3182a0d..5fcca045 100644 --- a/.github/workflows/pipeline-ci.yml +++ b/.github/workflows/pipeline-ci.yml @@ -15,10 +15,18 @@ jobs: distribution: 'temurin' - - name: Compilar codigo - run: | - mvn clean package - + # - name: Compilar codigo + # run: | + # mvn clean package + - name: Generate Coverage Report + run: mvn clean verify + + - name: Archive Jacoco reports + uses: actions/upload-artifact@v4 + with: + name: jacoco-reports + path: test-coverage/target/site/jacoco-aggregate + - name: Pruebas Unitarias run: mvn test From 3d52506b3ae6ac962a936d8ed9979b20497e605d Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 02:02:05 -0400 Subject: [PATCH 29/91] Update pom.xml --- pom.xml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/pom.xml b/pom.xml index d4e80d51..0cc6e609 100644 --- a/pom.xml +++ b/pom.xml @@ -60,7 +60,28 @@ report + + jacoco-check + + check + + + + + PACKAGE + + + LINE + COVEREDRATIO + 0.1 + + + + + + + From 388722290bc12b0f7f403b02749406acbd503af4 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 02:03:53 -0400 Subject: [PATCH 30/91] Update pom.xml --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0cc6e609..a3203b61 100644 --- a/pom.xml +++ b/pom.xml @@ -73,7 +73,7 @@ LINE COVEREDRATIO - 0.1 + 1% From 5197c372b2d547df6a35742f3d2c5cf3a2c138d4 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 02:10:07 -0400 Subject: [PATCH 31/91] Jacoco otra vez --- pom.xml | 67 +++++++++++++++++++++------------------------------------ 1 file changed, 25 insertions(+), 42 deletions(-) diff --git a/pom.xml b/pom.xml index a3203b61..21f8b370 100644 --- a/pom.xml +++ b/pom.xml @@ -31,8 +31,8 @@ org.jacoco - jacoco-maven-plugin - 0.8.12 + jacoco + 1.2.5 @@ -44,46 +44,29 @@ spring-boot-maven-plugin - org.jacoco - jacoco-maven-plugin - 0.8.12 - - - - prepare-agent - - - - report - prepare-package - - report - - - - jacoco-check - - check - - - - - PACKAGE - - - LINE - COVEREDRATIO - 1% - - - - - - - - - + org.jacoco + jacoco-maven-plugin + 1.3.3 + + + prepare-agent + report + + + ${project.build.directory}/jacoco + ${project.build.directory}/jacoco/jacoco.exec + + html + xml + + + + + + - + + 0.10 + From d84c5ba6af518386e0875c7764d14820f2d0ec1a Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 02:12:45 -0400 Subject: [PATCH 32/91] propiedades actualizadas --- pom.xml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 21f8b370..e57d0150 100644 --- a/pom.xml +++ b/pom.xml @@ -15,7 +15,8 @@ Demo project for Spring Boot - 1.8 + 1.80.10 @@ -66,7 +67,7 @@ - - 0.10 - + + + From 3915649b898af404684a28edccc3c31fc53d9395 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 02:13:29 -0400 Subject: [PATCH 33/91] fix --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e57d0150..96c02282 100644 --- a/pom.xml +++ b/pom.xml @@ -15,7 +15,7 @@ Demo project for Spring Boot - 1.81.8 0.10 From 1b166a73c0fb0d3fa42ce7455243eecb7e3799a1 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 02:15:00 -0400 Subject: [PATCH 34/91] Update pom.xml --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 96c02282..fbaa3ce1 100644 --- a/pom.xml +++ b/pom.xml @@ -33,7 +33,7 @@ org.jacoco jacoco - 1.2.5 + 1.3.3 From e6e5e432cb86680d41605d03956dcffee97cd252 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 02:16:19 -0400 Subject: [PATCH 35/91] =?UTF-8?q?versi=C3=B3n=20jacoco?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index fbaa3ce1..d7190efd 100644 --- a/pom.xml +++ b/pom.xml @@ -33,7 +33,7 @@ org.jacoco jacoco - 1.3.3 + 0.8.12 @@ -47,7 +47,7 @@ org.jacoco jacoco-maven-plugin - 1.3.3 + 0.8.12 prepare-agent From f841cb2faf61fd9468eca92bb964dc4ffedfa029 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 02:19:23 -0400 Subject: [PATCH 36/91] Update pom.xml --- pom.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index d7190efd..649c45dd 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ 1.8 - 0.10 + @@ -32,8 +32,8 @@ org.jacoco - jacoco - 0.8.12 + jacoco-maven-plugin + 0.8.13-SNAPSHOT @@ -47,7 +47,7 @@ org.jacoco jacoco-maven-plugin - 0.8.12 + 0.8.13-SNAPSHOT prepare-agent From 29a868bdef585932bf0f4681c49f51be38ffe1a6 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 02:22:08 -0400 Subject: [PATCH 37/91] Update pom.xml --- pom.xml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 649c45dd..c462d52d 100644 --- a/pom.xml +++ b/pom.xml @@ -48,18 +48,33 @@ org.jacoco jacoco-maven-plugin 0.8.13-SNAPSHOT - + + prepare-agent report + + + BUNDLE + + + COMPLEXITY + COVEREDRATIO + 0.1 + + + + + ${project.build.directory}/jacoco ${project.build.directory}/jacoco/jacoco.exec html xml + From d44543028a764bff2b5e57932669c9a52dab84aa Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 02:25:48 -0400 Subject: [PATCH 38/91] Update pom.xml --- pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/pom.xml b/pom.xml index c462d52d..ef036a4f 100644 --- a/pom.xml +++ b/pom.xml @@ -35,6 +35,7 @@ jacoco-maven-plugin 0.8.13-SNAPSHOT + From aff38f90e7627ab350973e412d2e1cdf965d1133 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 02:27:51 -0400 Subject: [PATCH 39/91] Update pom.xml --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index ef036a4f..b31f1db2 100644 --- a/pom.xml +++ b/pom.xml @@ -47,8 +47,8 @@ org.jacoco - jacoco-maven-plugin - 0.8.13-SNAPSHOT + jacoco-maven-plugin + 0.8.13-SNAPSHOT From 9edc95c0c00cf4b976c00a58ae2d43eea37f0592 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 02:29:18 -0400 Subject: [PATCH 40/91] Update pipeline-ci.yml --- .github/workflows/pipeline-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pipeline-ci.yml b/.github/workflows/pipeline-ci.yml index 5fcca045..9ac3dd73 100644 --- a/.github/workflows/pipeline-ci.yml +++ b/.github/workflows/pipeline-ci.yml @@ -19,7 +19,7 @@ jobs: # run: | # mvn clean package - name: Generate Coverage Report - run: mvn clean verify + run: mvn clean package - name: Archive Jacoco reports uses: actions/upload-artifact@v4 From 265d696e4dbf6938c179ff0df8c6af7109eb43a7 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 02:33:09 -0400 Subject: [PATCH 41/91] Update pom.xml --- pom.xml | 47 ++++++----------------------------------------- 1 file changed, 6 insertions(+), 41 deletions(-) diff --git a/pom.xml b/pom.xml index b31f1db2..5a956395 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,6 @@ 1.8 - @@ -33,10 +32,9 @@ org.jacoco jacoco-maven-plugin - 0.8.13-SNAPSHOT + 0.8.12 - @@ -46,44 +44,11 @@ spring-boot-maven-plugin - org.jacoco - jacoco-maven-plugin - 0.8.13-SNAPSHOT - - - - prepare-agent - report - - - - - BUNDLE - - - COMPLEXITY - COVEREDRATIO - 0.1 - - - - - - ${project.build.directory}/jacoco - ${project.build.directory}/jacoco/jacoco.exec - - html - xml - - - - - - - + org.jacoco + jacoco-maven-plugin + 0.8.12 + - - - + From f914cb73db68a358204c24563c561d3c1aaa83e5 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 02:35:46 -0400 Subject: [PATCH 42/91] Update pom.xml --- pom.xml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pom.xml b/pom.xml index 5a956395..0ac89b9b 100644 --- a/pom.xml +++ b/pom.xml @@ -47,6 +47,23 @@ org.jacoco jacoco-maven-plugin 0.8.12 + + + BUNDLE + + + INSTRUCTION + COVEREDRATIO + 0.80 + + + CLASS + MISSEDCOUNT + 0 + + + + From 9862c9a82d080b7051f3fdc159d4e194b1ee4f69 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 02:39:01 -0400 Subject: [PATCH 43/91] Update pom.xml --- pom.xml | 58 +++++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 42 insertions(+), 16 deletions(-) diff --git a/pom.xml b/pom.xml index 0ac89b9b..7662b468 100644 --- a/pom.xml +++ b/pom.xml @@ -29,6 +29,13 @@ spring-boot-starter-test test + + junit + junit + 4.13.1 + test + + org.jacoco jacoco-maven-plugin @@ -47,23 +54,42 @@ org.jacoco jacoco-maven-plugin 0.8.12 + + + default-prepare-agent + + prepare-agent + + + + default-report + + report + + + + default-check + + check + + - - BUNDLE - - - INSTRUCTION - COVEREDRATIO - 0.80 - - - CLASS - MISSEDCOUNT - 0 - - - - + + BUNDLE + + + COMPLEXITY + COVEREDRATIO + 0.10 + + + + + + + + + From 61b3bd21408c330efc2327f5f464b24c8e14174e Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 02:40:01 -0400 Subject: [PATCH 44/91] jacoco --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7662b468..40bd6ae2 100644 --- a/pom.xml +++ b/pom.xml @@ -35,7 +35,7 @@ 4.13.1 test - + org.jacoco jacoco-maven-plugin From 2285c2f6ca3e8ec7c578d313f0621b5b56d335bc Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 14:16:48 -0400 Subject: [PATCH 45/91] Probando --- src/main/java/com/example/testingweb/GreetingService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/example/testingweb/GreetingService.java b/src/main/java/com/example/testingweb/GreetingService.java index 83f51575..b5250bba 100644 --- a/src/main/java/com/example/testingweb/GreetingService.java +++ b/src/main/java/com/example/testingweb/GreetingService.java @@ -5,6 +5,6 @@ @Service public class GreetingService { public String greet() { - return "Hola, soy Esteban Espinoza"; + return "Hello World, soy Esteban Espinoza"; } } From 537db3d5274ee7140c258da0dfe31bc19e8aa140 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 14:18:22 -0400 Subject: [PATCH 46/91] Probando 2 --- src/main/java/com/example/testingweb/HomeController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/example/testingweb/HomeController.java b/src/main/java/com/example/testingweb/HomeController.java index f1adfa78..c2db65f3 100644 --- a/src/main/java/com/example/testingweb/HomeController.java +++ b/src/main/java/com/example/testingweb/HomeController.java @@ -9,7 +9,7 @@ public class HomeController { @RequestMapping("/") public @ResponseBody String greeting() { - return "Hola, Soy Esteban Espinoza"; + return "Hello, World, Soy Esteban Espinoza"; } } From b77c2147066a63a77959d83e1cd426cdb93fe360 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 14:30:31 -0400 Subject: [PATCH 47/91] Probando reporte --- .github/workflows/pipeline-ci.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pipeline-ci.yml b/.github/workflows/pipeline-ci.yml index 9ac3dd73..2813fb20 100644 --- a/.github/workflows/pipeline-ci.yml +++ b/.github/workflows/pipeline-ci.yml @@ -19,16 +19,17 @@ jobs: # run: | # mvn clean package - name: Generate Coverage Report - run: mvn clean package + run: | + mvn clean package - name: Archive Jacoco reports uses: actions/upload-artifact@v4 with: name: jacoco-reports - path: test-coverage/target/site/jacoco-aggregate + path: target/site/jacoco/index.html - - name: Pruebas Unitarias - run: mvn test + # - name: Pruebas Unitarias + # run: mvn test - name: Setup Java JDK 17 uses: actions/setup-java@v4.2.1 From 52e20da6fc39db2d2b30ad928f47664977c46a93 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 14:40:42 -0400 Subject: [PATCH 48/91] pom actualizado --- pom.xml | 76 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 37 insertions(+), 39 deletions(-) diff --git a/pom.xml b/pom.xml index 40bd6ae2..d34aacff 100644 --- a/pom.xml +++ b/pom.xml @@ -35,6 +35,12 @@ 4.13.1 test + + org.apache.maven.plugins + maven-surefire-plugin + 3.2.5 + maven-plugin + org.jacoco @@ -51,45 +57,37 @@ spring-boot-maven-plugin - org.jacoco - jacoco-maven-plugin - 0.8.12 - - - default-prepare-agent - - prepare-agent - - - - default-report - - report - - - - default-check - - check - - - - - BUNDLE - - - COMPLEXITY - COVEREDRATIO - 0.10 - - - - - - - - - + org.jacoco + jacoco-maven-plugin + 0.8.12 + + + + + report + test + + report + + + + + CLASS + + *Test + + + + LINE + COVEREDRATIO + 10% + + + + + + + From cc9dcfa271cd33cb3732099ca207a873b2c1964c Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 14:41:21 -0400 Subject: [PATCH 49/91] probando jacoco --- .github/workflows/pipeline-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pipeline-ci.yml b/.github/workflows/pipeline-ci.yml index 2813fb20..fb68f3d5 100644 --- a/.github/workflows/pipeline-ci.yml +++ b/.github/workflows/pipeline-ci.yml @@ -26,7 +26,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: jacoco-reports - path: target/site/jacoco/index.html + path: jacoco/index.html # - name: Pruebas Unitarias # run: mvn test From 3a2c98edc68bae8b9455399ca93d4b08cc1c3708 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 14:42:57 -0400 Subject: [PATCH 50/91] Modificando mensaje --- src/main/java/com/example/testingweb/HomeController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/example/testingweb/HomeController.java b/src/main/java/com/example/testingweb/HomeController.java index c2db65f3..f1adfa78 100644 --- a/src/main/java/com/example/testingweb/HomeController.java +++ b/src/main/java/com/example/testingweb/HomeController.java @@ -9,7 +9,7 @@ public class HomeController { @RequestMapping("/") public @ResponseBody String greeting() { - return "Hello, World, Soy Esteban Espinoza"; + return "Hola, Soy Esteban Espinoza"; } } From 3329dd8a262df2d322913f14d88b5c75ae9172d5 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 14:54:16 -0400 Subject: [PATCH 51/91] revisando cosas --- .github/workflows/pipeline-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pipeline-ci.yml b/.github/workflows/pipeline-ci.yml index fb68f3d5..6ec22fc5 100644 --- a/.github/workflows/pipeline-ci.yml +++ b/.github/workflows/pipeline-ci.yml @@ -11,7 +11,7 @@ jobs: - name: Setup Java JDK uses: actions/setup-java@v4.2.1 with: - java-version: '8' + java-version: '17' distribution: 'temurin' @@ -21,6 +21,7 @@ jobs: - name: Generate Coverage Report run: | mvn clean package + ls jacoco - name: Archive Jacoco reports uses: actions/upload-artifact@v4 From c850c5a5c2cdacc65bf6db2170cc64f04f949852 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 15:06:23 -0400 Subject: [PATCH 52/91] Actualizado plugin --- pom.xml | 45 +++++++++++++++++++-------------------------- 1 file changed, 19 insertions(+), 26 deletions(-) diff --git a/pom.xml b/pom.xml index d34aacff..ef6530b5 100644 --- a/pom.xml +++ b/pom.xml @@ -35,13 +35,6 @@ 4.13.1 test - - org.apache.maven.plugins - maven-surefire-plugin - 3.2.5 - maven-plugin - - org.jacoco jacoco-maven-plugin @@ -61,31 +54,31 @@ jacoco-maven-plugin 0.8.12 - - + + + prepare-agent + + report test report - - - - CLASS - - *Test - - - - LINE - COVEREDRATIO - 10% - - - - - + + + + CLASS + + + LINE + COVEREDRATIO + 0.01 + + + + + From 2667066b202cfd25dd7662947fb0053ced2a2904 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 15:09:50 -0400 Subject: [PATCH 53/91] surefire --- pom.xml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index ef6530b5..9d239bd5 100644 --- a/pom.xml +++ b/pom.xml @@ -49,16 +49,21 @@ org.springframework.boot spring-boot-maven-plugin + + org.apache.maven.plugins + maven-surefire-plugin + 3.1.2 + org.jacoco jacoco-maven-plugin 0.8.12 - - - prepare-agent - - + + + prepare-agent + + report test @@ -78,7 +83,7 @@ - + From 3487b8b93c309ca13482c9cebe266a4a806045d9 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 15:15:25 -0400 Subject: [PATCH 54/91] surefire test --- pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pom.xml b/pom.xml index 9d239bd5..b8c59314 100644 --- a/pom.xml +++ b/pom.xml @@ -53,6 +53,11 @@ org.apache.maven.plugins maven-surefire-plugin 3.1.2 + + + **/Test*.java + + org.jacoco From 48508caa9525dda1e3e4f39708121bcaee540291 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 15:18:28 -0400 Subject: [PATCH 55/91] teting --- pom.xml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index b8c59314..5335ea4b 100644 --- a/pom.xml +++ b/pom.xml @@ -54,9 +54,7 @@ maven-surefire-plugin 3.1.2 - - **/Test*.java - + false From b873bf7e3dfe87a9ce061da7b6aa34a13a177591 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 15:20:22 -0400 Subject: [PATCH 56/91] Update pom.xml --- pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pom.xml b/pom.xml index 5335ea4b..0edfa94c 100644 --- a/pom.xml +++ b/pom.xml @@ -57,6 +57,11 @@ false + + org.apache.maven.plugins + maven-failsafe-plugin + 3.1.2 + org.jacoco jacoco-maven-plugin From fed22a7961be30b01cedb6a7d9a7cca0da53b2c8 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 15:24:56 -0400 Subject: [PATCH 57/91] probando --- pom.xml | 65 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/pom.xml b/pom.xml index 0edfa94c..a7567f85 100644 --- a/pom.xml +++ b/pom.xml @@ -49,51 +49,50 @@ org.springframework.boot spring-boot-maven-plugin - - org.apache.maven.plugins - maven-surefire-plugin - 3.1.2 - - false - - - - org.apache.maven.plugins - maven-failsafe-plugin - 3.1.2 - org.jacoco jacoco-maven-plugin - 0.8.12 - - - prepare-agent - - + + + prepare-agent + + report test report - - - - CLASS - - - LINE - COVEREDRATIO - 0.01 - - - - - + + + + CLASS + + + LINE + COVEREDRATIO + 0.01 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.1.2 + + false + + + + org.apache.maven.plugins + maven-failsafe-plugin + 3.1.2 From c49dbebac1715e320038cad5e83c269f6209e4b3 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 15:29:35 -0400 Subject: [PATCH 58/91] Update pom.xml --- pom.xml | 50 +++++++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/pom.xml b/pom.xml index a7567f85..bf184b4f 100644 --- a/pom.xml +++ b/pom.xml @@ -56,28 +56,29 @@ prepare-agent + report - - report - test - - report - - - - - CLASS - - - LINE - COVEREDRATIO - 0.01 - - - - - + + report + test + + report + + + + + CLASS + + + LINE + COVEREDRATIO + 0.01 + + + + + @@ -85,14 +86,17 @@ org.apache.maven.plugins maven-surefire-plugin 3.1.2 - - false - + + ${skipUTs} + org.apache.maven.plugins maven-failsafe-plugin 3.1.2 + + ${skipITs} + From af8348545390b76afb1029c632ed5e320842d3fe Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 15:33:29 -0400 Subject: [PATCH 59/91] version --- pom.xml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index bf184b4f..2feae10b 100644 --- a/pom.xml +++ b/pom.xml @@ -52,13 +52,14 @@ org.jacoco jacoco-maven-plugin + 0.8.12 - - - prepare-agent - report - - + + + prepare-agent + report + + report test From 5dca2f6250ba010150e23d9d3d0af35b50fe1072 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 15:34:02 -0400 Subject: [PATCH 60/91] Update pipeline-ci.yml --- .github/workflows/pipeline-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pipeline-ci.yml b/.github/workflows/pipeline-ci.yml index 6ec22fc5..f222ac3a 100644 --- a/.github/workflows/pipeline-ci.yml +++ b/.github/workflows/pipeline-ci.yml @@ -20,8 +20,8 @@ jobs: # mvn clean package - name: Generate Coverage Report run: | - mvn clean package - ls jacoco + mvn clean verify + - name: Archive Jacoco reports uses: actions/upload-artifact@v4 From 56390d8d685a0a7f8180a62352e3d51d24f98aa6 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 15:38:29 -0400 Subject: [PATCH 61/91] probando --- pom.xml | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/pom.xml b/pom.xml index 2feae10b..7012462a 100644 --- a/pom.xml +++ b/pom.xml @@ -54,32 +54,26 @@ jacoco-maven-plugin 0.8.12 - - - prepare-agent - report - - report test report - - - - CLASS - - - LINE - COVEREDRATIO - 0.01 - - - - - + + + + CLASS + + + LINE + COVEREDRATIO + 0.01 + + + + + From b762634b8b42e6b5c1fbee25375066017bd53493 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 15:40:16 -0400 Subject: [PATCH 62/91] Update HomeController.java --- src/main/java/com/example/testingweb/HomeController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/example/testingweb/HomeController.java b/src/main/java/com/example/testingweb/HomeController.java index f1adfa78..91876271 100644 --- a/src/main/java/com/example/testingweb/HomeController.java +++ b/src/main/java/com/example/testingweb/HomeController.java @@ -9,7 +9,7 @@ public class HomeController { @RequestMapping("/") public @ResponseBody String greeting() { - return "Hola, Soy Esteban Espinoza"; + return "Hello, World , Soy Esteban Espinoza"; } } From bc2321ff2469480f0948bbdc633aeaea75b5d3b2 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 15:49:26 -0400 Subject: [PATCH 63/91] probando otra vez --- pom.xml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 7012462a..4f4adf4a 100644 --- a/pom.xml +++ b/pom.xml @@ -55,18 +55,24 @@ 0.8.12 - report + default-report test report + + + default-check + + check + - CLASS + BUNDLE - LINE + COMPLEXITY COVEREDRATIO 0.01 From cd93834308295365de32e9ce1b4cfba69e356b9c Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 15:53:03 -0400 Subject: [PATCH 64/91] arggline --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 4f4adf4a..f88fde82 100644 --- a/pom.xml +++ b/pom.xml @@ -87,9 +87,9 @@ org.apache.maven.plugins maven-surefire-plugin 3.1.2 - - ${skipUTs} - + + ${argLine} + org.apache.maven.plugins From b43dd6f047e1bd54d600969255768ab3dccce5ee Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 15:59:15 -0400 Subject: [PATCH 65/91] jacoco report --- pom.xml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index f88fde82..cb16aacf 100644 --- a/pom.xml +++ b/pom.xml @@ -55,11 +55,13 @@ 0.8.12 - default-report - test + pre-unit-test - report + prepare-agent + + ${project.build.directory}/coverage-reports/jacoco-ut.exec + default-check @@ -81,6 +83,17 @@ + + post-unit-test + test + + report + + + ${project.build.directory}/coverage-reports/jacoco-ut.exec + ${project.reporting.outputDirectory}/jacoco-ut + + From 7a6f3b733686c5f4024d3a29498e544b1fe9b42d Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 16:00:15 -0400 Subject: [PATCH 66/91] Update HomeController.java --- src/main/java/com/example/testingweb/HomeController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/example/testingweb/HomeController.java b/src/main/java/com/example/testingweb/HomeController.java index 91876271..b7ce366c 100644 --- a/src/main/java/com/example/testingweb/HomeController.java +++ b/src/main/java/com/example/testingweb/HomeController.java @@ -9,7 +9,7 @@ public class HomeController { @RequestMapping("/") public @ResponseBody String greeting() { - return "Hello, World , Soy Esteban Espinoza"; + return "Hola , Soy Esteban Espinoza"; } } From d591df9ab84aadcb082ebfa0116f4894755bd452 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 16:03:15 -0400 Subject: [PATCH 67/91] Update pom.xml --- pom.xml | 130 +++++++++++++++++++++++++++++--------------------------- 1 file changed, 68 insertions(+), 62 deletions(-) diff --git a/pom.xml b/pom.xml index cb16aacf..fb18eeb6 100644 --- a/pom.xml +++ b/pom.xml @@ -50,68 +50,74 @@ spring-boot-maven-plugin - org.jacoco - jacoco-maven-plugin - 0.8.12 - - - pre-unit-test - - prepare-agent - - - ${project.build.directory}/coverage-reports/jacoco-ut.exec - - - - default-check - - check - - - - - BUNDLE - - - COMPLEXITY - COVEREDRATIO - 0.01 - - - - - - - - post-unit-test - test - - report - - - ${project.build.directory}/coverage-reports/jacoco-ut.exec - ${project.reporting.outputDirectory}/jacoco-ut - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 3.1.2 - - ${argLine} - - - - org.apache.maven.plugins - maven-failsafe-plugin - 3.1.2 - - ${skipITs} - - +org.jacoco +jacoco-maven-plugin +0.8.12 + + +default-prepare-agent + +prepare-agent + + + +default-prepare-agent-integration + +prepare-agent-integration + + + +default-report + +report + + + +default-report-integration + +report-integration + + + +default-check + +check + + + + +BUNDLE + + +COMPLEXITY +COVEREDRATIO +0.10 + + + + + + + + + +org.apache.maven.plugins +maven-surefire-plugin +2.16 + + +org.apache.maven.plugins +maven-failsafe-plugin +2.16 + + +default-integration-test + +integration-test + + + + From ace12e5aed6b42c2a41ee143fe42a47d525a8724 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 16:05:15 -0400 Subject: [PATCH 68/91] Update pom.xml --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index fb18eeb6..084c4463 100644 --- a/pom.xml +++ b/pom.xml @@ -86,7 +86,7 @@ -BUNDLE +CLASS COMPLEXITY From c71f7b9d05b491027d580284156ff4cf3b2d89ca Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 16:07:07 -0400 Subject: [PATCH 69/91] Update pom.xml --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 084c4463..0e46b360 100644 --- a/pom.xml +++ b/pom.xml @@ -89,7 +89,7 @@ CLASS -COMPLEXITY +INSTRUCTION COVEREDRATIO 0.10 From b80e0e6c29632d965f5c9b4152d51ec9620a2cc6 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 16:09:02 -0400 Subject: [PATCH 70/91] Update pom.xml --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0e46b360..bf76fa8f 100644 --- a/pom.xml +++ b/pom.xml @@ -89,7 +89,7 @@ CLASS -INSTRUCTION +LINE COVEREDRATIO 0.10 From 8f067a5fcd46676cdbf28d9b61872ffd4de082e6 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 16:10:55 -0400 Subject: [PATCH 71/91] 0.10 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index bf76fa8f..62171433 100644 --- a/pom.xml +++ b/pom.xml @@ -86,10 +86,10 @@ -CLASS +BUNDLE -LINE +METHOD COVEREDRATIO 0.10 From d0574d739a7ad501a73bc4bd32d4bf71eaaa8885 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 16:11:52 -0400 Subject: [PATCH 72/91] 0.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 62171433..96c1ca8b 100644 --- a/pom.xml +++ b/pom.xml @@ -91,7 +91,7 @@ METHOD COVEREDRATIO -0.10 +0.0 From b874c0930c8ed8a3f6a32d8c7d2a6b0154db7713 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 16:15:54 -0400 Subject: [PATCH 73/91] jacoco report --- .github/workflows/pipeline-ci.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pipeline-ci.yml b/.github/workflows/pipeline-ci.yml index f222ac3a..e942b838 100644 --- a/.github/workflows/pipeline-ci.yml +++ b/.github/workflows/pipeline-ci.yml @@ -22,12 +22,10 @@ jobs: run: | mvn clean verify + - name: Revisar carpeta + run: | + ls jacoco - - name: Archive Jacoco reports - uses: actions/upload-artifact@v4 - with: - name: jacoco-reports - path: jacoco/index.html # - name: Pruebas Unitarias # run: mvn test From 3c793c21279f41f782eb5cc5701bc27d959ab852 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 16:20:04 -0400 Subject: [PATCH 74/91] subir reporte jacoco --- .github/workflows/pipeline-ci.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pipeline-ci.yml b/.github/workflows/pipeline-ci.yml index e942b838..5200406e 100644 --- a/.github/workflows/pipeline-ci.yml +++ b/.github/workflows/pipeline-ci.yml @@ -21,11 +21,13 @@ jobs: - name: Generate Coverage Report run: | mvn clean verify - - - name: Revisar carpeta - run: | - ls jacoco + - name: Upload a Build Artifact + uses: actions/upload-artifact@v4.3.3 + with: + name: Reporte Jacoco + path: target/jacoco.exec + # - name: Pruebas Unitarias # run: mvn test From f2e9ad6675e8b429a7da89237510d7c488f6b3be Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 16:23:30 -0400 Subject: [PATCH 75/91] jacoco report --- .github/workflows/pipeline-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pipeline-ci.yml b/.github/workflows/pipeline-ci.yml index 5200406e..283ee8b8 100644 --- a/.github/workflows/pipeline-ci.yml +++ b/.github/workflows/pipeline-ci.yml @@ -20,13 +20,13 @@ jobs: # mvn clean package - name: Generate Coverage Report run: | - mvn clean verify + mvn clean test jacoco:report - name: Upload a Build Artifact uses: actions/upload-artifact@v4.3.3 with: name: Reporte Jacoco - path: target/jacoco.exec + path: target/* # - name: Pruebas Unitarias From 242458ba9e3802fcbea117ee50933074b16dd14a Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 16:50:59 -0400 Subject: [PATCH 76/91] Analisis Sonar Cloud --- .github/workflows/pipeline-ci.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pipeline-ci.yml b/.github/workflows/pipeline-ci.yml index 283ee8b8..c9274cb9 100644 --- a/.github/workflows/pipeline-ci.yml +++ b/.github/workflows/pipeline-ci.yml @@ -18,15 +18,15 @@ jobs: # - name: Compilar codigo # run: | # mvn clean package - - name: Generate Coverage Report + - name: Compilar y Testing run: | mvn clean test jacoco:report - - name: Upload a Build Artifact + - name: Cargar reportes Jacoco como uses: actions/upload-artifact@v4.3.3 with: name: Reporte Jacoco - path: target/* + path: target/site/jacoco/index.html # - name: Pruebas Unitarias @@ -38,10 +38,10 @@ jobs: java-version: '17' distribution: 'temurin' - # - name: Analisis SonarCloud - # run: | - # mvn clean verify org.sonarsource.scanner.maven:sonar-maven-plugin:3.11.0.3922:sonar \ - # -Dsonar.token=${{ secrets.SONAR_TOKEN }} \ - # -Dsonar.host.url=https://sonarcloud.io \ - # -Dsonar.organization=devops-lab-final \ - # -Dsonar.projectKey=devOps-lab-final_ms-aumento-voto + - name: Analisis SonarCloud + run: | + mvn clean verify org.sonarsource.scanner.maven:sonar-maven-plugin:3.11.0.3922:sonar \ + -Dsonar.token=${{ secrets.SONAR_TOKEN }} \ + -Dsonar.host.url=https://sonarcloud.io \ + -Dsonar.organization=devops-lab-final \ + -Dsonar.projectKey=devOps-lab-final_microservicio-java From 21b1873cb235e05711e6c6f4823688d5aa39e38a Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 16:55:46 -0400 Subject: [PATCH 77/91] Modificando mensaje --- src/main/java/com/example/testingweb/GreetingService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/example/testingweb/GreetingService.java b/src/main/java/com/example/testingweb/GreetingService.java index b5250bba..83f51575 100644 --- a/src/main/java/com/example/testingweb/GreetingService.java +++ b/src/main/java/com/example/testingweb/GreetingService.java @@ -5,6 +5,6 @@ @Service public class GreetingService { public String greet() { - return "Hello World, soy Esteban Espinoza"; + return "Hola, soy Esteban Espinoza"; } } From 19d93028a6a3903d4121d48be18cffe57cf8f3ac Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 17:06:33 -0400 Subject: [PATCH 78/91] Prueba cobertura 85 Probando con cobertura iniciarl de 85% --- pom.xml | 141 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 70 insertions(+), 71 deletions(-) diff --git a/pom.xml b/pom.xml index 96c1ca8b..e7ee32c5 100644 --- a/pom.xml +++ b/pom.xml @@ -50,75 +50,74 @@ spring-boot-maven-plugin -org.jacoco -jacoco-maven-plugin -0.8.12 - - -default-prepare-agent - -prepare-agent - - - -default-prepare-agent-integration - -prepare-agent-integration - - - -default-report - -report - - - -default-report-integration - -report-integration - - - -default-check - -check - - - - -BUNDLE - - -METHOD -COVEREDRATIO -0.0 - - - - - - - - - -org.apache.maven.plugins -maven-surefire-plugin -2.16 - - -org.apache.maven.plugins -maven-failsafe-plugin -2.16 - - -default-integration-test - -integration-test - - - - - - - + org.jacoco + jacoco-maven-plugin + 0.8.12 + + + default-prepare-agent + + prepare-agent + + + + default-prepare-agent-integration + + prepare-agent-integration + + + + default-report + + report + + + + default-report-integration + + report-integration + + + + default-check + + check + + + + + BUNDLE + + + INSTRUCTION + COVEREDRATIO + 0.85 + + + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.16 + + + org.apache.maven.plugins + maven-failsafe-plugin + 2.16 + + + default-integration-test + + integration-test + + + + + + From 2f447b8668ce594329c9785fdc9a488e8dd29462 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 17:09:29 -0400 Subject: [PATCH 79/91] Prueba cobertura: Umbral cambiado a 0% --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e7ee32c5..744e3252 100644 --- a/pom.xml +++ b/pom.xml @@ -91,7 +91,7 @@ INSTRUCTION COVEREDRATIO - 0.85 + 0.0 From d6b2d5c71fbaf8ad65e518e0cd48acffe8935f22 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 17:15:23 -0400 Subject: [PATCH 80/91] Creando error variable --- src/main/java/com/example/testingweb/GreetingService.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/example/testingweb/GreetingService.java b/src/main/java/com/example/testingweb/GreetingService.java index 83f51575..adc7f127 100644 --- a/src/main/java/com/example/testingweb/GreetingService.java +++ b/src/main/java/com/example/testingweb/GreetingService.java @@ -5,6 +5,7 @@ @Service public class GreetingService { public String greet() { + String $password = '12345'; return "Hola, soy Esteban Espinoza"; } } From 03e3814aef1400b95d1d25aaacfb5c17a5a05df3 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 17:16:50 -0400 Subject: [PATCH 81/91] Creando variable password --- src/main/java/com/example/testingweb/GreetingService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/example/testingweb/GreetingService.java b/src/main/java/com/example/testingweb/GreetingService.java index adc7f127..f42640e2 100644 --- a/src/main/java/com/example/testingweb/GreetingService.java +++ b/src/main/java/com/example/testingweb/GreetingService.java @@ -5,7 +5,7 @@ @Service public class GreetingService { public String greet() { - String $password = '12345'; + String password = '12345'; return "Hola, soy Esteban Espinoza"; } } From d1a5c54e94b941fe5f866b90db5db538876a4661 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 17:18:12 -0400 Subject: [PATCH 82/91] Variable bloqueante --- src/main/java/com/example/testingweb/GreetingService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/example/testingweb/GreetingService.java b/src/main/java/com/example/testingweb/GreetingService.java index f42640e2..6b453c3b 100644 --- a/src/main/java/com/example/testingweb/GreetingService.java +++ b/src/main/java/com/example/testingweb/GreetingService.java @@ -5,7 +5,7 @@ @Service public class GreetingService { public String greet() { - String password = '12345'; + String password = "12345"; return "Hola, soy Esteban Espinoza"; } } From e81d602e870bc8fdc7d89319defac5b0b374eb55 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 17:47:05 -0400 Subject: [PATCH 83/91] Probando sonar quality gate --- .github/workflows/pipeline-ci.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/pipeline-ci.yml b/.github/workflows/pipeline-ci.yml index c9274cb9..9cc9e581 100644 --- a/.github/workflows/pipeline-ci.yml +++ b/.github/workflows/pipeline-ci.yml @@ -45,3 +45,26 @@ jobs: -Dsonar.host.url=https://sonarcloud.io \ -Dsonar.organization=devops-lab-final \ -Dsonar.projectKey=devOps-lab-final_microservicio-java + + - name: SonarQube Quality Gate check + uses: sonarsource/sonarqube-quality-gate-action@master + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + with: + scanMetadataReportFile: target/sonar/report-task.txt + + - name: Docker Login + uses: docker/login-action@v3.1.0 + with: + username: estebanignacio + password: ${{secrets.DOCKER_PASS}} + + - name: Set Up Docker + uses: docker/setup-buildx-action@v3 + + - name: Docker build + run: | + docker build -t estebanignacio/microservicio-java:latest . + - name: Docker push + run: | + docker push estebanignacio/ms-aumento-voto-test:latest From 5e1c88d80f2757a94e3da0500ad9ff6623e7d0c5 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Sun, 5 May 2024 17:50:48 -0400 Subject: [PATCH 84/91] Sonar quality --- .github/workflows/pipeline-ci.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pipeline-ci.yml b/.github/workflows/pipeline-ci.yml index 9cc9e581..61576538 100644 --- a/.github/workflows/pipeline-ci.yml +++ b/.github/workflows/pipeline-ci.yml @@ -59,12 +59,12 @@ jobs: username: estebanignacio password: ${{secrets.DOCKER_PASS}} - - name: Set Up Docker - uses: docker/setup-buildx-action@v3 + # - name: Set Up Docker + # uses: docker/setup-buildx-action@v3 - - name: Docker build - run: | - docker build -t estebanignacio/microservicio-java:latest . - - name: Docker push - run: | - docker push estebanignacio/ms-aumento-voto-test:latest + # - name: Docker build + # run: | + # docker build -t estebanignacio/microservicio-java:latest . + # - name: Docker push + # run: | + # docker push estebanignacio/microservicio-java:latest From f5adfb321bddd43f73061434b93454301649374c Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Mon, 6 May 2024 09:44:30 -0400 Subject: [PATCH 85/91] Crear DockerFile --- Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..07111638 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM openjdk:8-jdk-alpine +EXPOSE 8080 +ARG JAR_FILE=target/*.jar +ADD ${JAR_FILE} app.jar +ENTRYPOINT ["java","-jar","/app.jar"] From 5501f89e1d769514c9c89f36c89c119baf7e29a2 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Mon, 6 May 2024 09:46:38 -0400 Subject: [PATCH 86/91] Docker Deploy --- .github/workflows/pipeline-ci.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pipeline-ci.yml b/.github/workflows/pipeline-ci.yml index 61576538..d3407c84 100644 --- a/.github/workflows/pipeline-ci.yml +++ b/.github/workflows/pipeline-ci.yml @@ -59,12 +59,12 @@ jobs: username: estebanignacio password: ${{secrets.DOCKER_PASS}} - # - name: Set Up Docker - # uses: docker/setup-buildx-action@v3 + - name: Set Up Docker + uses: docker/setup-buildx-action@v3 - # - name: Docker build - # run: | - # docker build -t estebanignacio/microservicio-java:latest . - # - name: Docker push - # run: | - # docker push estebanignacio/microservicio-java:latest + - name: Docker build + run: | + docker build -t estebanignacio/microservicio-java:latest . + - name: Docker push + run: | + docker push estebanignacio/microservicio-java:latest From 302601b1ecb0d23f4b13682fb76c141336f74650 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Mon, 6 May 2024 09:52:02 -0400 Subject: [PATCH 87/91] Cambio java --- .github/workflows/pipeline-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pipeline-ci.yml b/.github/workflows/pipeline-ci.yml index d3407c84..67726f34 100644 --- a/.github/workflows/pipeline-ci.yml +++ b/.github/workflows/pipeline-ci.yml @@ -11,7 +11,7 @@ jobs: - name: Setup Java JDK uses: actions/setup-java@v4.2.1 with: - java-version: '17' + java-version: '8' distribution: 'temurin' @@ -20,7 +20,7 @@ jobs: # mvn clean package - name: Compilar y Testing run: | - mvn clean test jacoco:report + mvn clean package jacoco:report - name: Cargar reportes Jacoco como uses: actions/upload-artifact@v4.3.3 From 2cfae85edd18d7c813e124cd0d7b28ac287948fd Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Mon, 6 May 2024 10:15:56 -0400 Subject: [PATCH 88/91] Deploy en runer local --- .github/workflows/pipeline-ci.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/pipeline-ci.yml b/.github/workflows/pipeline-ci.yml index 67726f34..3f8955d5 100644 --- a/.github/workflows/pipeline-ci.yml +++ b/.github/workflows/pipeline-ci.yml @@ -68,3 +68,14 @@ jobs: - name: Docker push run: | docker push estebanignacio/microservicio-java:latest + + deploy: + needs: build + runs-on: self-hosted + steps: + - name: Despliegue + run: | + echo "despliege" + + + From 72f56299bd66b407c88e937afb6b6a8534651606 Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Mon, 6 May 2024 10:19:23 -0400 Subject: [PATCH 89/91] Deploy Kubernetes --- deploy.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 deploy.yaml diff --git a/deploy.yaml b/deploy.yaml new file mode 100644 index 00000000..8c2f6f87 --- /dev/null +++ b/deploy.yaml @@ -0,0 +1,19 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: microservicio-java +spec: + replicas: 3 + selector: + matchLabels: + app: microservicio-java + template: + metadata: + labels: + app: microservicio-java + spec: + containers: + - name: microservicio-java + image: estebanignacio/microservicio-java:latest + ports: + - containerPort: 8080 From ae5c404869c5f452fc6b64e87deef168276a175a Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Mon, 6 May 2024 10:23:37 -0400 Subject: [PATCH 90/91] Deploy Kubernetes Local --- deploy.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/deploy.yaml b/deploy.yaml index 8c2f6f87..3275cc09 100644 --- a/deploy.yaml +++ b/deploy.yaml @@ -17,3 +17,4 @@ spec: image: estebanignacio/microservicio-java:latest ports: - containerPort: 8080 + From b13c06c083bc5a75c2a9404fea26b52f26d4c30a Mon Sep 17 00:00:00 2001 From: altheus26 <131408386+altheus26@users.noreply.github.com> Date: Mon, 6 May 2024 10:30:59 -0400 Subject: [PATCH 91/91] Deploy kubernet local runer --- .github/workflows/pipeline-ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pipeline-ci.yml b/.github/workflows/pipeline-ci.yml index 3f8955d5..24fc1a62 100644 --- a/.github/workflows/pipeline-ci.yml +++ b/.github/workflows/pipeline-ci.yml @@ -73,9 +73,12 @@ jobs: needs: build runs-on: self-hosted steps: + - name: Clonar repo + uses: actions/checkout@v4 + - name: Despliegue run: | - echo "despliege" + kubectl apply -f deploy.yaml