Skip to content

Commit

Permalink
commit id var can be obtained from circleCi or travis
Browse files Browse the repository at this point in the history
  • Loading branch information
rafalparadowski committed Jun 23, 2020
1 parent f3e0a0d commit d8b79e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .cilibs/calculate_code_coverage.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash -e

SEND_COVERITY=$1
COMMIT_ID="${CIRCLE_SHA1:-$TRAVIS_COMMIT}"


echo "Calculate code coverage"
REQUIREDCODECOVERAGE=60
Expand All @@ -13,7 +15,7 @@ then
curl \
--header "Authorization: Token ${SERIESCI_TOKEN}" \
--header "Content-Type: application/json" \
--data "{\"value\":\"${CURRENTCODECOVERAGE} %\",\"sha\":\"${CIRCLE_SHA1}\"}" \
--data "{\"value\":\"${CURRENTCODECOVERAGE} %\",\"sha\":\"${COMMIT_ID}\"}" \
https://seriesci.com/api/codilime/floodgate/coverage/one
else
echo "Skipping"
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ before_script:

script:
- docker pull golang:1.14.1-stretch
- for o in $BUILD_OS; do for a in $BUILD_ARCH; do docker run -u root -w /go/src/github.com/codilime/floodgate -v `pwd`:/go/src/github.com/codilime/floodgate -e SERIESCI_TOKEN=$SERIESCI_TOKEN --entrypoint /go/src/github.com/codilime/floodgate/.cilibs/build.sh --rm golang:1.14.1-stretch -g $GATE_API_BRANCH -o $o -a $a -c $SEND_COVERITY ; done; done
- for o in $BUILD_OS; do for a in $BUILD_ARCH; do docker run -u root -w /go/src/github.com/codilime/floodgate -v `pwd`:/go/src/github.com/codilime/floodgate --entrypoint /go/src/github.com/codilime/floodgate/.cilibs/build.sh --rm golang:1.14.1-stretch -g $GATE_API_BRANCH -o $o -a $a -c $SEND_COVERITY ; done; done
- sudo chown $SUDO_USER:$SUDO_USER -R .
- .cilibs/start_spinnaker.sh -a `echo $BUILD_ARCH | cut -d" " -f1` -o `echo $BUILD_OS | cut -d" " -f1` -g $GATE_API_BRANCH -e $FLOODGATE_EXTRA_PARAMS

0 comments on commit d8b79e0

Please sign in to comment.