@leverege/build-tools 2.59.0-beta.4 → 2.59.1
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 +8 -5
- package/src/Docker.mjs +133 -14
- package/src/Utils.mjs +7 -1
- package/src/build-cnpg-image.mjs +167 -0
- package/src/circleate.sh +2 -2
- package/src/docker-to-registry.mjs +2 -4
- package/src/generate-docs-conf.json +41 -0
- package/src/generate-docs.mjs +51 -0
- package/src/helm-charts/cnpg-operator/helmup.plugin +7 -7
- package/src/helm-charts/elasticsearch8/helmup.plugin +1 -1
- package/src/helm-charts/prom-operator/helmup.plugin +1 -1
- package/src/helm-charts/redis/helmup.plugin +1 -1
- package/src/helm-charts/velero/helmup.plugin +1 -1
- package/src/helm-charts/velero/velero-local.yaml +4 -0
- package/src/helmup.sh +31 -4
- package/src/k8cryo.sh +0 -20
- package/src/tag-release.mjs +0 -692
- package/src/templates/bashrcTemplate.hbs +0 -46
- package/src/templates/cloudBuildSteps.hbs +0 -13
- package/src/templates/dockerfileTemplate.hbs +0 -86
- /package/src/{cnpg-backup.mjs → snapshot-cnpg.mjs} +0 -0
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
#
|
|
3
|
-
alias h=history
|
|
4
|
-
|
|
5
|
-
alias ls='ls -CF --color=auto'
|
|
6
|
-
alias ll='ls -lh'
|
|
7
|
-
alias lla='ls -lha'
|
|
8
|
-
alias glep='grep -l -s'
|
|
9
|
-
alias m=less
|
|
10
|
-
alias menv='env | sort | less'
|
|
11
|
-
|
|
12
|
-
alias whatsmyip='wget -qO- ifconfig.co'
|
|
13
|
-
|
|
14
|
-
alias err='wget -q -O- localhost:5111/logLevel/error'
|
|
15
|
-
alias wrn='wget -q -O- localhost:5111/logLevel/warn'
|
|
16
|
-
alias inf='wget -q -O- localhost:5111/logLevel/info'
|
|
17
|
-
alias dbg='wget -q -O- localhost:5111/logLevel/debug'
|
|
18
|
-
alias trc='wget -q -O- localhost:5111/logLevel/trace'
|
|
19
|
-
|
|
20
|
-
socks()
|
|
21
|
-
{
|
|
22
|
-
netstat -ant | awk '{print }' | sort | uniq -c | sort -n
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
cmetrics()
|
|
26
|
-
{
|
|
27
|
-
wget -qO- localhost:5111/metrics
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
cmstat()
|
|
31
|
-
{
|
|
32
|
-
wget -qO- localhost:5111
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
cmclear()
|
|
36
|
-
{
|
|
37
|
-
# Future me - thinking this should call cmstat and pass in the endpoint as
|
|
38
|
-
# a parameter? Well don't do it - without escaping the dollar 1 in cmstat
|
|
39
|
-
# the port will end up being 51111, and escaping causes linting to complain
|
|
40
|
-
# about unnecessary escaping.
|
|
41
|
-
wget -qO- localhost:5111/status/clear
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
dunm() {
|
|
45
|
-
du -sh /usr/src/app/node_modules/* | sort -sh
|
|
46
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
steps:
|
|
2
|
-
- name: 'gcr.io/cloud-builders/docker'
|
|
3
|
-
args:
|
|
4
|
-
- 'build'
|
|
5
|
-
- '--network=cloudbuild'
|
|
6
|
-
- '-t'
|
|
7
|
-
- '{{imageName}}:{{imageVersion}}'
|
|
8
|
-
- '--cache-from'
|
|
9
|
-
- '{{imageName}}:{{imageVersion}}'
|
|
10
|
-
- '.'
|
|
11
|
-
|
|
12
|
-
images:
|
|
13
|
-
- '{{imageName}}:{{imageVersion}}'
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
# Version {{regvers}} @ {{date}}
|
|
2
|
-
|
|
3
|
-
# The FROM directive sets the Base Image for subsequent instructions
|
|
4
|
-
FROM {{image}} as intermediate
|
|
5
|
-
|
|
6
|
-
ARG BUILD_ENV="{{buildEnv}}"
|
|
7
|
-
|
|
8
|
-
ENV NODE_ENV production
|
|
9
|
-
ENV NPM_CONFIG_USERCONFIG /usr/src/app/.npmrc
|
|
10
|
-
|
|
11
|
-
RUN mkdir -p /usr/src/app
|
|
12
|
-
WORKDIR /usr/src/app
|
|
13
|
-
|
|
14
|
-
# Install app dependencies
|
|
15
|
-
COPY ./workspace/ /usr/src/app/
|
|
16
|
-
ENV GRPC_VERBOSITY ERROR
|
|
17
|
-
|
|
18
|
-
# --------------------------------------------------------------
|
|
19
|
-
# copy the ssh keys into place, npm install, and remove them
|
|
20
|
-
# --------------------------------------------------------------
|
|
21
|
-
|
|
22
|
-
# Install packages to install private repos with ssh keys
|
|
23
|
-
COPY ./.npmrc ${NPM_CONFIG_USERCONFIG}
|
|
24
|
-
|
|
25
|
-
RUN if [ "${BUILD_ENV}" = "debian" ]; then \
|
|
26
|
-
apt-get update && \
|
|
27
|
-
apt-get install -y openssh-client build-essential && \
|
|
28
|
-
npm install -g npm@10; \
|
|
29
|
-
else \
|
|
30
|
-
apk --no-cache add openssh-client && \
|
|
31
|
-
apk --update add --no-cache --virtual build-dep g++ gcc libgcc libstdc++ linux-headers make {{apkadds}} && \
|
|
32
|
-
npm install -g npm@10; \
|
|
33
|
-
fi
|
|
34
|
-
|
|
35
|
-
# Use SKIP_PREPARE to disable hook-and-release from running
|
|
36
|
-
ENV SKIP_PREPARE=true
|
|
37
|
-
|
|
38
|
-
{{preInstallPluginfile}}
|
|
39
|
-
|
|
40
|
-
# Do the clean install and remove the npm token and ssh keys from the image
|
|
41
|
-
RUN npm ci --only=production --no-optional {{npmlogging}} && \
|
|
42
|
-
rm -f ${NPM_CONFIG_USERCONFIG} /root/.ssh/*
|
|
43
|
-
|
|
44
|
-
# --------------------------------------------------------------
|
|
45
|
-
# Docker Final Stage
|
|
46
|
-
# --------------------------------------------------------------
|
|
47
|
-
|
|
48
|
-
FROM {{image}}
|
|
49
|
-
|
|
50
|
-
ARG BUILD_ENV="{{buildEnv}}"
|
|
51
|
-
|
|
52
|
-
ENV NPM_CONFIG_USERCONFIG /usr/src/app/.npmrc
|
|
53
|
-
|
|
54
|
-
# Copy .npmrc for private registry access for access to any @leverege packages
|
|
55
|
-
COPY ./.npmrc ${NPM_CONFIG_USERCONFIG}
|
|
56
|
-
|
|
57
|
-
# Install tini for PID 1 and replace shell with bash so we can source files
|
|
58
|
-
RUN if [ "$BUILD_ENV" = "debian" ]; then \
|
|
59
|
-
apt-get update && \
|
|
60
|
-
apt-get install -y tini bash curl vim {{apkadds}} && \
|
|
61
|
-
npm install -g npm@10 && \
|
|
62
|
-
rm /bin/sh && ln -s /bin/bash /bin/sh && \
|
|
63
|
-
mkdir -p /usr/src/app /tmp/levlog && chown node:node /usr/src/app; \
|
|
64
|
-
else \
|
|
65
|
-
apk update && \
|
|
66
|
-
apk add --no-cache bash curl tini vim {{apkadds}} && \
|
|
67
|
-
npm install -g npm@10 && \
|
|
68
|
-
rm /bin/sh && ln -s /bin/bash /bin/sh && \
|
|
69
|
-
mkdir -p /usr/src/app /tmp/levlog && chown node:node /usr/src/app; \
|
|
70
|
-
fi
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
# Pull in the Dockerfile.plugin file here
|
|
74
|
-
{{pluginfile}}
|
|
75
|
-
|
|
76
|
-
# Eliminate the sensitive info from the final stage image
|
|
77
|
-
RUN rm -f ${NPM_CONFIG_USERCONFIG}
|
|
78
|
-
|
|
79
|
-
ENTRYPOINT [ "tini", "--" ]
|
|
80
|
-
WORKDIR /usr/src/app
|
|
81
|
-
|
|
82
|
-
COPY --chown=node:node --from=intermediate /usr/src/app /usr/src/app
|
|
83
|
-
|
|
84
|
-
USER {{runuser}}
|
|
85
|
-
COPY ./bashrc /home/node/.bashrc
|
|
86
|
-
CMD [ "/bin/bash", "-c", "source /home/node/.bashrc && node index.js" ]
|
|
File without changes
|