diff --git a/prometheus-2.51.yaml b/prometheus-2.51.yaml new file mode 100644 index 00000000000..90d1e3b21f0 --- /dev/null +++ b/prometheus-2.51.yaml @@ -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/protobuf@v1.33.0 + + - 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 diff --git a/prometheus-2.51/prometheus.confd b/prometheus-2.51/prometheus.confd new file mode 100644 index 00000000000..8cf02ffdc1e --- /dev/null +++ b/prometheus-2.51/prometheus.confd @@ -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