mirror of
https://github.com/EvernodeXRPL/hpcore.git
synced 2026-04-29 15:37:59 +00:00
Updating docker image tags with version number (#372)
This commit is contained in:
committed by
GitHub
parent
42cf454396
commit
0c8c5aa0e3
@@ -88,7 +88,7 @@ add_custom_target(docker
|
||||
COMMAND mkdir -p ./test/local-cluster/bin
|
||||
COMMAND cp ./build/hpcore ./test/local-cluster/bin/
|
||||
COMMAND cp ./test/bin/libblake3.so ./test/bin/hpws ./test/bin/hpfs ./test/local-cluster/bin/
|
||||
COMMAND docker build -t hpcore:latest -f ./test/local-cluster/Dockerfile ./test/local-cluster/bin/
|
||||
COMMAND docker build -t hpcore:latest -t hpcore:0.6.0 -f ./test/local-cluster/Dockerfile ./test/local-cluster/bin/
|
||||
)
|
||||
set_target_properties(docker PROPERTIES EXCLUDE_FROM_ALL TRUE)
|
||||
add_dependencies(docker hpcore)
|
||||
|
||||
@@ -12,12 +12,12 @@ cp $hpcoredir/build/hpcore $hpcoredir/test/bin/{hpfs,hpws,libblake3.so} $tmp/
|
||||
strip $tmp/hpcore
|
||||
|
||||
# Remove the revision component from hp version to make up the image version.
|
||||
# hpversion=$($tmp/hpcore version | head -n 1)
|
||||
# imgversion=$(echo "${hpversion%.*}")
|
||||
imgversion="latest"
|
||||
hpversion=$($tmp/hpcore version | head -n 1)
|
||||
imgversion=$(echo "${hpversion}")
|
||||
# imgversion="latest"
|
||||
|
||||
# Ubuntu base image
|
||||
docker build -t $img:$imgversion-ubt.20.04 -f ./$basefile $tmp/
|
||||
docker build -t $img:$imgversion-ubt.20.04 -t $img:latest-ubt.20.04 -f ./$basefile $tmp/
|
||||
rm -r $tmp/*
|
||||
|
||||
# NodeJs image
|
||||
@@ -27,6 +27,6 @@ tar -xvJf $tmp/nodejs.tar.xz --strip-components=2 -C $tmp/ node-v16.14.0-linux-x
|
||||
rm $tmp/nodejs.tar.xz
|
||||
cp ./$njsfile $tmp/
|
||||
sed -i "s/%ver%/$imgversion/g" $tmp/$njsfile
|
||||
docker build -t $img:$imgversion-ubt.20.04-njs.16 -f $tmp/$njsfile $tmp
|
||||
docker build -t $img:$imgversion-ubt.20.04-njs.16 -t $img:latest-ubt.20.04-njs.16 -f $tmp/$njsfile $tmp
|
||||
|
||||
rm -r $tmp
|
||||
@@ -14,6 +14,7 @@ fi
|
||||
|
||||
clusterloc=$(pwd)/hpcluster
|
||||
n=$1
|
||||
hpversion=0.6.0
|
||||
|
||||
let pubport=8080+$n
|
||||
let peerport=22860+$n
|
||||
@@ -26,4 +27,4 @@ docker run --rm -t -i --network=hpnet --ip=172.1.1.${n} --name=node${n} \
|
||||
-p ${peerport}:${peerport} \
|
||||
--device /dev/fuse --cap-add SYS_ADMIN --security-opt apparmor:unconfined \
|
||||
--mount type=bind,source=${clusterloc}/node${n},target=/contract \
|
||||
hpcore:latest run /contract
|
||||
hpcore:${hpversion} run /contract
|
||||
|
||||
@@ -5,6 +5,7 @@ WINDOWSIZE=60 # size of window in seconds to examine for successful consensus ro
|
||||
PIPE=concon.pipe
|
||||
clusterloc=$(pwd)/hpcluster
|
||||
n=1
|
||||
hpversion=0.6.0
|
||||
let pubport=8080+$n
|
||||
while true; do
|
||||
|
||||
@@ -24,7 +25,7 @@ while true; do
|
||||
-p ${pubport}:${pubport} -a stderr -a stdout \
|
||||
--device /dev/fuse --cap-add SYS_ADMIN --security-opt apparmor:unconfined \
|
||||
--mount type=bind,source=${clusterloc}/node${n},target=/contract \
|
||||
hpcore:latest run /contract > $PIPE 2>> $PIPE 3>MARKER &
|
||||
hpcore:${hpversion} run /contract > $PIPE 2>> $PIPE 3>MARKER &
|
||||
PID=$!
|
||||
sleep 1
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
clusterloc=$(pwd)/hpcluster
|
||||
n=1
|
||||
hpversion=0.6.0
|
||||
let pubport=8080+$n
|
||||
while true; do
|
||||
CONSENSUS="0"
|
||||
@@ -11,7 +12,7 @@ while true; do
|
||||
-p ${pubport}:${pubport} -a stderr -a stdout \
|
||||
--device /dev/fuse --cap-add SYS_ADMIN --security-opt apparmor:unconfined \
|
||||
--mount type=bind,source=${clusterloc}/node${n},target=/contract \
|
||||
hpcore:latest run /contract > contest.out 2>> contest.out &
|
||||
hpcore:${hpversion} run /contract > contest.out 2>> contest.out &
|
||||
PID=$!
|
||||
sleep 1
|
||||
kill -s 0 $PID 2> /dev/null 1> /dev/null
|
||||
|
||||
@@ -15,6 +15,7 @@ fi
|
||||
dir=$(realpath $1)
|
||||
dirname=$(basename $dir)
|
||||
n=$1
|
||||
hpversion=0.6.0
|
||||
|
||||
let pubport=8080
|
||||
|
||||
@@ -25,4 +26,4 @@ docker run --rm -t -i --network=hpnet --name=hp_$dirname \
|
||||
-p ${pubport}:${pubport} \
|
||||
--device /dev/fuse --cap-add SYS_ADMIN --security-opt apparmor:unconfined \
|
||||
--mount type=bind,source=$dir,target=/contract \
|
||||
hpcore:latest run /contract
|
||||
hpcore:${hpversion} run /contract
|
||||
Reference in New Issue
Block a user