-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/hashicorp/vault into tls13
- Loading branch information
Showing
209 changed files
with
10,385 additions
and
1,443 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,19 +4,26 @@ shell: /usr/bin/env bash -euo pipefail -c | |
steps: | ||
- checkout | ||
- setup_remote_docker | ||
- run: | ||
name: Diff package-lock.json | ||
command: | | ||
echo 'export PACKAGE_LOCK_CHANGED=$(git diff --name-only $(git log --pretty=format:'%h' -n1 HEAD~1)...HEAD | grep -c website/package-lock.json)' >> $BASH_ENV | ||
- run: | ||
name: Build Docker Image if Necessary | ||
command: | | ||
if [ "$CIRCLE_BRANCH" = "master" ] && [ $PACKAGE_LOCK_CHANGED -gt 0 ]; then | ||
cd website/ | ||
docker build -t hashicorp/vault-website:$CIRCLE_SHA1 . | ||
docker tag hashicorp/vault-website:$CIRCLE_SHA1 hashicorp/vault-website:latest | ||
docker login -u $DOCKER_USER -p $DOCKER_PASS | ||
docker push hashicorp/vault-website | ||
else | ||
echo "Not building a new website docker image - branch is not master and/or dependencies have not changed." | ||
fi | ||
# BUILD_FROM_REPO should ALWAYS be the main OSS Vault repo URL. | ||
[email protected]:hashicorp/vault.git | ||
[ "$CIRCLE_REPOSITORY_URL" = "$BUILD_FROM_REPO" ] || { | ||
echo "Not building website docker image for repo '$CIRCLE_REPOSITORY_URL' - we only build it for $BUILD_FROM_REPO." | ||
exit 0 | ||
} | ||
[ "$CIRCLE_BRANCH" = "master" ] || { | ||
echo "Not building website docker image for branch '$CIRCLE_BRANCH' - we only build it for master." | ||
exit 0 | ||
} | ||
PACKAGE_LOCK_CHANGED=$(git diff --name-only $(git log --pretty=format:'%h' -n1 HEAD~1)...HEAD | grep -c website/package-lock.json) | ||
[ $PACKAGE_LOCK_CHANGED -gt 0 ] || { | ||
echo "Not building a new website docker image - dependencies have not changed." | ||
exit 0 | ||
} | ||
cd website/ | ||
docker build -t hashicorp/vault-website:$CIRCLE_SHA1 . | ||
docker tag hashicorp/vault-website:$CIRCLE_SHA1 hashicorp/vault-website:latest | ||
docker login -u $DOCKER_USER -p $DOCKER_PASS | ||
docker push hashicorp/vault-website |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.