|
| 1 | +package: |
| 2 | + name: grafana-pyroscope-1.16 |
| 3 | + version: "1.16.2" |
| 4 | + epoch: 0 # CVE-2025-61729 |
| 5 | + description: Continuous Profiling Platform. Debug performance issues down to a single line of code |
| 6 | + copyright: |
| 7 | + - license: AGPL-3.0-only |
| 8 | + |
| 9 | +environment: |
| 10 | + contents: |
| 11 | + packages: |
| 12 | + - busybox |
| 13 | + - ca-certificates-bundle |
| 14 | + - cairo-dev |
| 15 | + - go |
| 16 | + - node-gyp |
| 17 | + - nodejs-20 |
| 18 | + - pango-dev |
| 19 | + - python3 |
| 20 | + - yarn |
| 21 | + |
| 22 | +pipeline: |
| 23 | + - uses: git-checkout |
| 24 | + with: |
| 25 | + expected-commit: 3f3d87b4629bccbd0b8a9fffa43a3aa03e4c20bf |
| 26 | + repository: https://github.com/grafana/pyroscope |
| 27 | + tag: v${{package.version}} |
| 28 | + |
| 29 | + - runs: | |
| 30 | + # https://github.com/grafana/pyroscope/blob/3da96b8e449de267d4663e14207b8b272f9edc6d/.github/workflows/release.yml#L48C14-L48C33 |
| 31 | + mkdir -p pyroscope/scripts/webpack |
| 32 | + mkdir -p pyroscope/public/app |
| 33 | + mkdir -p pyroscope/public/templates |
| 34 | + cp yarn.lock package.json tsconfig.json ./pyroscope |
| 35 | + cd pyroscope |
| 36 | + yarn --frozen-lockfile |
| 37 | + cp -r ../scripts/webpack ./scripts/ |
| 38 | + cp -r ../public/app ./public/ |
| 39 | + cp -r ../public/templates ./public/ |
| 40 | + yarn build |
| 41 | + cp -r ./public/build ../public/build |
| 42 | +
|
| 43 | + - uses: go/build |
| 44 | + with: |
| 45 | + ldflags: | |
| 46 | + -X github.com/grafana/pyroscope/pkg/util/build.Branch=main |
| 47 | + -X github.com/grafana/pyroscope/pkg/util/build.Version=${{package.version}} |
| 48 | + -X github.com/grafana/pyroscope/pkg/util/build.Revision=$(git rev-parse HEAD) |
| 49 | + -X github.com/grafana/pyroscope/pkg/util/build.BuildDate=$(date -u -d "@${SOURCE_DATE_EPOCH:-$(date +%s)}" "+%Y-%m-%dT%H:%M:%SZ") |
| 50 | + output: pyroscope |
| 51 | + tags: embedassets |
| 52 | + packages: ./cmd/pyroscope |
| 53 | + |
| 54 | + - uses: go/build |
| 55 | + with: |
| 56 | + ldflags: | |
| 57 | + -X github.com/grafana/pyroscope/pkg/util/build.Branch=main |
| 58 | + -X github.com/grafana/pyroscope/pkg/util/build.Version=${{package.version}} |
| 59 | + -X github.com/grafana/pyroscope/pkg/util/build.Revision=$(git rev-parse HEAD) |
| 60 | + -X github.com/grafana/pyroscope/pkg/util/build.BuildDate=$(date -u -d "@${SOURCE_DATE_EPOCH:-$(date +%s)}" "+%Y-%m-%dT%H:%M:%SZ") |
| 61 | + output: profilecli |
| 62 | + packages: ./cmd/profilecli |
| 63 | + |
| 64 | + - runs: | |
| 65 | + mkdir -p "${{targets.contextdir}}"/etc/pyroscope |
| 66 | + install -Dm755 ./cmd/pyroscope/pyroscope.yaml "${{targets.contextdir}}"/etc/pyroscope/config.yaml |
| 67 | +
|
| 68 | +update: |
| 69 | + enabled: true |
| 70 | + github: |
| 71 | + identifier: grafana/pyroscope |
| 72 | + strip-prefix: v |
| 73 | + tag-filter: v1.16. |
| 74 | + |
| 75 | +test: |
| 76 | + environment: |
| 77 | + contents: |
| 78 | + packages: |
| 79 | + - curl |
| 80 | + pipeline: |
| 81 | + - name: "Verify help and version command output" |
| 82 | + runs: | |
| 83 | + profilecli -h |
| 84 | + profilecli --version | grep -i ${{package.version}} |
| 85 | + pyroscope --help |
| 86 | + pyroscope -version | grep -i ${{package.version}} |
| 87 | + - name: "Start and verify Grafana pyroscope" |
| 88 | + uses: test/daemon-check-output |
| 89 | + with: |
| 90 | + start: | |
| 91 | + pyroscope -config.file=/etc/pyroscope/config.yaml |
| 92 | + timeout: 30 |
| 93 | + expected_output: | |
| 94 | + Pyroscope started |
| 95 | + server listening on addresses |
| 96 | + post: | |
| 97 | + # check for the ready endpoint - pyroscope needs ~15s after startup to become ready |
| 98 | + wait-for-it -t 15 --strict localhost:4040 -- echo "Server is up" |
| 99 | +
|
| 100 | + # wait for the service to become fully ready (ingester needs 15s warmup) |
| 101 | + for i in $(seq 1 30); do |
| 102 | + if curl -sf http://localhost:4040/ready; then |
| 103 | + echo "Service is ready" |
| 104 | + break |
| 105 | + fi |
| 106 | + echo "Waiting for ready... attempt $i" |
| 107 | + sleep 1 |
| 108 | + done |
| 109 | +
|
| 110 | + # check for the metrics endpoint |
| 111 | + curl -s http://localhost:4040/metrics | grep -i "pyroscopedb_block_opening_duration_bucket" |
| 112 | +
|
| 113 | + PROFILECLI_URL=http://localhost:4040 profilecli query series --query='{service_name="pyroscope"}' | grep -i "pyroscope" |
| 114 | +
|
| 115 | + # check for the UI endpoint |
| 116 | + curl -L http://localhost:4040/ui | grep -i "Grafana Pyroscope" |
0 commit comments