Skip to content

Commit

Permalink
Set mount dir as current directory for dunner release
Browse files Browse the repository at this point in the history
  • Loading branch information
apoorvam committed Jun 15, 2019
1 parent 0b1e472 commit e3446b2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 3 additions & 1 deletion release/.dunner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ release_dunner:
- ["./release/publish_deb_to_bintray.sh"]
envs:
- USER=`$BITBUCKET_USER`
- API_KEY=`$BITBUCKET_API_KEY`
- API_KEY=`$BITBUCKET_API_KEY`
mounts:
- ".:/app"
10 changes: 6 additions & 4 deletions release/publish_deb_to_bintray.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ downloadDebianArtifacts() {
| tr -d '"' );
echo $FILES
for i in $FILES; do
RESPONSE_CODE=$(curl -O $i)
if [ "$(echo $RESPONSE_CODE | head -c2)" != "20" ]; then
RESPONSE_CODE=$(curl -O -w "%{response_code}" "$i")
code=$(echo "$RESPONSE_CODE" | head -c2)
if [ $code != "20" ] && [ $code != "30" ]; then
echo "Unable to download $i HTTP response code: $RESPONSE_CODE"
fi
done;
Expand All @@ -53,8 +54,9 @@ bintrayUpload () {
URL="https://api.bintray.com/content/leopardslab/$REPO/$PACKAGE/$VERSION/$UPLOADDIRPATH/$FILENAME;deb_distribution=$DISTRIBUTIONS;deb_component=$COMPONENTS;deb_architecture=$ARCH?publish=1&override=1"
echo "Uploading $URL"

RESPONSE_CODE=$(curl -T $FILENAME -u$USER:$API_KEY $URL -I -s -w "%{http_code}" -o /dev/null);
if [ "$(echo $RESPONSE_CODE | head -c2)" != "20" ]; then
RESPONSE_CODE=$(curl -T $FILENAME -u$USER:$API_KEY $URL -I -s -w "%{response_code}" -o /dev/null);
code=$(echo "$RESPONSE_CODE" | head -c2)
if [ $code != "20" ] && [ $code != "30" ]; then
echo "Unable to upload, HTTP response code: $RESPONSE_CODE"
exit 1
fi
Expand Down
2 changes: 1 addition & 1 deletion release/publish_rpm_to_bintray.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ downloadRpmArtifacts() {
RESPONSE_CODE=$(curl -O -w "%{response_code}" "$i")
echo "$RESPONSE_CODE"
code=$(echo "$RESPONSE_CODE" | head -c2)
if [[ $code != "20" && $code != "30" ]]; then
if [ $code != "20" ] && [ $code != "30" ]; then
echo "Unable to download $i HTTP response code: $RESPONSE_CODE"
exit 1
fi
Expand Down

0 comments on commit e3446b2

Please sign in to comment.