From 6ba578b5cf21dd664eeff3284f8100cd98c62eb6 Mon Sep 17 00:00:00 2001 From: dc-seena <62215304+dc-seena@users.noreply.github.com> Date: Mon, 8 Nov 2021 15:55:53 -0500 Subject: [PATCH 1/7] add sonar --- docker-spring-boot/pom.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docker-spring-boot/pom.xml b/docker-spring-boot/pom.xml index a859604..07d3422 100644 --- a/docker-spring-boot/pom.xml +++ b/docker-spring-boot/pom.xml @@ -22,6 +22,9 @@ 11 11 11 + + devopscaps + https://sonarcloud.io @@ -72,4 +75,4 @@ - \ No newline at end of file + From e1b9feaa3b69185ea28751d6b53d1ae6d75d0f65 Mon Sep 17 00:00:00 2001 From: dc-seena <62215304+dc-seena@users.noreply.github.com> Date: Mon, 8 Nov 2021 15:56:57 -0500 Subject: [PATCH 2/7] auto devops maybe --- .github/workflows/maven-publish.yml | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/maven-publish.yml diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml new file mode 100644 index 0000000..18dd937 --- /dev/null +++ b/.github/workflows/maven-publish.yml @@ -0,0 +1,34 @@ +# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created +# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path + +name: Maven Package + +on: + release: + types: [created] + +jobs: + build: + + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'adopt' + server-id: github # Value of the distributionManagement/repository/id field of the pom.xml + settings-path: ${{ github.workspace }} # location for the settings.xml file + + - name: Build with Maven + run: mvn -B package --file pom.xml + + - name: Publish to GitHub Packages Apache Maven + run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml + env: + GITHUB_TOKEN: ${{ github.token }} From c3ff4a79286be6bd3cc1f4020ba255b25dc3c991 Mon Sep 17 00:00:00 2001 From: dc-seena <62215304+dc-seena@users.noreply.github.com> Date: Mon, 8 Nov 2021 16:01:47 -0500 Subject: [PATCH 3/7] Create build.yml from here https://sonarcloud.io/project/configuration?analysisMode=GitHubActions&id=DevOpsCaps_docker-java --- .github/workflows/build.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..f1df5b2 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,36 @@ +name: Build +on: + push: + branches: + - master + pull_request: + types: [opened, synchronize, reopened] +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + - name: Cache SonarCloud packages + uses: actions/cache@v1 + with: + path: ~/.sonar/cache + key: ${{ runner.os }}-sonar + restore-keys: ${{ runner.os }}-sonar + - name: Cache Maven packages + uses: actions/cache@v1 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Build and analyze + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=DevOpsCaps_docker-java From 374e05f32a8eb13771b4e6204481c7a5db67983f Mon Sep 17 00:00:00 2001 From: dc-seena Date: Mon, 8 Nov 2021 16:08:54 -0500 Subject: [PATCH 4/7] moved --- .idea/.name | 1 + .idea/compiler.xml | 23 + .idea/copyright/profiles_settings.xml | 3 + .idea/docker-java.iml | 10 + .idea/encodings.xml | 5 + .idea/misc.xml | 5 + .idea/modules.xml | 9 + .idea/scopes/scope_settings.xml | 5 + .idea/uiDesigner.xml | 125 ++++ .idea/vcs.xml | 7 + .idea/workspace.xml | 635 ++++++++++++++++++ .../.github}/workflows/build.yml | 0 .../.github}/workflows/maven-publish.yml | 0 13 files changed, 828 insertions(+) create mode 100644 .idea/.name create mode 100644 .idea/compiler.xml create mode 100644 .idea/copyright/profiles_settings.xml create mode 100644 .idea/docker-java.iml create mode 100644 .idea/encodings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/scopes/scope_settings.xml create mode 100644 .idea/uiDesigner.xml create mode 100644 .idea/vcs.xml create mode 100644 .idea/workspace.xml rename {.github => docker-spring-boot/.github}/workflows/build.yml (100%) rename {.github => docker-spring-boot/.github}/workflows/maven-publish.yml (100%) diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000..0dadbd8 --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +docker-java \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..217af47 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,23 @@ + + + + + + diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml new file mode 100644 index 0000000..e7bedf3 --- /dev/null +++ b/.idea/copyright/profiles_settings.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/.idea/docker-java.iml b/.idea/docker-java.iml new file mode 100644 index 0000000..ef582b1 --- /dev/null +++ b/.idea/docker-java.iml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..e206d70 --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..28b71f5 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..533d6ef --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml new file mode 100644 index 0000000..922003b --- /dev/null +++ b/.idea/scopes/scope_settings.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml new file mode 100644 index 0000000..3b00020 --- /dev/null +++ b/.idea/uiDesigner.xml @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..275077f --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..a9646f0 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,635 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + localhost + 5050 + + + + + + + 1636405407002 + 1636405407002 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.github/workflows/build.yml b/docker-spring-boot/.github/workflows/build.yml similarity index 100% rename from .github/workflows/build.yml rename to docker-spring-boot/.github/workflows/build.yml diff --git a/.github/workflows/maven-publish.yml b/docker-spring-boot/.github/workflows/maven-publish.yml similarity index 100% rename from .github/workflows/maven-publish.yml rename to docker-spring-boot/.github/workflows/maven-publish.yml From fe412ee50c03919db07891c3bd5823f20f0aaece Mon Sep 17 00:00:00 2001 From: dc-seena <62215304+dc-seena@users.noreply.github.com> Date: Mon, 8 Nov 2021 16:35:34 -0500 Subject: [PATCH 5/7] Create build.yml smote test sonar --- .github/workflows/build.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..f1df5b2 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,36 @@ +name: Build +on: + push: + branches: + - master + pull_request: + types: [opened, synchronize, reopened] +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + - name: Cache SonarCloud packages + uses: actions/cache@v1 + with: + path: ~/.sonar/cache + key: ${{ runner.os }}-sonar + restore-keys: ${{ runner.os }}-sonar + - name: Cache Maven packages + uses: actions/cache@v1 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Build and analyze + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=DevOpsCaps_docker-java From 10a45de03c1c6a0ac7caedd77246bb929d19b39c Mon Sep 17 00:00:00 2001 From: dc-seena <62215304+dc-seena@users.noreply.github.com> Date: Mon, 8 Nov 2021 16:38:14 -0500 Subject: [PATCH 6/7] Update build.yml cd docker-spring-boot --- docker-spring-boot/.github/workflows/build.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docker-spring-boot/.github/workflows/build.yml b/docker-spring-boot/.github/workflows/build.yml index f1df5b2..4a21a9d 100644 --- a/docker-spring-boot/.github/workflows/build.yml +++ b/docker-spring-boot/.github/workflows/build.yml @@ -33,4 +33,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=DevOpsCaps_docker-java + run: | + cd docker-spring-boot + mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=DevOpsCaps_docker-java + From 3498d4eb48c8a88b13d780bd1f08e63397b68616 Mon Sep 17 00:00:00 2001 From: dc-seena <62215304+dc-seena@users.noreply.github.com> Date: Mon, 8 Nov 2021 16:41:37 -0500 Subject: [PATCH 7/7] Update build.yml change directory --- .github/workflows/build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f1df5b2..a037d01 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,4 +33,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=DevOpsCaps_docker-java + run: | + cd docker-spring-boot + mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=DevOpsCaps_docker-java