File tree Expand file tree Collapse file tree 3 files changed +29
-1
lines changed Expand file tree Collapse file tree 3 files changed +29
-1
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- docker build -t golang-demo .
3
+ docker build -t golang-demo .
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ export PATH=" $PATH :/Users/dhamukrish/Documents/digidhamu/k8s.do.digidhamu.com/tools/sonar-scanner-4.2.0.1873-macosx/bin"
4
+
5
+ sonar-scanner
6
+
7
+ echo " Checking if analysis is finished.."
8
+
9
+ SONAR_PROJECT_KEY=golang-daas-demo
10
+ SONAR_STATUS_URL=$( cat .scannerwork/report-task.txt | grep ceTaskUrl | sed -e ' s/ceTaskUrl=//' )
11
+ SONAR_STATUS=$( curl -skg " ${SONAR_STATUS_URL} " | sed -e ' s/.*status":"//' | sed -e ' s/",.*//' )
12
+
13
+ while ! [ " ${SONAR_STATUS} " = " SUCCESS" ] || [ " ${SONAR_STATUS} " = " CANCELED" ] || [ " ${SONAR_STATUS} " = " FAILED" ];
14
+ do
15
+ echo " Sonar analysis is: ${SONAR_STATUS} . Taking a nap while we wait..."
16
+ sleep 5
17
+ SONAR_STATUS=$( curl -skg ${SONAR_STATUS_URL} | sed -e ' s/.*status":"//' | sed -e ' s/",.*//' )
18
+ done
19
+
20
+ echo " Sonar Task returned: ${SONAR_STATUS} "
21
+
22
+ if [ " ${SONAR_STATUS} " = " FAILED" ]; then
23
+ exit -1
24
+ fi
25
+
26
+ exit 0
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ export GOPATH=$HOME /Documents/digidhamu/go
4
+
3
5
go test -coverprofile=coverage.out
You can’t perform that action at this time.
0 commit comments