Skip to content

Commit

Permalink
Copy artifacts even when skipping builds
Browse files Browse the repository at this point in the history
  • Loading branch information
gozer committed Sep 11, 2018
1 parent ba12401 commit 4e6aeba
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions nubis/files/nubis-ci-build
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,19 @@ if [ "${SKIP_BUILD}" == "true" ]; then
# jenkins gets grumpy if artifacts folder is empty
# so we just add something here
touch "artifacts/SKIP"
exit 0
fi

NUBIS_ARENA=$(nubis-metadata NUBIS_ARENA)
else
NUBIS_ARENA=$(nubis-metadata NUBIS_ARENA)
ORIG_ALLOWED_TCP=$(consul kv get "nat/$NUBIS_ARENA/config/IptablesAllowTCP" 2>/dev/null || echo '[]')

ORIG_ALLOWED_TCP=$(consul kv get "nat/$NUBIS_ARENA/config/IptablesAllowTCP" 2>/dev/null || echo '[]')
# Add port 22 exception
NEW_ALLOWED_TCP=$(echo "$ORIG_ALLOWED_TCP" | jq -c '. |= .+ [22] | unique' )

# Add port 22 exception
NEW_ALLOWED_TCP=$(echo "$ORIG_ALLOWED_TCP" | jq -c '. |= .+ [22] | unique' )
consulate kv set "nat/$NUBIS_ARENA/config/IptablesAllowTCP" "$NEW_ALLOWED_TCP"

consulate kv set "nat/$NUBIS_ARENA/config/IptablesAllowTCP" "$NEW_ALLOWED_TCP"
nubis-ctl --account "$(nubis-metadata NUBIS_ACCOUNT)" --local --skip-aws-vault builder --color build --instance-type c3.large --spot

nubis-ctl --account "$(nubis-metadata NUBIS_ACCOUNT)" --local --skip-aws-vault builder --color build --instance-type c3.large --spot

consulate kv set "nat/$NUBIS_ARENA/config/IptablesAllowTCP" "$ORIG_ALLOWED_TCP"
consulate kv set "nat/$NUBIS_ARENA/config/IptablesAllowTCP" "$ORIG_ALLOWED_TCP"
fi

if [ -d nubis/terraform ]; then
rsync -av nubis/terraform artifacts/nubis/
Expand Down

0 comments on commit 4e6aeba

Please sign in to comment.