-
Notifications
You must be signed in to change notification settings - Fork 11
89 lines (83 loc) · 2.6 KB
/
X-Reusable-Build-Security-Agent.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: X - Reusable Build Security Agent
on:
workflow_call:
inputs:
apm-repo:
description: 'The repo of APM source code to use'
required: true
type: string
default: 'k2io/newrelic-java-agent'
apm-source-ref:
description: 'The source-ref of APM source code to use'
required: true
type: string
default: 'csec-dev'
run-unit-test:
description: 'Run instrumentation unit tests ?'
required: true
type: string
default: 'true'
is-release:
description: 'Is this a release run'
required: true
type: string
default: 'false'
version-suffix:
description: 'version suffix to be added, if any'
default: ''
type: string
workflow_dispatch:
inputs:
apm-repo:
description: 'The repo of APM source code to use'
required: true
type: string
default: 'k2io/newrelic-java-agent'
apm-source-ref:
description: 'The source-ref of APM source code to use'
required: true
type: string
default: 'csec-dev'
run-unit-test:
description: 'Run instrumentation unit tests ?'
required: true
type: string
default: 'true'
is-release:
description: 'Is this a release run'
required: true
type: string
default: 'false'
version-suffix:
description: 'version suffix to be added, if any'
default: ''
type: string
jobs:
# this job reads the directories in csec-java-agent/instrumentation-security and creates a JSON with the list of the modules
# this list is paginated and will be used in the verify-module job.
build-agent:
runs-on: ubuntu-20.04
strategy:
matrix:
java-version: [ 8 ]
# java-version: [ 8, 11, 17 ]
steps:
- name: Checkout CSEC Repo
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
- name: Setup environment
uses: ./.github/actions/setup-environment
with:
apm-repo: ${{ inputs.apm-repo }}
apm-branch: ${{ inputs.apm-source-ref }}
apm-aws-access-key-id: ${{ secrets.APM_AWS_ACCESS_KEY_ID }}
apm-aws-secret-access-key: ${{ secrets.APM_AWS_SECRET_ACCESS_KEY }}
apm-aws-region: us-east-2
- name: Publish CSEC to local
uses: ./.github/actions/publish-csec-local
- name: Run CSEC unit tests
if: ${{ inputs.run-unit-test == 'true' }}
uses: ./.github/actions/unit-test
with:
java-version: ${{ matrix.java-version }}