-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yaml
40 lines (40 loc) · 1.9 KB
/
action.yaml
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
# action.yaml
name: 'Polar Signals Continuous Profiling'
description: 'Installs Parca to continuously profile your CI/CD pipeline.'
inputs:
polarsignals_cloud_token:
description: 'Polar Signals cloud token.'
required: true
store_address:
description: 'gRPC address to send data to. Defaults to Polar Signals Cloud endpoint.'
required: false
default: 'grpc.polarsignals.com:443'
parca_agent_version:
description: 'Parca agent version.'
required: false
default: '0.35.3'
profiling_frequency:
description: 'The frequency at which profiling data is collected. Parca Agent defaults to 19, but to gather more data in CI we recommend a higher frequency.'
required: false
default: 99
profiling_duration:
description: 'The agent profiling duration to use, cycle to send profiling data.'
required: false
default: '3s'
labels:
description: 'Add labels, for example branch name, branch=main'
required: false
extra_args:
description: 'Add any further arguments to the execution of the agent.'
required: false
runs:
using: 'composite'
steps:
- name: Install Parca Agent
shell: bash
run: |
curl --connect-timeout 5 --max-time 60 --retry 5 --retry-delay 0 --retry-max-time 600 -sL https://github.com/parca-dev/parca-agent/releases/download/v${{ inputs.parca_agent_version }}/parca-agent_${{ inputs.parca_agent_version }}_`uname -s`_`uname -m` > parca-agent
chmod +x ./parca-agent
- name: Run parca agent in background
shell: bash
run: sudo ./parca-agent --metadata-external-labels='${{ inputs.labels }}' --profiling-duration=${{ inputs.profiling_duration }} --profiling-cpu-sampling-frequency=${{ inputs.profiling_frequency }} --node=github --remote-store-address=${{ inputs.store_address }} --remote-store-bearer-token=${{ inputs.polarsignals_cloud_token }} ${{ inputs.extra_args }} > ${{ runner.temp }}/parca-agent.log 2>&1 &