From 30a27e22b466ecff09405056c6c527ef2e00384f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Guilherme?= <36928653+Guilherme2041@users.noreply.github.com> Date: Wed, 17 May 2023 20:13:30 -0300 Subject: [PATCH 01/18] Testes inciais de CI --- .github /workflows/CI.yml | 40 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github /workflows/CI.yml diff --git a/.github /workflows/CI.yml b/.github /workflows/CI.yml new file mode 100644 index 0000000..1ca5485 --- /dev/null +++ b/.github /workflows/CI.yml @@ -0,0 +1,40 @@ +# Nome do fluxo +name: CI + +# Aciona o fluxo quando: +on: + # Houver um pull + pull_request: + branches: [ "main" ] + # Permite a execução manual + workflow_dispatch: + +# Fluxo de trabalho +jobs: + CI: + runs-on: ubuntu-latest + + # Passos do fluxo de trabalho + steps: + + - name: Checkout do repositório + uses: actions/checkout@v3 + + - name: Preparando Node.js 16.x + uses: actions/setup-node@v3 + with: + node-version: 16.x + + - name: Instalando dependências + run: npm install + + - name: Executando testes + run: npm run test -- --coverage + env: + CI: true + + - name: SonarCloud Scan + uses: SonarSource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} From c4464160d679a1c626063c6c2ed3b5da6494d0de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Guilherme?= <36928653+Guilherme2041@users.noreply.github.com> Date: Wed, 17 May 2023 20:14:51 -0300 Subject: [PATCH 02/18] teste 1 --- src/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index 82ce5b9..922804f 100644 --- a/src/App.js +++ b/src/App.js @@ -7,7 +7,7 @@ function App() {
logo

- DevOps Básico IT Talent - Mudanças aula 26-04-2023 + DevOps Básico IT Talent - Mudanças hackathon 17-05-2023

Date: Wed, 17 May 2023 20:17:51 -0300 Subject: [PATCH 03/18] Delete .github /workflows directory --- .github /workflows/CI.yml | 40 --------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 .github /workflows/CI.yml diff --git a/.github /workflows/CI.yml b/.github /workflows/CI.yml deleted file mode 100644 index 1ca5485..0000000 --- a/.github /workflows/CI.yml +++ /dev/null @@ -1,40 +0,0 @@ -# Nome do fluxo -name: CI - -# Aciona o fluxo quando: -on: - # Houver um pull - pull_request: - branches: [ "main" ] - # Permite a execução manual - workflow_dispatch: - -# Fluxo de trabalho -jobs: - CI: - runs-on: ubuntu-latest - - # Passos do fluxo de trabalho - steps: - - - name: Checkout do repositório - uses: actions/checkout@v3 - - - name: Preparando Node.js 16.x - uses: actions/setup-node@v3 - with: - node-version: 16.x - - - name: Instalando dependências - run: npm install - - - name: Executando testes - run: npm run test -- --coverage - env: - CI: true - - - name: SonarCloud Scan - uses: SonarSource/sonarcloud-github-action@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} From 8daeeed8117ffb2a6790e6f0197df5aa50f923e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Guilherme?= <36928653+Guilherme2041@users.noreply.github.com> Date: Wed, 17 May 2023 20:18:29 -0300 Subject: [PATCH 04/18] Create CI.yml --- .github/workflows/CI.yml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/CI.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..1ca5485 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,40 @@ +# Nome do fluxo +name: CI + +# Aciona o fluxo quando: +on: + # Houver um pull + pull_request: + branches: [ "main" ] + # Permite a execução manual + workflow_dispatch: + +# Fluxo de trabalho +jobs: + CI: + runs-on: ubuntu-latest + + # Passos do fluxo de trabalho + steps: + + - name: Checkout do repositório + uses: actions/checkout@v3 + + - name: Preparando Node.js 16.x + uses: actions/setup-node@v3 + with: + node-version: 16.x + + - name: Instalando dependências + run: npm install + + - name: Executando testes + run: npm run test -- --coverage + env: + CI: true + + - name: SonarCloud Scan + uses: SonarSource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} From 9000b8616e0fd330573f9bf53e9381568cdd4774 Mon Sep 17 00:00:00 2001 From: Guilherme Nunes <52090831+GONunes@users.noreply.github.com> Date: Wed, 17 May 2023 20:19:05 -0300 Subject: [PATCH 05/18] Create CD.yml --- .github /workflows/CD.yml | 58 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github /workflows/CD.yml diff --git a/.github /workflows/CD.yml b/.github /workflows/CD.yml new file mode 100644 index 0000000..70ef051 --- /dev/null +++ b/.github /workflows/CD.yml @@ -0,0 +1,58 @@ +name: CD + +on: + push: + branches: [ "main" ] + + workflow_dispatch: + + permissions: + contents: read + pages: write + id-token: write + +jobs: + CD: + runs-on: ubuntu-latest + + steps: + + - name: Checkout repository + uses: actions/checkout@v3 + + + - name: Set up Node.js 18.x + uses: actions/setup-node@v3 + with: + node-version: 18.x + + + - name: Install dependencies + run: npm install + + + - name: Run the tests + run: npm run test -- --coverage + env: + CI: true + + - name: SonarCloud Scan + uses: SonarSource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + + - name: Build the application + run: npm run build + + - name: Setup Pages + uses: actions/configure-pages@v3 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + path: 'build' + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 From cf543ffbd9143595245b342a2fe149fe6c71935e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Guilherme?= <36928653+Guilherme2041@users.noreply.github.com> Date: Wed, 17 May 2023 20:19:07 -0300 Subject: [PATCH 06/18] Update App.js --- src/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index 922804f..21df9d4 100644 --- a/src/App.js +++ b/src/App.js @@ -7,7 +7,7 @@ function App() {
logo

