Skip to content

Commit

Permalink
check for all published npm modules prior to docker build (hyperledge…
Browse files Browse the repository at this point in the history
…r-archives#3453)

Signed-off-by: Nick Lincoln <[email protected]>
  • Loading branch information
nklincoln authored Feb 22, 2018
1 parent 1bb90b8 commit 2835551
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .travis/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ set-up-ssh --key "$encrypted_17b59ce72ad7_key" \
--iv "$encrypted_17b59ce72ad7_iv" \
--path-encrypted-key ".travis/github_deploy_key.enc"

# This is the list of npm modules required by docker images
export NPM_MODULES="composer-admin composer-client composer-cli composer-common composer-report composer-playground composer-playground-api composer-rest-server loopback-connector-composer"

# Change from HTTPS to SSH.
./.travis/fix_github_https_repo.sh

Expand Down Expand Up @@ -95,9 +98,12 @@ export VERSION=$(node -e "console.log(require('${DIR}/package.json').version)")
echo "Pushing with tag ${TAG}"
lerna exec --ignore '@(composer-tests-integration|composer-tests-functional|composer-website)' -- npm publish --tag="${TAG}" 2>&1

# quick check to see if the latest npm module has been published
while ! npm view composer-playground@${VERSION} | grep dist-tags > /dev/null 2>&1; do
sleep 10
# Check that all required modules have been published to npm and are retrievable
for j in ${NPM_MODULES}; do
# check the next in the list
while ! npm view ${j}@${VERSION} | grep dist-tags > /dev/null 2>&1; do
sleep 10
done
done

# Build, tag, and publish Docker images.
Expand Down

0 comments on commit 2835551

Please sign in to comment.