File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ pipeline {
2
2
agent any
3
3
4
4
environment {
5
- GITHUB_TOKEN = credentials(' PAT ' )
5
+ GITHUB_TOKEN = credentials(' PAT2 ' )
6
6
}
7
7
8
8
stages {
@@ -29,15 +29,17 @@ pipeline {
29
29
30
30
stage(' CodeQL Analysis' ) {
31
31
steps {
32
- sh ''' #!/bin/bash
33
- . venv/bin/activate
34
- echo "Base Ref (Target Branch): $CHANGE_TARGET"
35
- echo "Ref (Source Branch): $CHANGE_BRANCH"
32
+ withCredentials([string(credentialsId : ' PAT2' , variable : ' GITHUB_TOKEN' )]) {
33
+ sh ''' #!/bin/bash
34
+ . venv/bin/activate
35
+ echo "Base Ref (Target Branch): $CHANGE_TARGET"
36
+ echo "Ref (Source Branch): $CHANGE_BRANCH"
36
37
37
- curl -s -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/user
38
+ curl -s -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/user
38
39
39
- codeql-wrapper --verbose analyze ./monorepo --monorepo --upload-sarif --ref $CHANGE_BRANCH --base-ref $CHANGE_TARGET
40
- '''
40
+ codeql-wrapper --verbose analyze ./monorepo --monorepo --upload-sarif --ref $CHANGE_BRANCH --base-ref $CHANGE_TARGET
41
+ '''
42
+ }
41
43
}
42
44
}
43
45
You can’t perform that action at this time.
0 commit comments