Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Commit

Permalink
Bacon CI (#531)
Browse files Browse the repository at this point in the history
  • Loading branch information
aarongranick-okta authored Aug 20, 2019
1 parent a034526 commit c11556a
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 5 deletions.
3 changes: 2 additions & 1 deletion scripts/installPackages.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#! /bin/bash -xe

if [ $CI ]
# Detect if we are running on Travis or Bacon
if [ $CI ] || [ $TASK_DEFINITION ]
then
echo "Running in a CI environment"
YARN_ARGS="--frozen-lockfile"
Expand Down
2 changes: 1 addition & 1 deletion scripts/publish.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/bash -xe

# Install yarn
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --rc
Expand Down
2 changes: 2 additions & 0 deletions scripts/publish_external.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# TODO: is this script used? "publish" is called by bacon.

# undo permissions change on scripts/publish_external.sh
git checkout -- scripts

Expand Down
28 changes: 25 additions & 3 deletions scripts/setup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/bash -xe

# Add yarn to the $PATH so npm cli commands do not fail
export PATH="${PATH}:$(yarn global bin)"
Expand Down Expand Up @@ -28,13 +28,35 @@ OKTA_REGISTRY=${ARTIFACTORY_URL}/api/npm/npm-okta-master
# - https://github.com/yarnpkg/yarn/issues/5892
# - https://github.com/yarnpkg/yarn/issues/3330

# Replace yarn artifactory with Okta's
# Replace yarn registry with Okta's
echo "Replacing $YARN_REGISTRY with $OKTA_REGISTRY within yarn.lock files..."
sed -i "s#${YARN_REGISTRY}#${OKTA_REGISTRY}#" yarn.lock
sed -i "s#${YARN_REGISTRY}#${OKTA_REGISTRY}#" packages/okta-angular/test/e2e/harness/yarn.lock
sed -i "s#${YARN_REGISTRY}#${OKTA_REGISTRY}#" packages/okta-react/test/e2e/harness/yarn.lock
sed -i "s#${YARN_REGISTRY}#${OKTA_REGISTRY}#" packages/okta-vue/test/e2e/harness/yarn.lock
sed -i "s#${YARN_REGISTRY}#${OKTA_REGISTRY}#" packages/configuration-validation/yarn.lock
sed -i "s#${YARN_REGISTRY}#${OKTA_REGISTRY}#" packages/jwt-verifier/yarn.lock
sed -i "s#${YARN_REGISTRY}#${OKTA_REGISTRY}#" packages/oidc-middleware/yarn.lock
sed -i "s#${YARN_REGISTRY}#${OKTA_REGISTRY}#" packages/okta-angular/yarn.lock
sed -i "s#${YARN_REGISTRY}#${OKTA_REGISTRY}#" packages/okta-react/yarn.lock
sed -i "s#${YARN_REGISTRY}#${OKTA_REGISTRY}#" packages/okta-vue/yarn.lock
sed -i "s#${YARN_REGISTRY}#${OKTA_REGISTRY}#" packages/okta-react-native/yarn.lock

if ! yarn install ; then
echo "yarn install failed! Exiting..."
exit ${FAILED_SETUP}
fi

# Revert the origional change
# Revert the original change(s)
echo "Replacing $OKTA_REGISTRY with $YARN_REGISTRY within yarn.lock files..."
sed -i "s#${OKTA_REGISTRY}#${YARN_REGISTRY}#" yarn.lock
sed -i "s#${OKTA_REGISTRY}#${YARN_REGISTRY}#" packages/okta-angular/test/e2e/harness/yarn.lock
sed -i "s#${YARN_REGISTRY}#${OKTA_REGISTRY}#" packages/okta-react/test/e2e/harness/yarn.lock
sed -i "s#${OKTA_REGISTRY}#${YARN_REGISTRY}#" packages/okta-vue/test/e2e/harness/yarn.lock
sed -i "s#${OKTA_REGISTRY}#${YARN_REGISTRY}#" packages/configuration-validation/yarn.lock
sed -i "s#${OKTA_REGISTRY}#${YARN_REGISTRY}#" packages/jwt-verifier/yarn.lock
sed -i "s#${OKTA_REGISTRY}#${YARN_REGISTRY}#" packages/oidc-middleware/yarn.lock
sed -i "s#${OKTA_REGISTRY}#${YARN_REGISTRY}#" packages/okta-angular/yarn.lock
sed -i "s#${OKTA_REGISTRY}#${YARN_REGISTRY}#" packages/okta-react/yarn.lock
sed -i "s#${OKTA_REGISTRY}#${YARN_REGISTRY}#" packages/okta-vue/yarn.lock
sed -i "s#${OKTA_REGISTRY}#${YARN_REGISTRY}#" packages/okta-react-native/yarn.lock

0 comments on commit c11556a

Please sign in to comment.