Skip to content

Commit

Permalink
Merge pull request #26 from canonical/fix/oci-release
Browse files Browse the repository at this point in the history
fix workflow to release to oci-factory
  • Loading branch information
dstathis committed Aug 14, 2023
2 parents dd3f01d + 09fe035 commit b440fd4
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/rock-release-oci-factory.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ on:
jobs:
build:
uses: canonical/observability/.github/workflows/rock-release-oci-factory.yaml@feature/release-oci-factory
secrets: inherit
with:
rock-name: prometheus
46 changes: 46 additions & 0 deletions 2.43.0/rockcraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
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.43.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.43.0"
build-snaps:
- go/1.19/stable
- node/17/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

0 comments on commit b440fd4

Please sign in to comment.