-
Notifications
You must be signed in to change notification settings - Fork 1.7k
CI: Remove unnecessary pipes #9681
Changes from 15 commits
aa34dfa
94cf19d
ff311d4
ffadc7f
32c812a
42f3100
99e8652
bc3c111
e18270f
88b6169
244528e
ab9c371
269d7c1
f0f123c
597bbfc
d41e3bc
8eb65a9
ab61722
a86d005
0190876
9da093a
0e8263b
e915d5d
4da8e25
f4774c5
91d732f
a125169
8e8cb9a
885aab6
778493a
d890ab3
a99c6a3
506842b
da0f3cc
f749b0e
0ababae
b1f501a
a02990e
4783af1
c146243
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/bin/bash | ||
|
||
set -e # fail on any error | ||
set -u # treat unset variables as error | ||
|
||
echo "__________Register Release__________" | ||
DATA="secret=$RELEASES_SECRET" | ||
|
||
echo "Pushing release to Mainnet" | ||
./scripts/gitlab/safe-curl.sh $DATA "http://update.parity.io:1337/push-release/$CI_BUILD_REF_NAME/$CI_BUILD_REF" | ||
|
||
echo "Pushing release to Kovan" | ||
./scripts/gitlab/safe-curl.sh $DATA "http://update.parity.io:1338/push-release/$CI_BUILD_REF_NAME/$CI_BUILD_REF" | ||
|
||
cd artifacts | ||
ls -l | sort -k9 | ||
filetest=( * ) | ||
echo ${filetest[*]} | ||
for DIR in "${filetest[@]}"; | ||
do | ||
cd $DIR | ||
if [[ $DIR == "*windows*" ]]; | ||
then | ||
WIN=".exe"; | ||
else | ||
WIN=""; | ||
fi | ||
for binary in $(ls parity.sha3) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My guess is it will only match the one file parity.sha3, so why loop? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I did not author this code, but it also puzzled me, also why |
||
do | ||
sha3=$(cat ${binary/sha3} | awk '{ print $1}' ) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't understand: binary=parity.sha3, then I assume ${binary/sha3} gives "parity." which is a binary (actually without the dot) and does not contain the hash value. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I did not author this code; I did not understand it either. |
||
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 | ||
done | ||
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/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not so familiar with bash but musn't it be =~ for matching regex?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not author this code, happy to change it to
=~