Skip to content

Commit

Permalink
Merge pull request #15661 from wolfi-dev/version-stream-prometheus-2.51
Browse files Browse the repository at this point in the history
Adding VersionStream for prometheus-2.51
  • Loading branch information
ajayk authored Mar 21, 2024
2 parents 8c60094 + 89bc9b6 commit b78f06e
Show file tree
Hide file tree
Showing 2 changed files with 122 additions and 0 deletions.
116 changes: 116 additions & 0 deletions prometheus-2.51.yaml
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
6 changes: 6 additions & 0 deletions prometheus-2.51/prometheus.confd
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

0 comments on commit b78f06e

Please sign in to comment.