Skip to content

Commit d8e65fe

Browse files
authored
Merge pull request #26 from Mixeway/v135FixingScripts
V135 fixing scripts
2 parents a3e7639 + ffaad97 commit d8e65fe

File tree

5 files changed

+14
-221
lines changed

5 files changed

+14
-221
lines changed

MixewayBackend

Submodule MixewayBackend updated 72 files

releasenote.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.3.5 (2020-11-26)
2+
#### Bug Fixes
3+
* Fixing CI Script to fit newest version of MixewayBackend
4+
15
<a name="1.3.4"></a>
26
## 1.3.4 (2020-09-02)
37

scripts/CIScripts/mixeway-ci

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,23 @@ while [ $# -gt 0 ]; do
6666
done
6767
get_commit_id() {
6868
COMMITID=$(git rev-parse HEAD)
69+
group_name=$(git remote get-url origin | xargs basename -s .git)
70+
app_name=$(git remote get-url origin | xargs basename -s .git)
6971
echo "CommitID: $COMMITID"
7072
}
73+
7174
get_repo_url() {
7275
REPO_URL=$(cat .git/config | grep "url = " | sed -E 's/\/\/(.*:.*@)/\/\//g' | gsed -E 's\url = \\g' |xargs)
7376
echo "REPO_URL: $REPO_URL"
7477
}
7578
#CHANGEIT
7679
run_sast() {
80+
BODY='{"scope":"opensource","repoUrl":"'$REPO_URL'","branch":"'$branch'","repoName":"'$app_name'"}'
81+
MIXEWAY_GET_INFO_RESPONSE=$(curl --request POST --url $mixeway_url/v2/api/cicd/getscannerinfo --header 'apikey: '"$mixeway_api_key"'' --header 'content-type: application/json' -d $BODY -k -s)
82+
MIXEWAY_PROJECT_ID=$(echo $MIXEWAY_GET_INFO_RESPONSE | jq '.codeProjectId')
7783
echo "Request for a SAST"
78-
curl -k -s --request PUT --url $mixeway_url/v2/api/cicd/project/$mixeway_project_id/code/scan/$group_name/$app_name/$COMMITID --header 'apikey: '"$mixeway_api_key"'' --output /dev/null
84+
RUN_SCAN_RESPONSE=$(curl -k -s --request GET --url $mixeway_url/v2/api/cicd/sast/performscan/codeproject/$MIXEWAY_PROJECT_ID --header 'apikey: '"$mixeway_api_key"'')
85+
echo $RUN_SCAN_RESPONSE
7986
}
8087
send_bom() {
8188
POSTDATA="{\"project\":\"$OS_ID\",\"bom\":\"$BOM\"}"
@@ -191,8 +198,8 @@ verify() {
191198
}
192199
if [ ! -z "$branch" ] && [ ! -z "$TECH" ] && [ -d .git ]; then
193200
verify_mixeway_data
194-
get_commit_id
195201
get_repo_url
202+
get_commit_id
196203
if [ $skip_sast = "false" ]; then
197204
run_sast
198205
fi

scripts/CIScriptsFortify/mixeway-ci-fortify-mvn

Lines changed: 0 additions & 182 deletions
This file was deleted.

scripts/CIScriptsFortify/readme.md

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)