-
Notifications
You must be signed in to change notification settings - Fork 278
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15661 from wolfi-dev/version-stream-prometheus-2.51
Adding VersionStream for prometheus-2.51
- Loading branch information
Showing
2 changed files
with
122 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
package: | ||
name: prometheus-2.51 | ||
version: 2.51.0 | ||
epoch: 0 | ||
description: The Prometheus monitoring system and time series database. | ||
copyright: | ||
- license: Apache-2.0 | ||
dependencies: | ||
provides: | ||
- prometheus=${{package.full-version}} | ||
- prometheus-lts=${{package.full-version}} | ||
|
||
environment: | ||
contents: | ||
packages: | ||
- bash | ||
- busybox | ||
- ca-certificates-bundle | ||
- go | ||
- nodejs | ||
|
||
pipeline: | ||
- uses: git-checkout | ||
with: | ||
expected-commit: c05c15512acb675e3f6cd662a6727854e93fc024 | ||
repository: https://github.com/prometheus/prometheus | ||
tag: v${{package.version}} | ||
|
||
- uses: go/bump | ||
with: | ||
deps: google.golang.org/[email protected] | ||
|
||
- runs: | | ||
GOLDFLAGS="-s -w -X github.com/prometheus/common/version.Version=${{package.version}} | ||
-X github.com/prometheus/common/version.Revision=WolfiLinux | ||
-X github.com/prometheus/common/version.Branch=master | ||
-X github.com/prometheus/common/version.BuildUser=$USER@$HOSTNAME | ||
-X github.com/prometheus/common/version.BuildDate=$(date -u "+%Y%m%d-%H:%M:%S" ${SOURCE_DATE_EPOCH:+-d @$SOURCE_DATE_EPOCH}) | ||
" | ||
if [ -n "$LDFLAGS" ]; then | ||
# LDFLAGS (and only LDFLAGS) should be passed to -extldflags. | ||
GOLDFLAGS="$GOLDFLAGS -extldflags '$LDFLAGS'" | ||
fi | ||
# set -j1 to run things in the correct order in makefile | ||
# actual go building is still parallel | ||
make -j1 assets-compress | ||
go build \ | ||
-trimpath \ | ||
-mod=readonly \ | ||
-ldflags "$GOLDFLAGS" \ | ||
-tags netgo,builtinassets \ | ||
./cmd/prometheus | ||
go build \ | ||
-trimpath \ | ||
-mod=readonly \ | ||
-ldflags "$GOLDFLAGS" \ | ||
./cmd/promtool | ||
- runs: | | ||
install -Dm755 prometheus "${{targets.destdir}}"/usr/bin/prometheus | ||
install -Dm755 promtool "${{targets.destdir}}"/usr/bin/promtool | ||
install -Dm644 prometheus.confd \ | ||
"${{targets.destdir}}"/etc/conf.d/prometheus | ||
install -dm644 "${{targets.destdir}}"/var/lib/prometheus/data | ||
install -Dm644 -t "${{targets.destdir}}"/etc/prometheus \ | ||
documentation/examples/prometheus.yml | ||
mkdir -p "${{targets.destdir}}"/etc/prometheus/console_libraries | ||
for file in console_libraries/* | ||
do | ||
install -Dm644 -t "${{targets.destdir}}"/etc/prometheus/console_libraries/ "$file" | ||
done | ||
mkdir -p "${{targets.destdir}}"/etc/prometheus/consoles | ||
for file in consoles/* | ||
do | ||
install -Dm644 -t "${{targets.destdir}}"/etc/prometheus/consoles/ "$file" | ||
done | ||
- uses: strip | ||
|
||
subpackages: | ||
- name: ${{package.name}}-bitnami-compat | ||
dependencies: | ||
provides: | ||
- prometheus-bitnami-compat=${{package.full-version}} | ||
description: "compat package with bitnami/prometheus image" | ||
pipeline: | ||
- uses: bitnami/compat | ||
with: | ||
image: prometheus | ||
version-path: 2/debian-12 | ||
- runs: | | ||
mkdir -p ${{targets.subpkgdir}}/opt/bitnami/prometheus/bin/ | ||
mkdir -p ${{targets.subpkgdir}}/opt/bitnami/prometheus/conf | ||
chmod g+rwX ${{targets.subpkgdir}}/opt/bitnami | ||
cp ${{targets.destdir}}/usr/bin/prometheus ${{targets.subpkgdir}}/opt/bitnami/prometheus/bin/prometheus | ||
cp ${{targets.destdir}}/usr/bin/promtool ${{targets.subpkgdir}}/opt/bitnami/prometheus/bin/promtool | ||
cp -r ${{targets.destdir}}/etc/prometheus/* ${{targets.subpkgdir}}/opt/bitnami/prometheus/conf/ | ||
cp -r ${{targets.destdir}}/var/lib/prometheus/data ${{targets.subpkgdir}}/opt/bitnami/prometheus/data | ||
update: | ||
ignore-regex-patterns: | ||
- '\+stringlabels' # looks like stringlabels are still experimental, let's stick to the main version stream. | ||
enabled: true | ||
github: | ||
identifier: prometheus/prometheus | ||
strip-prefix: v | ||
tag-filter-prefix: v2.51 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
prometheus_config_file=/etc/prometheus/prometheus.yml | ||
prometheus_storage_path=/var/lib/prometheus/data | ||
prometheus_retention_time=15d | ||
|
||
output_log=/var/log/prometheus.log | ||
error_log=/var/log/prometheus.log |