-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #154 from jason-fox/feature/webhook
Add webhook bash script
- Loading branch information
Showing
3 changed files
with
45 additions
and
3 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
set -e | ||
|
||
SOURCE="ging/fiware-pep-proxy" | ||
DOCKER_TARGET="fiware/pep-proxy" | ||
QUAY_TARGET="quay.io/fiware/pep-proxy" | ||
|
||
# DOCKER_TARGET="fiware/$(basename $(git rev-parse --show-toplevel))" | ||
# QUAY_TARGET="quay.io/fiware/$(basename $(git rev-parse --show-toplevel))" | ||
|
||
VERSION=$(git describe --exclude 'FIWARE*' --tags $(git rev-list --tags --max-count=1)) | ||
|
||
function clone { | ||
echo 'cloning from '"$1 $2"' to '"$3" | ||
docker pull -q "$1":"$2" | ||
docker tag "$1":"$2" "$3":"$2" | ||
docker push -q "$3":"$2" | ||
|
||
if ! [ -z "$4" ]; then | ||
echo 'pushing '"$1 $2"' to latest' | ||
docker tag "$1":"$2" "$3":latest | ||
docker push -q "$3":latest | ||
fi | ||
} | ||
|
||
for i in "$@" ; do | ||
if [[ $i == "docker" ]]; then | ||
|
||
clone "$SOURCE" "$VERSION" "$DOCKER_TARGET" true | ||
clone "$SOURCE" "$VERSION"-distroless "$DOCKER_TARGET" | ||
fi | ||
if [[ $i == "quay" ]]; then | ||
clone "$SOURCE" "$VERSION" "$QUAY_TARGET" true | ||
clone "$SOURCE" "$VERSION"-distroless "$QUAY_TARGET" | ||
fi | ||
echo "" | ||
done | ||
|
||
for i in "$@" ; do | ||
if [[ $i == "clean" ]]; then | ||
docker rmi -f $(docker images -a -q) | true | ||
fi | ||
done |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npm run pre-commit | ||
# npm run pre-commit |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.