Skip to content

Commit

Permalink
Update scripts to account for yarn/node upgrades (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmelberg-okta authored Aug 8, 2018
1 parent 8d0ccae commit af429f4
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
8 changes: 4 additions & 4 deletions scripts/lint.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

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

export TEST_SUITE_TYPE="checkstyle"
export TEST_RESULT_FILE_DIR="${REPO}/build2"
Expand All @@ -10,6 +10,6 @@ if ! npm run lint:report; then
exit ${TEST_FAILURE}
fi

echo $TEST_SUITE_TYPE > $TEST_SUITE_TYPE_FILE
echo $TEST_RESULT_FILE_DIR > $TEST_RESULT_FILE_DIR_FILE
exit $PUBLISH_TYPE_AND_RESULT_DIR;
echo ${TEST_SUITE_TYPE} > ${TEST_SUITE_TYPE_FILE}
echo ${TEST_RESULT_FILE_DIR} > ${TEST_RESULT_FILE_DIR_FILE}
exit ${PUBLISH_TYPE_AND_RESULT_DIR}
20 changes: 10 additions & 10 deletions scripts/publish.sh
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
#!/bin/bash

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

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

export TEST_SUITE_TYPE="build"

if [ -n "$action_branch" ];
if [ -n "${action_branch}" ];
then
echo "Publishing from bacon task using branch $action_branch"
TARGET_BRANCH=$action_branch
echo "Publishing from bacon task using branch ${action_branch}"
TARGET_BRANCH=${action_branch}
else
echo "Publishing from bacon testSuite using branch $BRANCH"
TARGET_BRANCH=$BRANCH
echo "Publishing from bacon testSuite using branch ${BRANCH}"
TARGET_BRANCH=${BRANCH}
fi

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

if ! npm publish --registry ${REGISTRY}; then
echo "npm publish failed! Exiting..."
exit $PUBLISH_ARTIFACTORY_FAILURE
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
exit ${PUBLISH_ARTIFACTORY_FAILURE}
fi

exit $SUCCESS
exit ${SUCCESS}
4 changes: 2 additions & 2 deletions scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

cd ${OKTA_HOME}/${REPO}

# Use newer, faster npm
npm install -g [email protected]
# Add yarn to the $PATH so cli commands do not fail
export PATH="${PATH}:$(yarn global bin)"

# Install required dependencies
npm install -g @okta/ci-update-package
Expand Down
8 changes: 4 additions & 4 deletions scripts/unit.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

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

export TEST_SUITE_TYPE="jsunit"
export TEST_RESULT_FILE_DIR="${REPO}/build2/reports/jasmine"
Expand All @@ -10,6 +10,6 @@ if ! npm test; then
exit ${TEST_FAILURE}
fi

echo $TEST_SUITE_TYPE > $TEST_SUITE_TYPE_FILE
echo $TEST_RESULT_FILE_DIR > $TEST_RESULT_FILE_DIR_FILE
exit $PUBLISH_TYPE_AND_RESULT_DIR;
echo ${TEST_SUITE_TYPE} > ${TEST_SUITE_TYPE_FILE}
echo ${TEST_RESULT_FILE_DIR} > ${TEST_RESULT_FILE_DIR_FILE}
exit ${PUBLISH_TYPE_AND_RESULT_DIR}

0 comments on commit af429f4

Please sign in to comment.