Skip to content

Commit

Permalink
CI/CD enginerring
Browse files Browse the repository at this point in the history
  • Loading branch information
DomPeliniAerospike committed Jan 17, 2025
1 parent 77320dc commit 4fe41d8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 61 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/npm-install-script-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -197,7 +197,7 @@ jobs:
- name: npm install
run: |
npm install [email protected].10
npm install [email protected].11
- name: List available artifacts
run: |
Expand Down
66 changes: 10 additions & 56 deletions .github/workflows/upload-jfrog-build-to-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/upload-to-jfrog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit 4fe41d8

Please sign in to comment.