From 933e5a9a010b11621c833f33507b93039800d8a1 Mon Sep 17 00:00:00 2001 From: Ivan Gonzalez Date: Mon, 26 Feb 2024 12:35:21 -0500 Subject: [PATCH 1/9] ci: build step added & xray enabled --- .github/workflows/release.yml | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 88c298e..2ad2cfe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,7 @@ name: Release env: JFROG_CLI_BUILD_NAME: ${{ github.repository }} -# JFROG_SERVER: + JFROG_SERVER: eng-generic-dev-local SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }} on: @@ -24,6 +24,10 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: fetch-depth: 0 + + - name: Build library + run: | + go build - name: Run unit tests run: | @@ -37,8 +41,13 @@ jobs: name: coverage path: api/coverage.out + - name: Save built library + uses: actions/upload-artifact@v4 + with: + name: library + path: go-client-library-passwordsafe + sonarqube: - # Sonar scan is not required for dependabot PRs needs: build runs-on: ubuntu-latest steps: @@ -91,9 +100,17 @@ jobs: x-ray: needs: [build, sonarqube] runs-on: ubuntu-latest - if: false steps: - + - name: Download coverage + uses: actions/download-artifact@v4 + with: + name: library + + - name: Send artifacts to Jfrog + run: | + cd dist + jfrog rt u "go-client-library-passwordsafe" ${{ env.JFROG_SERVER}} + - name: Publish Build Information run: | jfrog rt build-add-git From 5b0449b3d5239db51671f217b8488d1f2dc602dd Mon Sep 17 00:00:00 2001 From: Ivan Gonzalez Date: Mon, 26 Feb 2024 12:38:46 -0500 Subject: [PATCH 2/9] ci: fixing issues on upload artifact --- .github/workflows/release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2ad2cfe..069275a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -108,7 +108,6 @@ jobs: - name: Send artifacts to Jfrog run: | - cd dist jfrog rt u "go-client-library-passwordsafe" ${{ env.JFROG_SERVER}} - name: Publish Build Information From 95712ee52dd31d93002c533159e3eade934cb74d Mon Sep 17 00:00:00 2001 From: Ivan Gonzalez Date: Mon, 26 Feb 2024 12:42:14 -0500 Subject: [PATCH 3/9] ci: adding jfrog setup step --- .github/workflows/release.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 069275a..b766a8b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -101,6 +101,11 @@ jobs: needs: [build, sonarqube] runs-on: ubuntu-latest steps: + - name: Jfrog setup + uses: jfrog/setup-jfrog-cli@v3 + env: + JF_ENV_1: ${{ secrets.ARTIFACTORY_DEPLOYER }} + - name: Download coverage uses: actions/download-artifact@v4 with: From 8321e14adb2efb711db6a720dd68cc6969ffb441 Mon Sep 17 00:00:00 2001 From: Ivan Gonzalez Date: Mon, 26 Feb 2024 12:48:01 -0500 Subject: [PATCH 4/9] ci: adding git requirement for jfrog --- .github/workflows/release.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b766a8b..b96ee96 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -101,11 +101,16 @@ jobs: needs: [build, sonarqube] runs-on: ubuntu-latest steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + # Allow goreleaser to access older tag information. + fetch-depth: 0 + - name: Jfrog setup uses: jfrog/setup-jfrog-cli@v3 env: JF_ENV_1: ${{ secrets.ARTIFACTORY_DEPLOYER }} - + - name: Download coverage uses: actions/download-artifact@v4 with: From 24d4ff466c5f940d6b8142c15e02df659476d6d3 Mon Sep 17 00:00:00 2001 From: Ivan Gonzalez Date: Mon, 26 Feb 2024 12:58:37 -0500 Subject: [PATCH 5/9] ci: testing setup --- .github/workflows/release.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b96ee96..4c43ed6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -105,7 +105,7 @@ jobs: with: # Allow goreleaser to access older tag information. fetch-depth: 0 - + - name: Jfrog setup uses: jfrog/setup-jfrog-cli@v3 env: @@ -115,6 +115,11 @@ jobs: uses: actions/download-artifact@v4 with: name: library + + - name: Setting up artifactory + run: | + mkdir go-client-library-passwordsafe + mv go-client-library-passwordsafe go-client-library-passwordsafe/ - name: Send artifacts to Jfrog run: | From b0c5cd69d2bbe4cc81117d324dd79f012cd91d8a Mon Sep 17 00:00:00 2001 From: Ivan Gonzalez Date: Mon, 26 Feb 2024 13:15:49 -0500 Subject: [PATCH 6/9] ci: adding path to download library --- .github/workflows/release.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4c43ed6..1fc52dd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -110,17 +110,17 @@ jobs: uses: jfrog/setup-jfrog-cli@v3 env: JF_ENV_1: ${{ secrets.ARTIFACTORY_DEPLOYER }} - - - name: Download coverage - uses: actions/download-artifact@v4 - with: - name: library - + - name: Setting up artifactory run: | mkdir go-client-library-passwordsafe - mv go-client-library-passwordsafe go-client-library-passwordsafe/ + - name: Download library binary + uses: actions/download-artifact@v4 + with: + name: library + path: go-client-library-passwordsafe + - name: Send artifacts to Jfrog run: | jfrog rt u "go-client-library-passwordsafe" ${{ env.JFROG_SERVER}} From ef69f9f885785ad0ec33d80c3c4d2ccd168d45d9 Mon Sep 17 00:00:00 2001 From: Ivan Gonzalez Date: Mon, 26 Feb 2024 13:20:59 -0500 Subject: [PATCH 7/9] ci: adding path to upload artifact --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1fc52dd..58c5f58 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -123,7 +123,7 @@ jobs: - name: Send artifacts to Jfrog run: | - jfrog rt u "go-client-library-passwordsafe" ${{ env.JFROG_SERVER}} + jfrog rt u "go-client-library-passwordsafe/*" ${{ env.JFROG_SERVER}} - name: Publish Build Information run: | From 1d304101ab317d0c1865f6ef81f463986cc85306 Mon Sep 17 00:00:00 2001 From: Ivan Gonzalez Date: Mon, 26 Feb 2024 14:34:23 -0500 Subject: [PATCH 8/9] ci: changing name for the artifact --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 58c5f58..6976c6e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -123,7 +123,7 @@ jobs: - name: Send artifacts to Jfrog run: | - jfrog rt u "go-client-library-passwordsafe/*" ${{ env.JFROG_SERVER}} + jfrog rt u "go-library-passwordsafe/*" ${{ env.JFROG_SERVER}} - name: Publish Build Information run: | From 492c40d4b043c69934f5c873223f4461f8553c67 Mon Sep 17 00:00:00 2001 From: Ivan Gonzalez Date: Mon, 26 Feb 2024 14:39:02 -0500 Subject: [PATCH 9/9] ci: fixing existing path --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6976c6e..4fb3b98 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -113,13 +113,13 @@ jobs: - name: Setting up artifactory run: | - mkdir go-client-library-passwordsafe + mkdir go-library-passwordsafe - name: Download library binary uses: actions/download-artifact@v4 with: name: library - path: go-client-library-passwordsafe + path: go-library-passwordsafe - name: Send artifacts to Jfrog run: |