Skip to content

Commit 1dad122

Browse files
authored
Merge pull request #154 from jason-fox/feature/webhook
Add webhook bash script
2 parents df28627 + d345895 commit 1dad122

File tree

3 files changed

+45
-3
lines changed

3 files changed

+45
-3
lines changed

.github/fiware/image-clone.sh

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
set -e
2+
3+
SOURCE="ging/fiware-pep-proxy"
4+
DOCKER_TARGET="fiware/pep-proxy"
5+
QUAY_TARGET="quay.io/fiware/pep-proxy"
6+
7+
# DOCKER_TARGET="fiware/$(basename $(git rev-parse --show-toplevel))"
8+
# QUAY_TARGET="quay.io/fiware/$(basename $(git rev-parse --show-toplevel))"
9+
10+
VERSION=$(git describe --exclude 'FIWARE*' --tags $(git rev-list --tags --max-count=1))
11+
12+
function clone {
13+
echo 'cloning from '"$1 $2"' to '"$3"
14+
docker pull -q "$1":"$2"
15+
docker tag "$1":"$2" "$3":"$2"
16+
docker push -q "$3":"$2"
17+
18+
if ! [ -z "$4" ]; then
19+
echo 'pushing '"$1 $2"' to latest'
20+
docker tag "$1":"$2" "$3":latest
21+
docker push -q "$3":latest
22+
fi
23+
}
24+
25+
for i in "$@" ; do
26+
if [[ $i == "docker" ]]; then
27+
28+
clone "$SOURCE" "$VERSION" "$DOCKER_TARGET" true
29+
clone "$SOURCE" "$VERSION"-distroless "$DOCKER_TARGET"
30+
fi
31+
if [[ $i == "quay" ]]; then
32+
clone "$SOURCE" "$VERSION" "$QUAY_TARGET" true
33+
clone "$SOURCE" "$VERSION"-distroless "$QUAY_TARGET"
34+
fi
35+
echo ""
36+
done
37+
38+
for i in "$@" ; do
39+
if [[ $i == "clean" ]]; then
40+
docker rmi -f $(docker images -a -q) | true
41+
fi
42+
done

.husky/pre-commit

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
npm run pre-commit
4+
# npm run pre-commit

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)