Skip to content

Commit

Permalink
add new versions and fix certificates (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucabello authored Mar 14, 2024
1 parent 91e1ec7 commit d756e72
Show file tree
Hide file tree
Showing 6 changed files with 120 additions and 4 deletions.
2 changes: 1 addition & 1 deletion 2.46.0/rockcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ parts:
opt/prometheus/npm_licenses.tar.bz2: npm_licenses.tar.bz2
ca-certs:
plugin: nil
stage-packages: [ca-certificates]
overlay-packages: [ca-certificates]
deb-security-manifest:
plugin: nil
after:
Expand Down
2 changes: 1 addition & 1 deletion 2.47.2/rockcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ parts:
opt/prometheus/npm_licenses.tar.bz2: npm_licenses.tar.bz2
ca-certs:
plugin: nil
stage-packages: [ca-certificates]
overlay-packages: [ca-certificates]
deb-security-manifest:
plugin: nil
after:
Expand Down
2 changes: 1 addition & 1 deletion 2.48.0/rockcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ parts:
opt/prometheus/npm_licenses.tar.bz2: npm_licenses.tar.bz2
ca-certs:
plugin: nil
stage-packages: [ca-certificates]
overlay-packages: [ca-certificates]
deb-security-manifest:
plugin: nil
after:
Expand Down
2 changes: 1 addition & 1 deletion 2.49.1/rockcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ parts:
opt/prometheus/npm_licenses.tar.bz2: npm_licenses.tar.bz2
ca-certs:
plugin: nil
stage-packages: [ca-certificates]
overlay-packages: [ca-certificates]
deb-security-manifest:
plugin: nil
after:
Expand Down
58 changes: 58 additions & 0 deletions 2.50.0/rockcraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: prometheus
summary: Prometheus in a ROCK.
description: "Prometheus is time-series database for metrics collection and query, driven by either API or a web ui"
version: "2.50.0"
base: ubuntu:22.04
build-base: ubuntu:22.04
license: Apache-2.0
services:
prometheus:
command: /bin/prometheus --config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/prometheus --web.console.libraries=/usr/share/prometheus/console_libraries --web.console.templates=/usr/share/prometheus/consoles
override: replace
startup: enabled
platforms:
amd64:
parts:
prometheus:
plugin: go
source: https://github.com/prometheus/prometheus
source-type: git
source-tag: "v2.50.0"
build-snaps:
- go/1.20/stable
- node/20/stable
build-packages:
- make
override-build: |
make build
install -D -m755 prometheus ${CRAFT_PART_INSTALL}/opt/prometheus/bin/prometheus
install -D -m755 promtool ${CRAFT_PART_INSTALL}/opt/prometheus/bin/promtool
install -D -m644 documentation/examples/prometheus.yml ${CRAFT_PART_INSTALL}/opt/prometheus/etc/prometheus/prometheus.yml
install -D -m644 LICENSE ${CRAFT_PART_INSTALL}/opt/prometheus/LICENSE
install -D -m644 NOTICE ${CRAFT_PART_INSTALL}/opt/prometheus/NOTICE
install -D -m644 npm_licenses.tar.bz2 ${CRAFT_PART_INSTALL}/opt/prometheus/npm_licenses.tar.bz2
mkdir -p ${CRAFT_PART_INSTALL}/opt/prometheus/usr/share/prometheus/console_libraries
mkdir -p ${CRAFT_PART_INSTALL}/opt/prometheus/usr/share/prometheus/consoles
cp -rp console_libraries/ ${CRAFT_PART_INSTALL}/opt/prometheus/usr/share/prometheus/console_libraries
cp -rp consoles/ ${CRAFT_PART_INSTALL}/opt/prometheus/usr/share/prometheus/consoles
organize:
opt/prometheus/bin/prometheus: usr/bin/prometheus
opt/prometheus/bin/promtool: usr/bin/promtool
opt/prometheus/etc/prometheus/prometheus.yml: etc/prometheus/prometheus.yml
opt/prometheus/usr/share/prometheus/console_libraries: usr/share/prometheus/console_libraries
opt/prometheus/usr/share/prometheus/consoles: usr/share/prometheus/consoles
opt/prometheus/LICENSE: LICENSE
opt/prometheus/NOTICE: NOTICE
opt/prometheus/npm_licenses.tar.bz2: npm_licenses.tar.bz2
ca-certs:
plugin: nil
overlay-packages: [ca-certificates]
deb-security-manifest:
plugin: nil
after:
- prometheus
- ca-certs
override-prime: |
set -x
mkdir -p $CRAFT_PRIME/usr/share/rocks/
(echo "# os-release" && cat /etc/os-release && echo "# dpkg-query" && dpkg-query --admindir=$CRAFT_PRIME/var/lib/dpkg/ -f '${db:Status-Abbrev},${binary:Package},${Version},${source:Package},${Source:Version}\n' -W) > $CRAFT_PRIME/usr/share/rocks/dpkg.query
58 changes: 58 additions & 0 deletions 2.50.1/rockcraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: prometheus
summary: Prometheus in a ROCK.
description: "Prometheus is time-series database for metrics collection and query, driven by either API or a web ui"
version: "2.50.1"
base: ubuntu:22.04
build-base: ubuntu:22.04
license: Apache-2.0
services:
prometheus:
command: /bin/prometheus --config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/prometheus --web.console.libraries=/usr/share/prometheus/console_libraries --web.console.templates=/usr/share/prometheus/consoles
override: replace
startup: enabled
platforms:
amd64:
parts:
prometheus:
plugin: go
source: https://github.com/prometheus/prometheus
source-type: git
source-tag: "v2.50.1"
build-snaps:
- go/1.20/stable
- node/20/stable
build-packages:
- make
override-build: |
make build
install -D -m755 prometheus ${CRAFT_PART_INSTALL}/opt/prometheus/bin/prometheus
install -D -m755 promtool ${CRAFT_PART_INSTALL}/opt/prometheus/bin/promtool
install -D -m644 documentation/examples/prometheus.yml ${CRAFT_PART_INSTALL}/opt/prometheus/etc/prometheus/prometheus.yml
install -D -m644 LICENSE ${CRAFT_PART_INSTALL}/opt/prometheus/LICENSE
install -D -m644 NOTICE ${CRAFT_PART_INSTALL}/opt/prometheus/NOTICE
install -D -m644 npm_licenses.tar.bz2 ${CRAFT_PART_INSTALL}/opt/prometheus/npm_licenses.tar.bz2
mkdir -p ${CRAFT_PART_INSTALL}/opt/prometheus/usr/share/prometheus/console_libraries
mkdir -p ${CRAFT_PART_INSTALL}/opt/prometheus/usr/share/prometheus/consoles
cp -rp console_libraries/ ${CRAFT_PART_INSTALL}/opt/prometheus/usr/share/prometheus/console_libraries
cp -rp consoles/ ${CRAFT_PART_INSTALL}/opt/prometheus/usr/share/prometheus/consoles
organize:
opt/prometheus/bin/prometheus: usr/bin/prometheus
opt/prometheus/bin/promtool: usr/bin/promtool
opt/prometheus/etc/prometheus/prometheus.yml: etc/prometheus/prometheus.yml
opt/prometheus/usr/share/prometheus/console_libraries: usr/share/prometheus/console_libraries
opt/prometheus/usr/share/prometheus/consoles: usr/share/prometheus/consoles
opt/prometheus/LICENSE: LICENSE
opt/prometheus/NOTICE: NOTICE
opt/prometheus/npm_licenses.tar.bz2: npm_licenses.tar.bz2
ca-certs:
plugin: nil
overlay-packages: [ca-certificates]
deb-security-manifest:
plugin: nil
after:
- prometheus
- ca-certs
override-prime: |
set -x
mkdir -p $CRAFT_PRIME/usr/share/rocks/
(echo "# os-release" && cat /etc/os-release && echo "# dpkg-query" && dpkg-query --admindir=$CRAFT_PRIME/var/lib/dpkg/ -f '${db:Status-Abbrev},${binary:Package},${Version},${source:Package},${Source:Version}\n' -W) > $CRAFT_PRIME/usr/share/rocks/dpkg.query

0 comments on commit d756e72

Please sign in to comment.