forked from veracode/github-actions-integration
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathveracode-build-java-cli-gradle.yml
More file actions
48 lines (48 loc) · 1.36 KB
/
veracode-build-java-cli-gradle.yml
File metadata and controls
48 lines (48 loc) · 1.36 KB
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
41
42
43
44
45
46
47
48
name: Veracode Build Java Gradle Application
on:
workflow_call:
inputs:
repository:
required: true
type: string
ref:
required: true
type: string
token:
required: true
type: string
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
token: ${{ inputs.token }}
- uses: actions/checkout@v4
with:
path: 'veracode-helper'
- uses: actions/setup-java@v4
with:
java-version: 21
distribution: oracle
- name: Package the application
env:
VERACODE_API_KEY_ID: '${{ secrets.VERACODE_API_ID }}'
VERACODE_API_KEY_SECRET: '${{ secrets.VERACODE_API_KEY }}'
run: |
cd veracode-helper/helper/cli
cliFile=$(ls -1 . | head -n 1)
cliFileName=$(echo "$cliFile" | cut -c 1-$((${#cliFile}-7)))
tar -zxvf $cliFile
cd $cliFileName
chmod +x install.sh
./install.sh system
cd /home/runner/work/veracode/veracode/
veracode package --source . --output veracode-artifacts --trust
zip veracode-artifact.zip veracode-artifacts/* -x .zip .tar .tar.gz .gz
- uses: actions/upload-artifact@v4
with:
name: veracode-artifact
path: veracode-artifact.zip