- DevOps Básico IT Talent - Mudanças hackathon 17-05-2023 + DevOps Básico IT Talent - Mudanças hackathon 17-05-2023 teste 2

Date: Wed, 17 May 2023 20:20:34 -0300 Subject: [PATCH 07/18] Update CD.yml Colocando CD para considerar push na minha branch. --- .github /workflows/CD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github /workflows/CD.yml b/.github /workflows/CD.yml index 70ef051..3cd0c5b 100644 --- a/.github /workflows/CD.yml +++ b/.github /workflows/CD.yml @@ -2,7 +2,7 @@ name: CD on: push: - branches: [ "main" ] + branches: [ "guilhermenunes" ] workflow_dispatch: From 94bde08ec34bb7cfc6a2754236c1044abd677b3d Mon Sep 17 00:00:00 2001 From: yurigadelha1 <131833132+yurigadelha1@users.noreply.github.com> Date: Wed, 17 May 2023 20:23:19 -0300 Subject: [PATCH 08/18] Update App.js teste 4 --- src/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index 82ce5b9..03a805d 100644 --- a/src/App.js +++ b/src/App.js @@ -7,7 +7,7 @@ function App() {
logo

- DevOps Básico IT Talent - Mudanças aula 26-04-2023 + DevOps Básico IT Talent - Mudanças aula 26-04-2023 teste 4

Date: Wed, 17 May 2023 20:25:43 -0300 Subject: [PATCH 09/18] Update CD.yml Alterando para considerar o push na branch main. --- .github /workflows/CD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github /workflows/CD.yml b/.github /workflows/CD.yml index 3cd0c5b..70ef051 100644 --- a/.github /workflows/CD.yml +++ b/.github /workflows/CD.yml @@ -2,7 +2,7 @@ name: CD on: push: - branches: [ "guilhermenunes" ] + branches: [ "main" ] workflow_dispatch: From 096d4951de5c6fb42e59c116256db9891dac013f Mon Sep 17 00:00:00 2001 From: victoremannueluna <124541828+victoremannueluna@users.noreply.github.com> Date: Wed, 17 May 2023 20:26:23 -0300 Subject: [PATCH 10/18] Create sonar-project.propertiesnote --- sonar-project.propertiesnote | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 sonar-project.propertiesnote diff --git a/sonar-project.propertiesnote b/sonar-project.propertiesnote new file mode 100644 index 0000000..a110261 --- /dev/null +++ b/sonar-project.propertiesnote @@ -0,0 +1,8 @@ +sonar.organization=guilherme-nunes +sonar.projectKey=GONunes_pre-hackathon-devops +sonar.sources=. +sonar.language=js,jsx,ts,tsx +sonar.javascript.file.suffixes=.js,.jsx +sonar.typescript.file.suffixes=.ts,.tsx +sonar.javascript.lcov.reportPaths=./coverage/lcov.info +sonar.sourceEncoding=UTF-8 From de3b9ed4107331ec70cee4d11d5da80a6517b639 Mon Sep 17 00:00:00 2001 From: LyndainesSantos <125848451+LyndainesSantos@users.noreply.github.com> Date: Wed, 17 May 2023 20:32:37 -0300 Subject: [PATCH 11/18] Update App.js Change separater --- src/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index 922804f..6daa511 100644 --- a/src/App.js +++ b/src/App.js @@ -7,7 +7,7 @@ function App() {
logo

- DevOps Básico IT Talent - Mudanças hackathon 17-05-2023 + DevOps Básico IT Talent / Mudanças hackathon 17-05-2023

Date: Wed, 17 May 2023 20:37:05 -0300 Subject: [PATCH 12/18] Create sonar-project.properties --- sonar-project.properties | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 sonar-project.properties diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..a110261 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,8 @@ +sonar.organization=guilherme-nunes +sonar.projectKey=GONunes_pre-hackathon-devops +sonar.sources=. +sonar.language=js,jsx,ts,tsx +sonar.javascript.file.suffixes=.js,.jsx +sonar.typescript.file.suffixes=.ts,.tsx +sonar.javascript.lcov.reportPaths=./coverage/lcov.info +sonar.sourceEncoding=UTF-8 From 0d741211c988aabcd3ba20ed5bce9fe42cdf15de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Guilherme?= <36928653+Guilherme2041@users.noreply.github.com> Date: Wed, 17 May 2023 20:37:17 -0300 Subject: [PATCH 13/18] Delete sonar-project.propertiesnote --- sonar-project.propertiesnote | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 sonar-project.propertiesnote diff --git a/sonar-project.propertiesnote b/sonar-project.propertiesnote deleted file mode 100644 index a110261..0000000 --- a/sonar-project.propertiesnote +++ /dev/null @@ -1,8 +0,0 @@ -sonar.organization=guilherme-nunes -sonar.projectKey=GONunes_pre-hackathon-devops -sonar.sources=. -sonar.language=js,jsx,ts,tsx -sonar.javascript.file.suffixes=.js,.jsx -sonar.typescript.file.suffixes=.ts,.tsx -sonar.javascript.lcov.reportPaths=./coverage/lcov.info -sonar.sourceEncoding=UTF-8 From ac61dd5c11256efbd07531966c72a5ef096e8140 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Guilherme?= <36928653+Guilherme2041@users.noreply.github.com> Date: Wed, 17 May 2023 20:40:36 -0300 Subject: [PATCH 14/18] Create CD.yml --- .github/workflows/CD.yml | 58 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/CD.yml diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml new file mode 100644 index 0000000..70ef051 --- /dev/null +++ b/.github/workflows/CD.yml @@ -0,0 +1,58 @@ +name: CD + +on: + push: + branches: [ "main" ] + + workflow_dispatch: + + permissions: + contents: read + pages: write + id-token: write + +jobs: + CD: + runs-on: ubuntu-latest + + steps: + + - name: Checkout repository + uses: actions/checkout@v3 + + + - name: Set up Node.js 18.x + uses: actions/setup-node@v3 + with: + node-version: 18.x + + + - name: Install dependencies + run: npm install + + + - name: Run the tests + run: npm run test -- --coverage + env: + CI: true + + - name: SonarCloud Scan + uses: SonarSource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + + - name: Build the application + run: npm run build + + - name: Setup Pages + uses: actions/configure-pages@v3 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + path: 'build' + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 From a06cc34cf1ccd23243f003f79e0c6eb9c625dbf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Guilherme?= <36928653+Guilherme2041@users.noreply.github.com> Date: Wed, 17 May 2023 20:40:47 -0300 Subject: [PATCH 15/18] Delete .github /workflows directory --- .github /workflows/CD.yml | 58 --------------------------------------- 1 file changed, 58 deletions(-) delete mode 100644 .github /workflows/CD.yml diff --git a/.github /workflows/CD.yml b/.github /workflows/CD.yml deleted file mode 100644 index 70ef051..0000000 --- a/.github /workflows/CD.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: CD - -on: - push: - branches: [ "main" ] - - workflow_dispatch: - - permissions: - contents: read - pages: write - id-token: write - -jobs: - CD: - runs-on: ubuntu-latest - - steps: - - - name: Checkout repository - uses: actions/checkout@v3 - - - - name: Set up Node.js 18.x - uses: actions/setup-node@v3 - with: - node-version: 18.x - - - - name: Install dependencies - run: npm install - - - - name: Run the tests - run: npm run test -- --coverage - env: - CI: true - - - name: SonarCloud Scan - uses: SonarSource/sonarcloud-github-action@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - - - name: Build the application - run: npm run build - - - name: Setup Pages - uses: actions/configure-pages@v3 - - - name: Upload artifact - uses: actions/upload-pages-artifact@v1 - with: - path: 'build' - - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v2 From 162ffdb2da345e1abd28587be5f3ba525eb35842 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Guilherme?= <36928653+Guilherme2041@users.noreply.github.com> Date: Wed, 17 May 2023 20:45:31 -0300 Subject: [PATCH 16/18] Update sonar-project.properties --- sonar-project.properties | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sonar-project.properties b/sonar-project.properties index a110261..bc5a52a 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -4,5 +4,6 @@ sonar.sources=. sonar.language=js,jsx,ts,tsx sonar.javascript.file.suffixes=.js,.jsx sonar.typescript.file.suffixes=.ts,.tsx -sonar.javascript.lcov.reportPaths=./coverage/lcov.info sonar.sourceEncoding=UTF-8 +sonar.javascript.lcov.reportPaths=./coverage/lcov.info +sonar.exclusions=**/*.test.* From 788d99648ba80c566dc58d972c608dd5f901b0c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Guilherme?= <36928653+Guilherme2041@users.noreply.github.com> Date: Wed, 17 May 2023 20:48:43 -0300 Subject: [PATCH 17/18] Update App.js --- src/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index 21df9d4..2be6bd6 100644 --- a/src/App.js +++ b/src/App.js @@ -7,7 +7,7 @@ function App() {
logo

- DevOps Básico IT Talent - Mudanças hackathon 17-05-2023 teste 2 + DevOps Básico IT Talent - Mudanças hackathon 17-05-2023 teste 3

Date: Wed, 17 May 2023 20:52:38 -0300 Subject: [PATCH 18/18] Update CD.yml --- .github/workflows/CD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 70ef051..c823011 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -6,7 +6,7 @@ on: workflow_dispatch: - permissions: +permissions: contents: read pages: write id-token: write