-
Notifications
You must be signed in to change notification settings - Fork 6
/
jenkins.sh
executable file
·52 lines (39 loc) · 1.41 KB
/
jenkins.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
set -ex
export GOPATH=`pwd`
mkdir -p $GOPATH/bin
export PATH=$PATH:$GOPATH/bin
go get github.com/loomnetwork/go-loom
cd ${GOPATH}/src/github.com/loomnetwork/gamechain
make deps
make
pushd .
cd ${GOPATH}/src/github.com/loomnetwork/loomchain
make gamechain-cleveldb
cp gamechain $GOPATH/bin/gamechain
popd
make gamechain-logger
make bin/gcoracle
make test
# Docker image for gamechain-logger
if [ "${MAKE_GAMECHAIN_LOGGER_DOCKER}" = "true" ]; then
DOC_IMAGE_LOGGER=gcr.io/robotic-catwalk-188706/gamechain-logger
chmod +x bin/gamechain-logger
echo "Building $DOC_IMAGE_LOGGER"
docker build -t $DOC_IMAGE_LOGGER:latest -f Dockerfile .
docker tag $DOC_IMAGE_LOGGER:latest $DOC_IMAGE_LOGGER:$BUILD_NUMBER
echo "Pushing $DOC_IMAGE_LOGGER to google container registry"
gcloud docker -- push $DOC_IMAGE_LOGGER:$BUILD_NUMBER
gcloud docker -- push $DOC_IMAGE_LOGGER:latest
fi
# Docker image for gamechain-oracle
if [ "${MAKE_GAMECHAIN_ORACLE_DOCKER}" = "true" ]; then
DOC_IMAGE_ORACLE=gcr.io/robotic-catwalk-188706/gamechain-oracle
chmod +x bin/gcoracle
echo "Building $DOC_IMAGE_ORACLE"
docker build -t $DOC_IMAGE_ORACLE:latest -f Dockerfile_gcoracle .
docker tag $DOC_IMAGE_ORACLE:latest $DOC_IMAGE_ORACLE:$BUILD_NUMBER
echo "Pushing $DOC_IMAGE_ORACLE to google container registry"
gcloud docker -- push $DOC_IMAGE_ORACLE:$BUILD_NUMBER
gcloud docker -- push $DOC_IMAGE_ORACLE:latest
fi