Skip to content

Commit

Permalink
Publish to npm-topic instead of npm-okta
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbui-okta committed May 11, 2020
1 parent 2ae9bad commit 63c3899
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions scripts/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

source ${OKTA_HOME}/${REPO}/scripts/setup.sh

REGISTRY="${ARTIFACTORY_URL}/api/npm/npm-okta"
REGISTRY="${ARTIFACTORY_URL}/api/npm/npm-topic"

npm install -g @okta/ci-update-package
npm install -g @okta/ci-pkginfo
npm install -g @okta/ci-append-sha

export TEST_SUITE_TYPE="build"

Expand All @@ -17,20 +16,17 @@ else
TARGET_BRANCH=${BRANCH}
fi

if ! ci-update-package --branch ${TARGET_BRANCH}; then
echo "ci-update-package failed! Exiting..."
if ! ci-append-sha; then
echo "ci-append-sha failed! Exiting..."
exit $FAILED_SETUP
fi

# Update default regsitry before publishing
npm config set @okta:registry ${REGISTRY}

if ! npm publish --registry ${REGISTRY}; then
echo "npm publish failed! Exiting..."
exit ${PUBLISH_ARTIFACTORY_FAILURE}
fi

DATALOAD=$(ci-pkginfo -t dataload)
if ! artifactory_curl -X PUT -u ${ARTIFACTORY_CREDS} ${DATALOAD} -v -f; then
echo "artifactory_curl failed! Exiting..."
exit ${PUBLISH_ARTIFACTORY_FAILURE}
fi

exit ${SUCCESS}

0 comments on commit 63c3899

Please sign in to comment.