From 3d2da35996b0ea33d47db519d88298d4a2609da3 Mon Sep 17 00:00:00 2001 From: IvanPizarroQ <64804967+IvanPizarroQ@users.noreply.github.com> Date: Thu, 21 Dec 2023 17:07:50 -0300 Subject: [PATCH 01/26] Create pipeline.yml Create pipeline from template. --- .github/workflows/pipeline.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/pipeline.yml diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml new file mode 100644 index 000000000..50de158c9 --- /dev/null +++ b/.github/workflows/pipeline.yml @@ -0,0 +1,24 @@ +name: CI + +on: + + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + + workflow_dispatch: + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + + - uses: actions/checkout@v3 + + - name: Run a multi-line script + run: | + echo "hola mundo" From 04d2b51e03bafbcf6855f672abe8a3455d6126d6 Mon Sep 17 00:00:00 2001 From: IvanPizarroQ <64804967+IvanPizarroQ@users.noreply.github.com> Date: Thu, 21 Dec 2023 21:16:41 -0300 Subject: [PATCH 02/26] Update pipeline.yml --- .github/workflows/pipeline.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 50de158c9..3d3cfb5ee 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -19,6 +19,7 @@ jobs: - uses: actions/checkout@v3 - - name: Run a multi-line script + - name: Build run: | - echo "hola mundo" + chmod +x gradlew + ./gradlew build From 11bec45176df3a3dbeb5024226e71d4ed31f0e01 Mon Sep 17 00:00:00 2001 From: IvanPizarroQ <64804967+IvanPizarroQ@users.noreply.github.com> Date: Wed, 27 Dec 2023 20:19:13 -0300 Subject: [PATCH 03/26] Update pipeline.yml --- .github/workflows/pipeline.yml | 35 +++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 3d3cfb5ee..7c6e7c880 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -1,25 +1,38 @@ name: CI -on: - +on: + push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - workflow_dispatch: jobs: - + build: - + runs-on: ubuntu-latest steps: - + - uses: actions/checkout@v3 - name: Build run: | - chmod +x gradlew - ./gradlew build + chmod +x gradlew + ./gradlew build + ls -ltr + + - name: SonarCloud Analysis + run: | + chmod +x gradlew + ./gradlew build sonar -Dsonar.token=${{ secrets.TOKEN_SONARCLOUD }} + + - name: SonarQube Quality Gate check + uses: sonarsource/sonarqube-quality-gate-action@master + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: https://sonarcloud.io + with: + scanMetadataReportFile: build/sonar/report-task.txt + + + From f5065265f4d82cdc4892ca1358aa3665441e9dae Mon Sep 17 00:00:00 2001 From: IvanPizarroQ <64804967+IvanPizarroQ@users.noreply.github.com> Date: Wed, 27 Dec 2023 20:38:30 -0300 Subject: [PATCH 04/26] Update build.gradle --- build.gradle | 49 +++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 39 insertions(+), 10 deletions(-) diff --git a/build.gradle b/build.gradle index ee2bd23f9..1f0c3cd85 100644 --- a/build.gradle +++ b/build.gradle @@ -1,22 +1,51 @@ plugins { - id 'org.springframework.boot' version '2.6.3' - id 'io.spring.dependency-management' version '1.0.11.RELEASE' - id 'java' + id 'org.springframework.boot' version '2.6.6' + id 'io.spring.dependency-management' version '1.0.11.RELEASE' + id 'java' + id "org.sonarqube" version "4.2.1.3168" } -group = 'com.example' -version = '0.0.1-SNAPSHOT' -sourceCompatibility = '1.8' +apply plugin: 'java' + +group = 'org.springframework.samples' +version = '2.6.0' +sourceCompatibility = '11' repositories { - mavenCentral() + mavenCentral() } +ext.webjarsFontawesomeVersion = "4.7.0" +ext.webjarsBootstrapVersion = "5.1.3" + dependencies { - implementation 'org.springframework.boot:spring-boot-starter-web' - testImplementation('org.springframework.boot:spring-boot-starter-test') + implementation 'org.springframework.boot:spring-boot-starter-cache' + implementation 'org.springframework.boot:spring-boot-starter-data-jpa' + implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' + implementation 'org.springframework.boot:spring-boot-starter-web' + implementation 'org.springframework.boot:spring-boot-starter-validation' + implementation 'javax.cache:cache-api' + runtimeOnly 'org.springframework.boot:spring-boot-starter-actuator' + runtimeOnly 'org.webjars:webjars-locator-core' + runtimeOnly "org.webjars.npm:bootstrap:${webjarsBootstrapVersion}" + runtimeOnly "org.webjars.npm:font-awesome:${webjarsFontawesomeVersion}" + runtimeOnly 'org.ehcache:ehcache' + runtimeOnly 'com.h2database:h2' + runtimeOnly 'mysql:mysql-connector-java' + runtimeOnly 'org.postgresql:postgresql' + developmentOnly 'org.springframework.boot:spring-boot-devtools' + testImplementation 'org.springframework.boot:spring-boot-starter-test' +} + +sonar { + properties { + property "sonar.projectKey", "IvanPizarroQ_microservicio-java" + property "sonar.organization", "ivanpizarroq" + property "sonar.host.url", "https://sonarcloud.io/" + property "sonar.projectName", "microservicio-java" + } } test { - useJUnitPlatform() + useJUnitPlatform() } From 14efd001dfbdf3c66a6b0447af5937565d13b39e Mon Sep 17 00:00:00 2001 From: IvanPizarroQ <64804967+IvanPizarroQ@users.noreply.github.com> Date: Thu, 28 Dec 2023 12:34:33 -0300 Subject: [PATCH 05/26] Update build.gradle --- build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle b/build.gradle index 1f0c3cd85..99fcce3a2 100644 --- a/build.gradle +++ b/build.gradle @@ -11,6 +11,7 @@ group = 'org.springframework.samples' version = '2.6.0' sourceCompatibility = '11' + repositories { mavenCentral() } From dc23aebbea1d9acb2c12d2b72b95351e6630aaab Mon Sep 17 00:00:00 2001 From: IvanPizarroQ <64804967+IvanPizarroQ@users.noreply.github.com> Date: Thu, 28 Dec 2023 14:02:27 -0300 Subject: [PATCH 06/26] Update HomeController.java Cambia el print del metodo greetings a "Hola, soy Ivan Pizarro" --- 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 6472ecdf7..9e1cecf81 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 "Hello, soy Ivan Pizarro"; } } From 909c1fb4e3a744f298fef6455d3cf70a212c0e37 Mon Sep 17 00:00:00 2001 From: IvanPizarroQ <64804967+IvanPizarroQ@users.noreply.github.com> Date: Thu, 28 Dec 2023 14:18:09 -0300 Subject: [PATCH 07/26] Update pipeline.yml --- .github/workflows/pipeline.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 7c6e7c880..d6c0b5897 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -26,6 +26,12 @@ jobs: chmod +x gradlew ./gradlew build sonar -Dsonar.token=${{ secrets.TOKEN_SONARCLOUD }} + - name: Docker Login + uses: docker/login-action@v2.2.0 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: SonarQube Quality Gate check uses: sonarsource/sonarqube-quality-gate-action@master env: From a984e0add3662134bd9c10a718651269223a2390 Mon Sep 17 00:00:00 2001 From: IvanPizarroQ <64804967+IvanPizarroQ@users.noreply.github.com> Date: Thu, 28 Dec 2023 14:19:54 -0300 Subject: [PATCH 08/26] Update GreetingService.java --- 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 6661c82bc..2ca75995c 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 Ivan Pizarro"; } } From dd129a0e5cae22be550075192fc7da4ecbd6415c Mon Sep 17 00:00:00 2001 From: IvanPizarroQ <64804967+IvanPizarroQ@users.noreply.github.com> Date: Thu, 28 Dec 2023 14:20:48 -0300 Subject: [PATCH 09/26] Update HttpRequestTest.java --- src/test/java/com/example/testingweb/HttpRequestTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/com/example/testingweb/HttpRequestTest.java b/src/test/java/com/example/testingweb/HttpRequestTest.java index 79e679e60..89e979ac7 100644 --- a/src/test/java/com/example/testingweb/HttpRequestTest.java +++ b/src/test/java/com/example/testingweb/HttpRequestTest.java @@ -22,6 +22,6 @@ public class HttpRequestTest { @Test public void greetingShouldReturnDefaultMessage() throws Exception { assertThat(this.restTemplate.getForObject("http://localhost:" + port + "/", - String.class)).contains("Hello, World"); + String.class)).contains("Hola, soy Ivan Pizarro"); } } From be4432f35c192682171fd3be52df3079dc64fbb8 Mon Sep 17 00:00:00 2001 From: IvanPizarroQ <64804967+IvanPizarroQ@users.noreply.github.com> Date: Thu, 28 Dec 2023 14:21:17 -0300 Subject: [PATCH 10/26] Update TestingWebApplicationTest.java --- .../java/com/example/testingweb/TestingWebApplicationTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/com/example/testingweb/TestingWebApplicationTest.java b/src/test/java/com/example/testingweb/TestingWebApplicationTest.java index 135f48986..d683308c9 100644 --- a/src/test/java/com/example/testingweb/TestingWebApplicationTest.java +++ b/src/test/java/com/example/testingweb/TestingWebApplicationTest.java @@ -23,6 +23,6 @@ public class TestingWebApplicationTest { @Test public void shouldReturnDefaultMessage() throws Exception { this.mockMvc.perform(get("/")).andDo(print()).andExpect(status().isOk()) - .andExpect(content().string(containsString("Hello, World"))); + .andExpect(content().string(containsString("Hola, soy Ivan Pizarro"))); } } From 71899bdbb3cdbf8d7d92de71d1eb39e571c5748c Mon Sep 17 00:00:00 2001 From: IvanPizarroQ <64804967+IvanPizarroQ@users.noreply.github.com> Date: Thu, 28 Dec 2023 14:21:37 -0300 Subject: [PATCH 11/26] Update WebLayerTest.java --- src/test/java/com/example/testingweb/WebLayerTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/com/example/testingweb/WebLayerTest.java b/src/test/java/com/example/testingweb/WebLayerTest.java index a0e87a8db..b30444b41 100644 --- a/src/test/java/com/example/testingweb/WebLayerTest.java +++ b/src/test/java/com/example/testingweb/WebLayerTest.java @@ -22,7 +22,7 @@ public class WebLayerTest { @Test public void shouldReturnDefaultMessage() throws Exception { this.mockMvc.perform(get("/")).andDo(print()).andExpect(status().isOk()) - .andExpect(content().string(containsString("Hello, World"))); + .andExpect(content().string(containsString("Hola, soy Ivan Pizarro"))); } } //end::test[] From 559b104adec31572572b2d6d09232ef050987327 Mon Sep 17 00:00:00 2001 From: IvanPizarroQ <64804967+IvanPizarroQ@users.noreply.github.com> Date: Thu, 28 Dec 2023 14:22:05 -0300 Subject: [PATCH 12/26] Update WebMockTest.java --- src/test/java/com/example/testingweb/WebMockTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/com/example/testingweb/WebMockTest.java b/src/test/java/com/example/testingweb/WebMockTest.java index 245b6cccb..ed6508897 100644 --- a/src/test/java/com/example/testingweb/WebMockTest.java +++ b/src/test/java/com/example/testingweb/WebMockTest.java @@ -25,8 +25,8 @@ public class WebMockTest { @Test public void greetingShouldReturnMessageFromService() throws Exception { - when(service.greet()).thenReturn("Hello, Mock"); + when(service.greet()).thenReturn("Hola, soy Ivan Pizarro"); this.mockMvc.perform(get("/greeting")).andDo(print()).andExpect(status().isOk()) - .andExpect(content().string(containsString("Hello, Mock"))); + .andExpect(content().string(containsString("Hola, soy Ivan Pizarro"))); } } From e2723dd7acbd3209e73fe53496bc68181906fdbc Mon Sep 17 00:00:00 2001 From: IvanPizarroQ <64804967+IvanPizarroQ@users.noreply.github.com> Date: Thu, 28 Dec 2023 14:30:01 -0300 Subject: [PATCH 13/26] 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 9e1cecf81..74b46d70c 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, soy Ivan Pizarro"; + return "Hola, soy Ivan Pizarro"; } } From bdba3a009ac9b98cfd4129c2c40bb5b548da93dc Mon Sep 17 00:00:00 2001 From: IvanPizarroQ <64804967+IvanPizarroQ@users.noreply.github.com> Date: Thu, 28 Dec 2023 15:01:17 -0300 Subject: [PATCH 14/26] Create deployment.yml --- deployment.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 deployment.yml diff --git a/deployment.yml b/deployment.yml new file mode 100644 index 000000000..1fe5e0d3b --- /dev/null +++ b/deployment.yml @@ -0,0 +1,21 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: microservicio-deployment + labels: + app: microservicio +spec: + replicas: 1 + selector: + matchLabels: + app: microservicio + template: + metadata: + labels: + app: microservicio + spec: + containers: + - name: microservicio + image: ivanpizarroq/microservicio-java:latest + ports: + - containerPort: 8085 From ba55aeb7a09383755f61cbe05eaaef75f3448ce8 Mon Sep 17 00:00:00 2001 From: IvanPizarroQ <64804967+IvanPizarroQ@users.noreply.github.com> Date: Thu, 28 Dec 2023 15:03:43 -0300 Subject: [PATCH 15/26] Update pipeline.yml --- .github/workflows/pipeline.yml | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index d6c0b5897..ed8312ffc 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -31,13 +31,32 @@ jobs: with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + - name: Docker Build + run: | + docker build --tag ivanpizarroq/microservicio-java:latest . + docker images - - name: SonarQube Quality Gate check - uses: sonarsource/sonarqube-quality-gate-action@master - env: + - name: Docker Push + run: | + docker push ipizarroq/microservicio-java + + deploy: + runs-on: self-hosted + needs: build + steps: + + - uses: actions/checkout@v3 + + - name: Deploy to Minikube + run: | + kubectl apply -f deployment.yml + + - name: SonarQube Quality Gate check + uses: sonarsource/sonarqube-quality-gate-action@master + env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_HOST_URL: https://sonarcloud.io - with: + with: scanMetadataReportFile: build/sonar/report-task.txt From 830b6319334ec327664ed32ea1272e9d2790eb9e Mon Sep 17 00:00:00 2001 From: IvanPizarroQ <64804967+IvanPizarroQ@users.noreply.github.com> Date: Thu, 28 Dec 2023 15:12:08 -0300 Subject: [PATCH 16/26] Update pipeline.yml --- .github/workflows/pipeline.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index ed8312ffc..bb359d46f 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -31,6 +31,12 @@ jobs: with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Copia de Jar a Raiz de proyecto + run: | + cp $GITHUB_WORKSPACE/build/libs/spring-petclinic-2.6.0.jar . + chmod 777 spring-petclinic-2.6.0.jar + ls -lt - name: Docker Build run: | docker build --tag ivanpizarroq/microservicio-java:latest . From 23f29e3a2d84555af603d5686be22f90ffe12fca Mon Sep 17 00:00:00 2001 From: IvanPizarroQ <64804967+IvanPizarroQ@users.noreply.github.com> Date: Thu, 28 Dec 2023 15:20:41 -0300 Subject: [PATCH 17/26] Update pipeline.yml --- .github/workflows/pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index bb359d46f..0f91df906 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -34,7 +34,7 @@ jobs: - name: Copia de Jar a Raiz de proyecto run: | - cp $GITHUB_WORKSPACE/build/libs/spring-petclinic-2.6.0.jar . + cp $GITHUB_WORKSPACE/build/libs/testing-web-2.6.0.jar . chmod 777 spring-petclinic-2.6.0.jar ls -lt - name: Docker Build From 063028dca5e6b5c42ef28651d31082f4ea497e13 Mon Sep 17 00:00:00 2001 From: IvanPizarroQ <64804967+IvanPizarroQ@users.noreply.github.com> Date: Thu, 28 Dec 2023 15:21:36 -0300 Subject: [PATCH 18/26] Update pipeline.yml --- .github/workflows/pipeline.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 0f91df906..2dff90721 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -34,8 +34,9 @@ jobs: - name: Copia de Jar a Raiz de proyecto run: | + ls cp $GITHUB_WORKSPACE/build/libs/testing-web-2.6.0.jar . - chmod 777 spring-petclinic-2.6.0.jar + chmod 777 testing-web-2.6.0.jar ls -lt - name: Docker Build run: | From 7c1fd1530f2e195f8bdb043884e9049a9e68ffde Mon Sep 17 00:00:00 2001 From: IvanPizarroQ <64804967+IvanPizarroQ@users.noreply.github.com> Date: Thu, 28 Dec 2023 15:49:35 -0300 Subject: [PATCH 19/26] Create Dockerfile --- Dockerfile | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..7b78c8bc6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM openjdk:11-jre + +EXPOSE 8085 + +ADD testing-web-2.6.0.jar /app/testing-web-2.6.0.jar + +WORKDIR /app + +CMD java -jar testing-web-2.6.0.jar From bdee0ac980469820cdccb08fd1f43f57f9be2734 Mon Sep 17 00:00:00 2001 From: IvanPizarroQ <64804967+IvanPizarroQ@users.noreply.github.com> Date: Thu, 28 Dec 2023 15:55:14 -0300 Subject: [PATCH 20/26] Update pipeline.yml --- .github/workflows/pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 2dff90721..61ae0b544 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -45,7 +45,7 @@ jobs: - name: Docker Push run: | - docker push ipizarroq/microservicio-java + docker push ivanpizarroq/microservicio-java deploy: runs-on: self-hosted From 8273ed9a72ccebaf6109e947c9b86c18df498675 Mon Sep 17 00:00:00 2001 From: IvanPizarroQ <64804967+IvanPizarroQ@users.noreply.github.com> Date: Thu, 28 Dec 2023 16:01:06 -0300 Subject: [PATCH 21/26] Update pipeline.yml --- .github/workflows/pipeline.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 61ae0b544..948a4fa25 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -53,7 +53,9 @@ jobs: steps: - uses: actions/checkout@v3 - + - name: Set PowerShell Execution Policy + run: | + Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass - name: Deploy to Minikube run: | kubectl apply -f deployment.yml From 10486574a66de67afd88166a9a213bac5ae2c83b Mon Sep 17 00:00:00 2001 From: IvanPizarroQ <64804967+IvanPizarroQ@users.noreply.github.com> Date: Thu, 28 Dec 2023 16:05:48 -0300 Subject: [PATCH 22/26] Update pipeline.yml --- .github/workflows/pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 948a4fa25..22ab48ffa 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -55,7 +55,7 @@ jobs: - uses: actions/checkout@v3 - name: Set PowerShell Execution Policy run: | - Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass + Set-ExecutionPolicy Unrestricted - name: Deploy to Minikube run: | kubectl apply -f deployment.yml From e7e6eed3a4e4dc1ab33e05b0dd1e7f540a6b5282 Mon Sep 17 00:00:00 2001 From: IvanPizarroQ <64804967+IvanPizarroQ@users.noreply.github.com> Date: Thu, 28 Dec 2023 16:25:50 -0300 Subject: [PATCH 23/26] Update pipeline.yml --- .github/workflows/pipeline.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 22ab48ffa..d976c4d7f 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -60,13 +60,7 @@ jobs: run: | kubectl apply -f deployment.yml - - name: SonarQube Quality Gate check - uses: sonarsource/sonarqube-quality-gate-action@master - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - SONAR_HOST_URL: https://sonarcloud.io - with: - scanMetadataReportFile: build/sonar/report-task.txt + From dcb3a4edaeb0799816e18b83d34ee95102c1ab58 Mon Sep 17 00:00:00 2001 From: IvanPizarroQ <64804967+IvanPizarroQ@users.noreply.github.com> Date: Thu, 28 Dec 2023 16:45:25 -0300 Subject: [PATCH 24/26] Update pipeline.yml --- .github/workflows/pipeline.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index d976c4d7f..aa6026a90 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -56,6 +56,11 @@ jobs: - name: Set PowerShell Execution Policy run: | Set-ExecutionPolicy Unrestricted + - name: Docker Login + uses: docker/login-action@v2.2.0 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} - name: Deploy to Minikube run: | kubectl apply -f deployment.yml From 2021031d2814d21f439f30bce3d169a84251d749 Mon Sep 17 00:00:00 2001 From: IvanPizarroQ <64804967+IvanPizarroQ@users.noreply.github.com> Date: Thu, 28 Dec 2023 16:59:11 -0300 Subject: [PATCH 25/26] Update deployment.yml --- deployment.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deployment.yml b/deployment.yml index 1fe5e0d3b..e32d8d8ce 100644 --- a/deployment.yml +++ b/deployment.yml @@ -3,19 +3,19 @@ kind: Deployment metadata: name: microservicio-deployment labels: - app: microservicio + app: microservicio-java spec: replicas: 1 selector: matchLabels: - app: microservicio + app: microservicio-java template: metadata: labels: - app: microservicio + app: microservicio-java spec: containers: - - name: microservicio + - name: microservicio-java image: ivanpizarroq/microservicio-java:latest ports: - containerPort: 8085 From 27847a085fe2caff0632d7336fe1285a0fae71d0 Mon Sep 17 00:00:00 2001 From: IvanPizarroQ <64804967+IvanPizarroQ@users.noreply.github.com> Date: Thu, 28 Dec 2023 17:02:33 -0300 Subject: [PATCH 26/26] Update deployment.yml --- deployment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment.yml b/deployment.yml index e32d8d8ce..073bf0517 100644 --- a/deployment.yml +++ b/deployment.yml @@ -1,7 +1,7 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: microservicio-deployment + name: microservicio-java labels: app: microservicio-java spec: