@leverege/build-tools 2.61.3 → 2.61.5
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
package/src/Docker.mjs
CHANGED
|
@@ -203,7 +203,7 @@ const buildContainerImage = async ( {
|
|
|
203
203
|
setPreviousBuild( imageVersion ) // update docker/.previous file
|
|
204
204
|
|
|
205
205
|
const { fullName : builderName } = await getGcpAccount()
|
|
206
|
-
const gcloudBuild = `
|
|
206
|
+
const gcloudBuild = `gcloud builds submit --project ${artifactProject}`
|
|
207
207
|
const gcloudLogs = `--gcs-log-dir ${formCloudBuildBucketName( artifactProject )}/log`
|
|
208
208
|
let gcloudTags = `--tag ${imageName}:${imageVersion}`
|
|
209
209
|
|
package/src/Utils.mjs
CHANGED
|
@@ -54,6 +54,10 @@ export const isString = ( s ) => {
|
|
|
54
54
|
* General "yes" to proceed function.
|
|
55
55
|
*/
|
|
56
56
|
export const proceed = async ( query = 'Do you wish to proceed?' ) => {
|
|
57
|
+
if ( process.env.CICD_PIPELINE === '1' ) {
|
|
58
|
+
log( '\n*** CICD Pipeline - skipping user prompts' )
|
|
59
|
+
return
|
|
60
|
+
}
|
|
57
61
|
await inquirer.prompt( [
|
|
58
62
|
{
|
|
59
63
|
type : 'confirm',
|
|
@@ -399,6 +403,7 @@ export const getRepositoryDescr = async () => {
|
|
|
399
403
|
const currentDir = process.cwd()
|
|
400
404
|
const workingDir = process.env.PWD
|
|
401
405
|
const gitRoot = await getGitRootDirectory()
|
|
406
|
+
const isGitRepo = gitRoot !== undefined
|
|
402
407
|
const gitHooksPath = await getGitHooksPath()
|
|
403
408
|
const { branch : gitBranch, upstream : gitUpstream } = await getGitBranchAndUpstream()
|
|
404
409
|
const subPkgs = await glob( `${gitRoot}/packages/**/package.json`, { ignore : '/**/node_modules/**' } )
|
|
@@ -420,6 +425,7 @@ export const getRepositoryDescr = async () => {
|
|
|
420
425
|
gitRoot,
|
|
421
426
|
gitUpstream,
|
|
422
427
|
helmChart,
|
|
428
|
+
isGitRepo,
|
|
423
429
|
isMonoRepo,
|
|
424
430
|
isNpmWorkspace,
|
|
425
431
|
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
|