@leverege/build-tools 2.61.2 → 2.61.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leverege/build-tools",
|
|
3
|
-
"version": "2.61.
|
|
3
|
+
"version": "2.61.4",
|
|
4
4
|
"description": "A collection of build / support tools for Leverege developers",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
"build-cnpg-image": "src/build-cnpg-image.mjs",
|
|
20
20
|
"chart-to-registry": "src/chart-to-registry.mjs",
|
|
21
21
|
"circleate": "src/circleate.sh",
|
|
22
|
-
"cnpg-backup": "src/cnpg-backup.mjs",
|
|
23
22
|
"decrypt-secrets": "src/decrypt-secrets.sh",
|
|
24
23
|
"dirty-git": "src/dirty-git.sh",
|
|
25
24
|
"dockreate": "src/dockreate.sh",
|
|
@@ -53,6 +52,7 @@
|
|
|
53
52
|
"refresh-npm-token": "src/refresh-npm-token.mjs",
|
|
54
53
|
"refresh-py-idx": "src/refresh-py-idx.sh",
|
|
55
54
|
"send-to-slack": "src/send-to-slack.mjs",
|
|
55
|
+
"snapshot-cnpg": "src/snapshot-cnpg.mjs",
|
|
56
56
|
"tag-release": "src/tag-release.mjs",
|
|
57
57
|
"unleash": "src/unleash.mjs"
|
|
58
58
|
},
|
package/src/Utils.mjs
CHANGED
|
@@ -399,6 +399,7 @@ export const getRepositoryDescr = async () => {
|
|
|
399
399
|
const currentDir = process.cwd()
|
|
400
400
|
const workingDir = process.env.PWD
|
|
401
401
|
const gitRoot = await getGitRootDirectory()
|
|
402
|
+
const isGitRepo = gitRoot !== undefined
|
|
402
403
|
const gitHooksPath = await getGitHooksPath()
|
|
403
404
|
const { branch : gitBranch, upstream : gitUpstream } = await getGitBranchAndUpstream()
|
|
404
405
|
const subPkgs = await glob( `${gitRoot}/packages/**/package.json`, { ignore : '/**/node_modules/**' } )
|
|
@@ -420,6 +421,7 @@ export const getRepositoryDescr = async () => {
|
|
|
420
421
|
gitRoot,
|
|
421
422
|
gitUpstream,
|
|
422
423
|
helmChart,
|
|
424
|
+
isGitRepo,
|
|
423
425
|
isMonoRepo,
|
|
424
426
|
isNpmWorkspace,
|
|
425
427
|
rootPackageJson,
|
|
@@ -4,20 +4,23 @@ showInstalling "The Prometheus Operator and Components"
|
|
|
4
4
|
addHelmRepo prometheus-community https://prometheus-community.github.io/helm-charts
|
|
5
5
|
|
|
6
6
|
showInstalling "The Prometheus Operator (kube-prometheus-stack)"
|
|
7
|
-
[ -z "$PROMETHEUS_STACK_CHART_VERSION" ] && PROMETHEUS_STACK_CHART_VERSION="
|
|
7
|
+
[ -z "$PROMETHEUS_STACK_CHART_VERSION" ] && PROMETHEUS_STACK_CHART_VERSION="68"
|
|
8
8
|
|
|
9
9
|
NS="--namespace prometheus"
|
|
10
10
|
|
|
11
|
+
# https://artifacthub.io/packages/helm/prometheus-community/kube-prometheus-stack
|
|
11
12
|
helm upgrade $NS --install prometheus-stack prometheus-community/kube-prometheus-stack \
|
|
12
13
|
--values prom-operator/prometheus-stack.yaml \
|
|
13
14
|
--version $PROMETHEUS_STACK_CHART_VERSION $HELM_WHAT
|
|
14
15
|
|
|
16
|
+
# https://artifacthub.io/packages/helm/prometheus-community/prometheus-elasticsearch-exporter
|
|
15
17
|
showInstalling "The Elasticsearch Exporter (prom-operator)"
|
|
16
18
|
[ -z "$ELASTICSEARCH_EXPORTER_CHART_VERSION" ] && ELASTICSEARCH_EXPORTER_CHART_VERSION="6"
|
|
17
19
|
helm upgrade $NS --install elasticsearch8-exporter prometheus-community/prometheus-elasticsearch-exporter \
|
|
18
20
|
--values prom-operator/elasticsearch-exporter.yaml \
|
|
19
21
|
--version $ELASTICSEARCH_EXPORTER_CHART_VERSION $HELM_WHAT
|
|
20
22
|
|
|
23
|
+
# https://artifacthub.io/packages/helm/prometheus-community/prometheus-stackdriver-exporter
|
|
21
24
|
showInstalling "The Stackdriver Exporter (prom-operator)"
|
|
22
25
|
[ -z "$STACKDRIVER_EXPORTER_CHART_VERSION" ] && STACKDRIVER_EXPORTER_CHART_VERSION="4"
|
|
23
26
|
helm upgrade $NS --install stackdriver-exporter prometheus-community/prometheus-stackdriver-exporter \
|
|
@@ -128,6 +128,15 @@ export default class Config {
|
|
|
128
128
|
|
|
129
129
|
async bootstrapHookAndRelease() {
|
|
130
130
|
const repoDescr = await getRepositoryDescr()
|
|
131
|
+
if ( !repoDescr.isGitRepo ) {
|
|
132
|
+
const notGitRepo = `
|
|
133
|
+
The hook-and-release script only works with git repositories. Try running:
|
|
134
|
+
|
|
135
|
+
git init && hook-and-release --init
|
|
136
|
+
|
|
137
|
+
to initialize git and hook-and-release.`
|
|
138
|
+
errorExit( notGitRepo )
|
|
139
|
+
}
|
|
131
140
|
this.gitRoot = repoDescr.gitRoot
|
|
132
141
|
this.gitBranch = repoDescr.gitBranch
|
|
133
142
|
this.gitHooksPath = repoDescr.gitHooksPath
|
|
@@ -25,11 +25,11 @@ COPY ./.npmrc ${NPM_CONFIG_USERCONFIG}
|
|
|
25
25
|
RUN if [ "${BUILD_ENV}" = "debian" ]; then \
|
|
26
26
|
apt-get update && \
|
|
27
27
|
apt-get install -y wget openssh-client build-essential && \
|
|
28
|
-
npm install -g
|
|
28
|
+
npm install -g {{npmVersion}}; \
|
|
29
29
|
else \
|
|
30
30
|
apk --no-cache add openssh-client && \
|
|
31
31
|
apk --update add --no-cache --virtual build-dep g++ gcc libgcc libstdc++ linux-headers make {{apkadds}} && \
|
|
32
|
-
npm install -g
|
|
32
|
+
npm install -g {{npmVersion}}; \
|
|
33
33
|
fi
|
|
34
34
|
|
|
35
35
|
# Use SKIP_PREPARE to disable hook-and-release from running
|
|
@@ -58,13 +58,13 @@ COPY ./.npmrc ${NPM_CONFIG_USERCONFIG}
|
|
|
58
58
|
RUN if [ "$BUILD_ENV" = "debian" ]; then \
|
|
59
59
|
apt-get update && \
|
|
60
60
|
apt-get install -y tini bash curl vim {{apkadds}} && \
|
|
61
|
-
npm install -g
|
|
61
|
+
npm install -g {{npmVersion}} && \
|
|
62
62
|
rm /bin/sh && ln -s /bin/bash /bin/sh && \
|
|
63
63
|
mkdir -p /usr/src/app /tmp/levlog && chown node:node /usr/src/app; \
|
|
64
64
|
else \
|
|
65
65
|
apk update && \
|
|
66
66
|
apk add --no-cache bash curl tini vim {{apkadds}} && \
|
|
67
|
-
npm install -g
|
|
67
|
+
npm install -g {{npmVersion}} && \
|
|
68
68
|
rm /bin/sh && ln -s /bin/bash /bin/sh && \
|
|
69
69
|
mkdir -p /usr/src/app /tmp/levlog && chown node:node /usr/src/app; \
|
|
70
70
|
fi
|
|
@@ -83,4 +83,4 @@ COPY --chown=node:node --from=intermediate /usr/src/app /usr/src/app
|
|
|
83
83
|
|
|
84
84
|
USER {{runuser}}
|
|
85
85
|
COPY ./bashrc /home/node/.bashrc
|
|
86
|
-
CMD [ "/bin/bash", "-c", "source /home/node/.bashrc && node index.js" ]
|
|
86
|
+
CMD [ "/bin/bash", "-c", "source /home/node/.bashrc && node index.js" ]
|