-
Notifications
You must be signed in to change notification settings - Fork 1
/
action.yml
40 lines (35 loc) · 1.59 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
apiVersion: automation.cloudbees.io/v1alpha1
kind: action
name: nexusiq-sast-scan
inputs:
server-url:
required: true
username:
required: true
password:
required: true
org-id:
required: true
language:
required: false
runs:
using: composite
steps:
- id: run-orchestrator
name: nexusiq
uses: docker://public.ecr.aws/l7o7z1g8/actions/nexusiq-actions:main-f9078838c0c61bf32f391fcbe77169fb68e69b34
shell: bash
env:
CONFIG_JSON: '{\"metaInfo\":{\"url\":\"${{ inputs.server-url }}\",\"username\":\"${{ inputs.username }}\",\"password\":\"${{ inputs.password }}\",\"client_secret\":\"${{ inputs.org-id }}\",\"toolName\":\"nexusiq\"},\"orchestratorInfo\":{\"assetType\":\"CODE\",\"assetIdentifier\":\"${{ cloudbees.scm.repositoryUrl }}\",\"profileIdentifier\":\"${{ cloudbees.scm.branch }}\",\"language\":\"${{ inputs.language }}\"},\"metaInformation\":{\"actor\":\"SCM-Bot\",\"commit_id\":\"${{ cloudbees.scm.sha }}\",\"tenent_info\":\"NA\",\"scanner_type\":\"SAST\"}}'
RUN_ID: ${{ cloudbees.run_id }}
STEP_ID: ${{ step.internal.id }}
JOB_ID: ${{ job.id }}
DNS_URL: ${{ cloudbees.api.url }}
JWT_TOKEN: ${{ cloudbees.api.token }}
run: |
set -x
echo "RUN ID: ${{ cloudbees.run_id }}"
echo "Job ID: ${{ job.id }}"
echo "Step ID: ${{ step.internal.id }}"
cd /app/
/bin/bash -c "java -jar /app/nexus-iq-server.jar & while ! nc -z localhost 5001; do sleep 1; done && /app/orchestrator -scanConfig \"${CONFIG_JSON}\" execute-analyser && exit"