Discard changes to jfrog-token/run.sh

pull/106/head
Muhammad Atif Ali 2 years ago committed by GitHub
parent 5d4205c7f1
commit 81baadbf7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -3,7 +3,7 @@
BOLD='\033[0;1m' BOLD='\033[0;1m'
# check if JFrog CLI is already installed # check if JFrog CLI is already installed
if command -v jf > /dev/null 2>&1; then if command -v jf >/dev/null 2>&1; then
echo "✅ JFrog CLI is already installed, skipping installation." echo "✅ JFrog CLI is already installed, skipping installation."
else else
echo "📦 Installing JFrog CLI..." echo "📦 Installing JFrog CLI..."
@ -23,15 +23,15 @@ if [ -z "${REPOSITORY_NPM}" ]; then
echo "🤔 REPOSITORY_NPM is not set, skipping npm configuration." echo "🤔 REPOSITORY_NPM is not set, skipping npm configuration."
else else
# check if npm is installed and configure it to use the Artifactory "npm" repository. # check if npm is installed and configure it to use the Artifactory "npm" repository.
if command -v npm > /dev/null 2>&1; then if command -v npm >/dev/null 2>&1; then
echo "📦 Configuring npm..." echo "📦 Configuring npm..."
jf npmc --global --repo-resolve "${REPOSITORY_NPM}" jf npmc --global --repo-resolve "${REPOSITORY_NPM}"
fi fi
cat << EOF > ~/.npmrc cat <<EOF >~/.npmrc
email = ${ARTIFACTORY_EMAIL} email = ${ARTIFACTORY_EMAIL}
registry = ${JFROG_URL}/artifactory/api/npm/${REPOSITORY_NPM} registry = ${JFROG_URL}/artifactory/api/npm/${REPOSITORY_NPM}
EOF EOF
jf rt curl /api/npm/auth >> ~/.npmrc jf rt curl /api/npm/auth >>~/.npmrc
fi fi
# Configure the `pip` to use the Artifactory "python" repository. # Configure the `pip` to use the Artifactory "python" repository.
@ -41,7 +41,7 @@ else
echo "🐍 Configuring pip..." echo "🐍 Configuring pip..."
jf pipc --global --repo-resolve "${REPOSITORY_PYPI}" jf pipc --global --repo-resolve "${REPOSITORY_PYPI}"
mkdir -p ~/.pip mkdir -p ~/.pip
cat << EOF > ~/.pip/pip.conf cat <<EOF >~/.pip/pip.conf
[global] [global]
index-url = https://${ARTIFACTORY_USERNAME}:${ARTIFACTORY_ACCESS_TOKEN}@${JFROG_HOST}/artifactory/api/pypi/${REPOSITORY_PYPI}/simple index-url = https://${ARTIFACTORY_USERNAME}:${ARTIFACTORY_ACCESS_TOKEN}@${JFROG_HOST}/artifactory/api/pypi/${REPOSITORY_PYPI}/simple
EOF EOF

Loading…
Cancel
Save