2018-08-26 00:44:08 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e # fail on any error
|
|
|
|
set -u # treat unset variables as error
|
|
|
|
|
2018-09-30 13:42:49 +02:00
|
|
|
echo "__________Register Release__________"
|
|
|
|
DATA="secret=$RELEASES_SECRET"
|
|
|
|
|
|
|
|
echo "Pushing release to Mainnet"
|
2018-10-01 13:42:07 +02:00
|
|
|
./scripts/gitlab/safe-curl.sh $DATA "http://update.parity.io:1337/push-release/$CI_BUILD_REF_NAME/$CI_BUILD_REF"
|
2018-09-30 13:42:49 +02:00
|
|
|
|
|
|
|
echo "Pushing release to Kovan"
|
2018-10-01 13:42:07 +02:00
|
|
|
./scripts/gitlab/safe-curl.sh $DATA "http://update.parity.io:1338/push-release/$CI_BUILD_REF_NAME/$CI_BUILD_REF"
|
2018-09-30 13:42:49 +02:00
|
|
|
|
2018-08-26 00:44:08 +02:00
|
|
|
cd artifacts
|
|
|
|
ls -l | sort -k9
|
|
|
|
filetest=( * )
|
|
|
|
echo ${filetest[*]}
|
|
|
|
for DIR in "${filetest[@]}";
|
|
|
|
do
|
|
|
|
cd $DIR
|
2018-10-01 18:32:18 +02:00
|
|
|
if [[ $DIR =~ "windows" ]];
|
2018-08-26 00:44:08 +02:00
|
|
|
then
|
|
|
|
WIN=".exe";
|
|
|
|
else
|
|
|
|
WIN="";
|
|
|
|
fi
|
2018-10-01 17:58:16 +02:00
|
|
|
sha3=$(cat parity.sha3 | awk '{print $1}')
|
|
|
|
case $DIR in
|
|
|
|
x86_64* )
|
|
|
|
DATA="commit=$CI_BUILD_REF&sha3=$sha3&filename=parity$WIN&secret=$RELEASES_SECRET"
|
|
|
|
../../scripts/gitlab/safe-curl.sh $DATA "http://update.parity.io:1337/push-build/$CI_BUILD_REF_NAME/$DIR"
|
|
|
|
# Kovan
|
|
|
|
../../scripts/gitlab/safe-curl.sh $DATA "http://update.parity.io:1338/push-build/$CI_BUILD_REF_NAME/$DIR"
|
|
|
|
;;
|
|
|
|
esac
|
2018-08-26 00:44:08 +02:00
|
|
|
cd ..
|
|
|
|
done
|
|
|
|
|
|
|
|
echo "__________Push binaries to AWS S3____________"
|
|
|
|
aws configure set aws_access_key_id $s3_key
|
|
|
|
aws configure set aws_secret_access_key $s3_secret
|
|
|
|
if [[ "$CI_BUILD_REF_NAME" = "beta" || "$CI_BUILD_REF_NAME" = "stable" || "$CI_BUILD_REF_NAME" = "nightly" ]];
|
|
|
|
then
|
|
|
|
export S3_BUCKET=builds-parity-published;
|
|
|
|
else
|
|
|
|
export S3_BUCKET=builds-parity;
|
|
|
|
fi
|
|
|
|
aws s3 sync ./ s3://$S3_BUCKET/$CI_BUILD_REF_NAME/
|