Skip to content

Commit

Permalink
upgrade image node version, fix server tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andypf committed Oct 5, 2022
1 parent b66b948 commit 3635e47
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM keppel.eu-de-1.cloud.sap/ccloud-dockerhub-mirror/library/node:11.12-alpine
FROM keppel.eu-de-1.cloud.sap/ccloud-dockerhub-mirror/library/node:14-alpine

LABEL source_repository="https://github.com/sapcc/supernova"

Expand Down
12 changes: 6 additions & 6 deletions docker/Dockerfile.test
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
FROM keppel.eu-de-1.cloud.sap/ccloud-dockerhub-mirror/library/node:11.12-alpine
FROM keppel.eu-de-1.cloud.sap/ccloud-dockerhub-mirror/library/node:14-alpine
LABEL source_repository="https://github.com/sapcc/supernova"

RUN apk --no-cache add git ca-certificates bash make nano sudo

RUN apk update && apk upgrade && \
echo @edge http://nl.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories && \
echo @edge http://nl.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories && \
apk add --no-cache \
chromium@edge \
nss@edge
echo @edge http://nl.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories && \
echo @edge http://nl.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories && \
apk add --no-cache \
chromium@edge \
nss@edge

# Tell Puppeteer to skip installing Chrome. We'll be using the installed package.
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
Expand Down
20 changes: 13 additions & 7 deletions server/lib/AlertManagerApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,19 @@ let activeIndex = 0
let activeUrl = endpoints[activeIndex]

const url = (path) => `${activeUrl}/${path}`
const userCert = fs.readFileSync(
process.env.PROMETHEUS_USER_CERT_LOCATION ||
path.join(certFilePath, "sso.crt")
)
const userKey = fs.readFileSync(
process.env.PROMETHEUS_USER_KEY_LOCATION || path.join(certFilePath, "sso.key")
)
let userCert, userKey
try {
userCert = fs.readFileSync(
process.env.PROMETHEUS_USER_CERT_LOCATION ||
path.join(certFilePath, "sso.crt")
)
userKey = fs.readFileSync(
process.env.PROMETHEUS_USER_KEY_LOCATION ||
path.join(certFilePath, "sso.key")
)
} catch (e) {
console.error(e)
}

const alerts = async (params = {}) =>
axios
Expand Down

0 comments on commit 3635e47

Please sign in to comment.