Merge ~ballot/prometheus-snap/+git/prometheus-snap:update_2.28.1 into prometheus-snap:prometheus2

Proposed by Benjamin Allot
Status: Approved
Approved by: Benjamin Allot
Approved revision: 9ece71a61ec367bebbf87ac75a99ede0c12d1202
Proposed branch: ~ballot/prometheus-snap/+git/prometheus-snap:update_2.28.1
Merge into: prometheus-snap:prometheus2
Diff against target: 61 lines (+37/-5)
1 file modified
snapcraft.yaml (+37/-5)
Reviewer Review Type Date Requested Status
Junien F Approve
Review via email: mp+407916@code.launchpad.net

Commit message

Update prometheus to 2.28.1 and nodejs to v14.17.3

To post a comment you must log in.
Revision history for this message
Junien F (axino) wrote :

+1

review: Approve

Unmerged commits

9ece71a... by Benjamin Allot

Use nodejs binary archive for ppc64el and s390x architecture

ef0964c... by Benjamin Allot

Update prometheus to 2.28.1

cbea008... by Benjamin Allot

npm package not part of "nodejs" on s390x and ppc64el

1bc789d... by Benjamin Allot

Update prometheus to 2.28.0

* Updated golang to 1.16
* Using latest nodejs LTS version instead of the default provided by
  core20

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/snapcraft.yaml b/snapcraft.yaml
2index 908dcc3..d22801c 100644
3--- a/snapcraft.yaml
4+++ b/snapcraft.yaml
5@@ -1,6 +1,6 @@
6 name: prometheus
7-version: 2.20.1
8-base: core18
9+version: 2.28.1
10+base: core20
11 grade: stable
12 summary: The Prometheus monitoring system and time series database
13 description: |
14@@ -30,12 +30,44 @@ plugs:
15 parts:
16 prometheus:
17 plugin: go
18- go-channel: 1.14/stable
19+ go-channel: 1.16/stable
20 source: https://github.com/prometheus/prometheus.git
21 source-tag: v${SNAPCRAFT_PROJECT_VERSION}
22- go-importpath: github.com/prometheus/prometheus
23- build-packages: [build-essential, curl, make, npm]
24+ build-packages:
25+ - build-essential
26+ - curl
27+ - gnupg
28+ - lsb-release
29+ - software-properties-common
30 override-build: |
31+ # This needs a node >= 12.0 and node package is 10.0.19
32+ # Manually configuring the debian package from nodesource for nodejs LTS release
33+ # Not using their "curl xxx | sudo bash -"
34+ # See https://deb.nodesource.com/setup_14.x
35+ # However, for s390x and ppc64el, we don't have packages there, so we need to use the binary archive
36+ NODE_ENV="production"
37+ SERIES="$(lsb_release --codename --short)"
38+ NODEREPO="node_14.x"
39+ NODE_ARCH="${SNAP_ARCH}"
40+ if [ "${SNAP_ARCH}" = "ppc64el" -o "${SNAP_ARCH}" = "s390x" ]; then \
41+ NODE_VERSION=v14.17.3; \
42+ #ppc64el is called ppc64le on node site
43+ if [ "${SNAP_ARCH}" = "ppc64el" ]; then NODE_ARCH="ppc64le"; fi
44+ NODE_FILE="node-${NODE_VERSION}-linux-${NODE_ARCH}.tar.xz"
45+ curl -o /tmp/${NODE_FILE} https://nodejs.org/dist/${NODE_VERSION}/${NODE_FILE}; \
46+ curl -o /tmp/SHASUMS256.txt https://nodejs.org/dist/${NODE_VERSION}/SHASUMS256.txt; \
47+ cd /tmp; if ! sha256sum -c --ignore-missing SHASUMS256.txt; then echo "Wrong checksum"; exit 1; fi; cd -; \
48+ mkdir /opt/nodejs; \
49+ tar -xJvf /tmp/${NODE_FILE} -C /opt/nodejs; \
50+ export PATH="/opt/nodejs/node-${NODE_VERSION}-linux-${NODE_ARCH}/bin:$PATH"; \
51+ else \
52+ PKGS=(nodejs); \
53+ curl https://deb.nodesource.com/gpgkey/nodesource.gpg.key > /tmp/nodesource.key
54+ apt-key add /tmp/nodesource.key
55+ add-apt-repository --yes --update "deb https://deb.nodesource.com/${NODEREPO} ${SERIES} main"
56+ DEBIAN_FRONTEND=noninteractive apt-get install --quiet --yes "${PKGS[@]}"; \
57+ fi
58+ set -x
59 npm install yarn -g
60 make common-test-short
61 make build

Subscribers

People subscribed via source and target branches