From 710b6a230f1f0cacb3629005240fcf36abbf902d Mon Sep 17 00:00:00 2001 From: Hari Krishnan Date: Tue, 7 May 2024 12:23:31 +0530 Subject: [PATCH 01/10] pointing to private central contract repo --- specmatic.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specmatic.json b/specmatic.json index dff4d65..7c64e2c 100644 --- a/specmatic.json +++ b/specmatic.json @@ -2,7 +2,7 @@ "sources": [ { "provider": "git", - "repository": "https://github.com/znsio/specmatic-order-contracts.git", + "repository": "https://github.com/znsio/central-contract-repo-private.git", "test": [ "in/specmatic/examples/store/api_order_v3.yaml" ] From 536d1fe335057d5d69b56471a8a5b6168c15aa4c Mon Sep 17 00:00:00 2001 From: Hari Krishnan Date: Tue, 7 May 2024 12:31:28 +0530 Subject: [PATCH 02/10] clean up specmatic.json --- specmatic.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specmatic.json b/specmatic.json index 7c64e2c..b4041b1 100644 --- a/specmatic.json +++ b/specmatic.json @@ -30,4 +30,4 @@ } } } -} +} \ No newline at end of file From c2a1f5f8cd098bb8ad84e97ac8e7c3fb5ad406fb Mon Sep 17 00:00:00 2001 From: HariKrishnan Date: Tue, 7 May 2024 12:41:36 +0530 Subject: [PATCH 03/10] Updating Github Actions Adding personal access token for central contract repo as environment variable --- .github/workflows/maven.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 7267942..d8d86a8 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -28,6 +28,8 @@ jobs: java-version: ${{ matrix.java }} - name: Build with Maven working-directory: main + env: + PERSONAL_ACCESS_TOKEN: ${{ secrets.CENTRALCONTRACTREPOACCESS }} run: mvn test package jacoco:report - name: Upload artifact uses: actions/upload-artifact@v3 From 670e77ce6166a4ef8a83817ecaee85299f9ba967 Mon Sep 17 00:00:00 2001 From: Hari Krishnan Date: Tue, 7 May 2024 12:51:41 +0530 Subject: [PATCH 04/10] updating personal access token configuration --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index d8d86a8..07f08f7 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -29,7 +29,7 @@ jobs: - name: Build with Maven working-directory: main env: - PERSONAL_ACCESS_TOKEN: ${{ secrets.CENTRALCONTRACTREPOACCESS }} + PERSONAL_ACCESS_TOKEN: ${{ secrets.CENTRAL_CONTRACT_REPO_ACCESS_TOKEN }} run: mvn test package jacoco:report - name: Upload artifact uses: actions/upload-artifact@v3 From f7335e21ed4f320e08c235dcd2e663ceec274e30 Mon Sep 17 00:00:00 2001 From: Hari Krishnan Date: Sun, 12 May 2024 20:59:20 +0530 Subject: [PATCH 05/10] adding personal access token for central contract repo as part of repo URI --- .github/workflows/maven.yml | 2 -- specmatic.json | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 07f08f7..7267942 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -28,8 +28,6 @@ jobs: java-version: ${{ matrix.java }} - name: Build with Maven working-directory: main - env: - PERSONAL_ACCESS_TOKEN: ${{ secrets.CENTRAL_CONTRACT_REPO_ACCESS_TOKEN }} run: mvn test package jacoco:report - name: Upload artifact uses: actions/upload-artifact@v3 diff --git a/specmatic.json b/specmatic.json index b4041b1..c263e91 100644 --- a/specmatic.json +++ b/specmatic.json @@ -2,7 +2,7 @@ "sources": [ { "provider": "git", - "repository": "https://github.com/znsio/central-contract-repo-private.git", + "repository": "https://${CENTRAL_CONTRACT_REPO_ACCESS_TOKEN}@github.com/znsio/central-contract-repo-private.git", "test": [ "in/specmatic/examples/store/api_order_v3.yaml" ] From 63bdf0fc1ffc0d7da8c832674d8ad49f88b6808a Mon Sep 17 00:00:00 2001 From: Hari Krishnan Date: Sun, 12 May 2024 23:46:58 +0530 Subject: [PATCH 06/10] removing commented code in workflow file --- .github/workflows/maven.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 7267942..f350b6b 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -1,6 +1,3 @@ -# This workflow will build a Java project with Maven -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven - name: Java CI with Maven on: @@ -33,4 +30,4 @@ jobs: uses: actions/upload-artifact@v3 with: name: jacoco coverage report - path: /home/runner/work/specmatic-order-api/specmatic-order-api/main/target/site/jacoco + path: /home/runner/work/specmatic-order-api/specmatic-order-api/main/target/site/jacoco \ No newline at end of file From 664ed1674840ff61dd84dd701ce02be785f9d225 Mon Sep 17 00:00:00 2001 From: Hari Krishnan Date: Mon, 13 May 2024 13:56:24 +0530 Subject: [PATCH 07/10] adding PERSONAL_ACCESS_TOKEN as env variable --- .github/workflows/maven.yml | 2 ++ specmatic.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index f350b6b..fd7b0a2 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -25,6 +25,8 @@ jobs: java-version: ${{ matrix.java }} - name: Build with Maven working-directory: main + env: + PERSONAL_ACCESS_TOKEN: ${{ secrets.CENTRAL_CONTRACT_REPO_ACCESS_TOKEN }} run: mvn test package jacoco:report - name: Upload artifact uses: actions/upload-artifact@v3 diff --git a/specmatic.json b/specmatic.json index c263e91..19cd147 100644 --- a/specmatic.json +++ b/specmatic.json @@ -2,7 +2,7 @@ "sources": [ { "provider": "git", - "repository": "https://${CENTRAL_CONTRACT_REPO_ACCESS_TOKEN}@github.com/znsio/central-contract-repo-private.git", + "repository": "https://${PERSONAL_ACCESS_TOKEN}@github.com/znsio/central-contract-repo-private.git", "test": [ "in/specmatic/examples/store/api_order_v3.yaml" ] From 6722624d6397b97069d19fe4c4aebb9e9de73ea2 Mon Sep 17 00:00:00 2001 From: Hari Krishnan Date: Mon, 13 May 2024 14:21:27 +0530 Subject: [PATCH 08/10] removing commented lines --- .github/dependabot.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index bb6f91c..d6f334b 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,17 +1,10 @@ -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for all configuration options: -# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates - version: 2 updates: - # Maintain dependencies for Gradle - package-ecosystem: "maven" directory: "/" schedule: interval: "daily" - # Maintain dependencies for GitHub Actions - package-ecosystem: "github-actions" directory: "/" schedule: From 2c2c9e65b146799ac9eb7f7d4c429eafee5c9276 Mon Sep 17 00:00:00 2001 From: Hari Krishnan Date: Mon, 13 May 2024 14:26:33 +0530 Subject: [PATCH 09/10] renaming the central contract repo PAT env variable name for better clarity --- .github/workflows/maven.yml | 2 +- specmatic.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index fd7b0a2..adab5dd 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -26,7 +26,7 @@ jobs: - name: Build with Maven working-directory: main env: - PERSONAL_ACCESS_TOKEN: ${{ secrets.CENTRAL_CONTRACT_REPO_ACCESS_TOKEN }} + CENTRAL_CONTRACT_REPO_PAT: ${{ secrets.CENTRAL_CONTRACT_REPO_ACCESS_TOKEN }} run: mvn test package jacoco:report - name: Upload artifact uses: actions/upload-artifact@v3 diff --git a/specmatic.json b/specmatic.json index 19cd147..1194300 100644 --- a/specmatic.json +++ b/specmatic.json @@ -2,7 +2,7 @@ "sources": [ { "provider": "git", - "repository": "https://${PERSONAL_ACCESS_TOKEN}@github.com/znsio/central-contract-repo-private.git", + "repository": "https://${CENTRAL_CONTRACT_REPO_PAT}@github.com/znsio/central-contract-repo-private.git", "test": [ "in/specmatic/examples/store/api_order_v3.yaml" ] From 72db7d1b51f2e478834e76e99409b4b12917732e Mon Sep 17 00:00:00 2001 From: Hari Krishnan Date: Mon, 13 May 2024 14:34:55 +0530 Subject: [PATCH 10/10] fixing codeql build --- .github/workflows/codeql.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index f13db6a..0ce3520 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -39,6 +39,8 @@ jobs: distribution: 'adopt' - name: Build with Maven + env: + CENTRAL_CONTRACT_REPO_PAT: ${{ secrets.CENTRAL_CONTRACT_REPO_ACCESS_TOKEN }} run: mvn -B package --file pom.xml - name: Perform CodeQL Analysis