From 4fe41d805206dddb4ae86b7aefb8ecb0174e348f Mon Sep 17 00:00:00 2001 From: Dominic Pelini Date: Fri, 17 Jan 2025 14:50:34 -0700 Subject: [PATCH] CI/CD enginerring --- .github/workflows/npm-install-script-test.yml | 4 +- .../workflows/upload-jfrog-build-to-npm.yml | 66 +++---------------- .github/workflows/upload-to-jfrog.yml | 6 +- 3 files changed, 15 insertions(+), 61 deletions(-) diff --git a/.github/workflows/npm-install-script-test.yml b/.github/workflows/npm-install-script-test.yml index aa883d07..10f3c452 100644 --- a/.github/workflows/npm-install-script-test.yml +++ b/.github/workflows/npm-install-script-test.yml @@ -164,7 +164,7 @@ jobs: node-version: 20 - name: Set version - run: npm version 6.0.3-dev.10 --no-git-tag-version + run: npm version 6.0.3-dev.11 --no-git-tag-version - name: Change install command for release run: node ./scripts/change-install-command.js @@ -197,7 +197,7 @@ jobs: - name: npm install run: | - npm install aerospike@6.0.3-dev.10 + npm install aerospike@6.0.3-dev.11 - name: List available artifacts run: | diff --git a/.github/workflows/upload-jfrog-build-to-npm.yml b/.github/workflows/upload-jfrog-build-to-npm.yml index 1d2ec133..b7435009 100644 --- a/.github/workflows/upload-jfrog-build-to-npm.yml +++ b/.github/workflows/upload-jfrog-build-to-npm.yml @@ -58,16 +58,22 @@ jobs: run: | sed -i 's/"name": "[^"]*"/"name": "test-1-2-3"/' package.json - - name: + - name: Download Artifacts from Jfrog run: jf rt dl "clients-${{ env.PACKAGE_MANAGER }}-dev-local/aerospike/${{ env.NEW_VERSION }}/" "downloaded-artifacts/" env: - NEW_VERSION: 6.0.3-dev.10 + NEW_VERSION: 6.0.3-dev.11 PACKAGE_MANAGER: npm - - name: build pack + - name: list Artifacts run: | ls downloaded-artifacts - npm version 6.0.3-dev.10 --no-git-tag-version + + - name: change verison + run: | + npm version 6.0.3-dev.11 --no-git-tag-version + + - name: install package + run: | npm install; - name: modify install script @@ -80,64 +86,12 @@ jobs: # env: # NPMRC_OFF: ${{ secrets.NPMRC_OFF }} - - name: Change install command for release - run: node ./scripts/change-install-command.js - - - name: npm publish run: | npm publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_OFF }} - - - #- name: npm rc - # run: echo "$NPMRC_OFF" | base64 --decode > ~/.npmrc - # env: - # NPMRC_OFF: ${{ secrets.NPMRC_OFF }} - - #- name: npm login - # run: | - # npm login --registry=https://aerospike.jfrog.io/artifactory/api/npm/clients-npm-dev-local/ --auth-type=web - -# - name: npm get registry -# run: | -# npm get registry -# -# - name: build pack -# run: | -# cat package.json -# npm version 6.0.3-dev.4 --no-git-tag-version -# ./scripts/build-c-client.sh; -# npm install; -# -# - name: npm rc 2 -# run: | -# echo "$NPMRC" | base64 --decode > ~/.npmrc -# env: -# NPMRC: ${{ secrets.NPMRC }} -# -# - name: npm get registry -# run: | -# npm get registry -# npm -v -# -# - name: npm publish -# run: | -# npm publish --registry=https://aerospike.jfrog.io/artifactory/api/npm/clients-npm-dev-local/ - - - - #- name: Download JFrog build - # run: jf rt dl --build python-client/6.0.3-dev.1 ${{ vars.JFROG_REPO_NAME }} - #- name: npm install from JFrog - # run: | - # jf npm-config --repo-deploy --repo-resolve clients-npm-dev-local - # jf npm install --build-name=nodejs-client --build-number=6.0.3-dev.4 - # ls . - - #- run: npm ci #- run: npm publish --provenance --access public # env: diff --git a/.github/workflows/upload-to-jfrog.yml b/.github/workflows/upload-to-jfrog.yml index 30e23309..fdd0954f 100644 --- a/.github/workflows/upload-to-jfrog.yml +++ b/.github/workflows/upload-to-jfrog.yml @@ -41,7 +41,7 @@ jobs: path: artifacts - name: print artifacts - run: ls . + run: ls artifacts - name: Set up JFrog credentials uses: jfrog/setup-jfrog-cli@v4 @@ -65,10 +65,10 @@ jobs: # https://github.com/jfrog/jfrog-cli/issues/1775#issuecomment-1348986551 run: jf rt upload --build-name nodejs-client --build-number ${{ env.NEW_VERSION }}/ "artifacts/*" clients-${{ env.PACKAGE_MANAGER }}-dev-local/aerospike/${{ env.NEW_VERSION }}/ env: - NEW_VERSION: 6.0.3-dev.10 + NEW_VERSION: 6.0.3-dev.11 PACKAGE_MANAGER: npm - name: Publish build info if: ${{ inputs.jfrog-repo-name == vars.JFROG_REPO_NAME }} - run: jf rt build-publish nodejs-client 6.0.3-dev.10 + run: jf rt build-publish nodejs-client 6.0.3-dev.11