Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[KLAR-7754] Implement Azure DevOps pipeline JFrog template for NPM projects #17

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Next Next commit
added step-setup-npm-jfrog-proxy.yml
  • Loading branch information
Tadas Kazlauskas committed Nov 16, 2022
commit 706066fdad4c66f36811863e92c5a64a927b7c57
35 changes: 35 additions & 0 deletions step-setup-npm-jfrog-proxy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Version 1.0.0
# Maintainer: Tadas Kazlauskas
# You need your global variables set anyways
# Parameters:
# JF_SERVER_ID: JFrog server id (default: nordcloud.jfrog.io)
# JF_ACCESS_TOKEN: JFrog access token
# JF_NPM_REPO: JFrog virtual repository name
# JFROG_CLI_VERSION: JFrog CLI version

parameters:
- name: jf_server_id
default: ''
- name: jf_npm_repo
default: ''
- name: jf_access_token
default: ''
- name: jf_cli_version
default: ''

steps:
- task: JFrogToolsInstaller@1
inputs:
artifactoryConnection: "JFrog Artifactory V2"
cliInstallationRepo: "jfrog-cli"
installCustomVersion: true
cliVersion: ${{ parameters.jf_cli_version }}
- script: |
export PATH=$PATH:/opt/hostedtoolcache/jf/${{ parameters.jf_cli_version }}/x64/
echo 'JF_SERVER_ID: ${{ parameters.jf_server_id }}'
echo 'jf test'
jf c add $(JF_SERVER_ID) --url=https://${{ parameters.jf_server_id }}/ --interactive=false --access-token=$(JF_ACCESS_TOKEN)
jf npm-config --repo-resolve ${{ parameters.jf_npm_repo }} --server-id-resolve ${{ parameters.jf_server_id }}
jf rt ping
jf c show
displayName: "Configure JFrog proxy for NPM"