@leverege/build-tools 2.3.0 → 2.3.2
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/CHANGELOG.md +4 -0
- package/lib/web/packleate/Packleator.js +1 -1
- package/lib/web/packleate/index.js +1 -1
- package/package.json +1 -1
- package/src/circleate +95 -77
- package/src/helmup +8 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
|
3
3
|
|
|
4
|
+
## [2.3.1] = 2020-05-10
|
|
5
|
+
### Updated
|
|
6
|
+
- (Circleate) Updated support for UI circle config
|
|
7
|
+
|
|
4
8
|
## [2.2.3] = 2020-04-22
|
|
5
9
|
### Updated
|
|
6
10
|
- (Helmify) Added a CLI interface for Helmup
|
|
@@ -80,7 +80,7 @@ var Packleator = /*#__PURE__*/function () {
|
|
|
80
80
|
|
|
81
81
|
var args = options.args;
|
|
82
82
|
this.privatePackages = new Set();
|
|
83
|
-
this.args = args ? _objectSpread(
|
|
83
|
+
this.args = args ? _objectSpread({}, args, {
|
|
84
84
|
output: args.output.substr(-1) === '/' ? args.output.substr(0, args.output.length) : args.output
|
|
85
85
|
}) : {}; // args || {}
|
|
86
86
|
|
package/package.json
CHANGED
package/src/circleate
CHANGED
|
@@ -475,73 +475,66 @@ EOCIRCLE
|
|
|
475
475
|
}
|
|
476
476
|
|
|
477
477
|
create_ui_config(){
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
478
|
+
cat<<FIREBASEINFO
|
|
479
|
+
|
|
480
|
+
You need to setup Firebase hosting using the cli tool before configuring CI.
|
|
481
|
+
Please make sure .firebaserc and firebase.json are configured with targets set like:
|
|
481
482
|
|
|
482
|
-
|
|
483
|
-
|
|
483
|
+
{
|
|
484
|
+
"projects": {
|
|
485
|
+
"default": "leverege-jumpstart"
|
|
486
|
+
},
|
|
487
|
+
"targets": {
|
|
488
|
+
"leverege-jumpstart": {
|
|
489
|
+
"hosting": {
|
|
490
|
+
"unique-target-name": [
|
|
491
|
+
"target-name-on-firebase-console"
|
|
492
|
+
]
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
}
|
|
484
497
|
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
498
|
+
You can add target using:
|
|
499
|
+
|
|
500
|
+
$ firebase target:apply hosting <unique-target-name> <target-name-on-firebase-console>
|
|
501
|
+
|
|
502
|
+
(See https://firebase.google.com/docs/hosting/quickstart for more info)
|
|
503
|
+
|
|
504
|
+
Enter "yes" if everything is set up & ready to go.
|
|
505
|
+
|
|
506
|
+
FIREBASEINFO
|
|
488
507
|
|
|
489
|
-
|
|
490
|
-
|
|
508
|
+
read ANS && [ "$ANS" != "yes" ] && exit 1
|
|
509
|
+
|
|
510
|
+
# Determine dev environment
|
|
511
|
+
printf "\n\nCommits to the dev branch will trigger deployment approval to the dev site.\n"
|
|
512
|
+
printf "\nPlease provide the Firebase Project name to be used for dev/testing UI: "
|
|
513
|
+
read DEV_PROJ
|
|
514
|
+
|
|
515
|
+
printf "\nPlease provide the host target for the dev site (target name in .firebaserc): "
|
|
516
|
+
read DEV_TARGET
|
|
517
|
+
|
|
518
|
+
# Determine prod environment
|
|
519
|
+
printf "\nPlease provide the Firebase Project name to be used for production UI: "
|
|
520
|
+
read PRD_PROJ
|
|
521
|
+
|
|
522
|
+
# Determine GCP project
|
|
523
|
+
printf "\nPlease provide the host target for the production site (target name in .firebaserc): "
|
|
524
|
+
read PRD_TARGET
|
|
491
525
|
|
|
492
526
|
# Build circle config based on variables
|
|
493
527
|
cat<<EOCIRCLE > config.yml
|
|
494
528
|
version: 2.1
|
|
495
529
|
orbs:
|
|
496
|
-
|
|
497
|
-
executors:
|
|
498
|
-
google:
|
|
499
|
-
description: The official Google docker container with gcloud SDK pre-installed
|
|
500
|
-
docker:
|
|
501
|
-
- image: google/cloud-sdk
|
|
530
|
+
slack: circleci/slack@3.4.2
|
|
502
531
|
|
|
503
532
|
jobs:
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
# https://gist.github.com/DarrenN/8c6a5b969481725a4413
|
|
510
|
-
- run: |
|
|
511
|
-
echo "export PACKAGE_VERSION=v\$(grep -m1 version package.json | awk -F: '{ print \$2 }' | sed 's/[", ]//g')" >> \$BASH_ENV
|
|
512
|
-
- gcp-gcr/initialize
|
|
513
|
-
- run: |
|
|
514
|
-
gsutil mb gs://\$PACKAGE_VERSION.$DEV_URL
|
|
515
|
-
gsutil -m cp -r ./project/image/* gs://\$PACKAGE_VERSION.$DEV_URL
|
|
516
|
-
gsutil setmeta -h "Content-Encoding:gzip" gs://\$PACKAGE_VERSION.$DEV_URL/bundle.js
|
|
517
|
-
gsutil iam ch allUsers:objectViewer gs://$DEV_URL
|
|
518
|
-
- run: |
|
|
519
|
-
gsutil mb gs://$DEV_URL
|
|
520
|
-
gsutil -m rm gs://$DEV_URL/**
|
|
521
|
-
gsutil -m cp -r gs://\$PACKAGE_VERSION.$DEV_URL/* gs://$DEV_URL
|
|
522
|
-
gsutil setmeta -h "Content-Encoding:gzip" gs://$DEV_URL/bundle.js
|
|
523
|
-
gsutil iam ch allUsers:objectViewer gs://$DEV_URL
|
|
524
|
-
|
|
525
|
-
gcs-prod:
|
|
526
|
-
executor: google
|
|
527
|
-
steps:
|
|
528
|
-
- attach_workspace:
|
|
529
|
-
at: ~/project
|
|
530
|
-
# https://gist.github.com/DarrenN/8c6a5b969481725a4413
|
|
531
|
-
- run: |
|
|
532
|
-
echo "export PACKAGE_VERSION=v\$(grep -m1 version package.json | awk -F: '{ print \$2 }' | sed 's/[", ]//g')" >> \$BASH_ENV
|
|
533
|
-
- gcp-gcr/initialize
|
|
534
|
-
- run: |
|
|
535
|
-
gsutil mb gs://\$PACKAGE_VERSION.$PROD_URL
|
|
536
|
-
gsutil -m cp -r ./project/image/* gs://\$PACKAGE_VERSION.$PROD_URL
|
|
537
|
-
gsutil setmeta -h "Content-Encoding:gzip" gs://\$PACKAGE_VERSION.$PROD_URL/bundle.js
|
|
538
|
-
gsutil iam ch allUsers:objectViewer gs://$PROD_URL
|
|
539
|
-
- run: |
|
|
540
|
-
gsutil mb gs://$PROD_URL
|
|
541
|
-
gsutil -m rm gs://$PROD_URL/**
|
|
542
|
-
gsutil -m cp -r gs://\$PACKAGE_VERSION.$PROD_URL/* gs://$PROD_URL
|
|
543
|
-
gsutil setmeta -h "Content-Encoding:gzip" gs://$PROD_URL/bundle.js
|
|
544
|
-
gsutil iam ch allUsers:objectViewer gs://$PROD_URL
|
|
533
|
+
status:
|
|
534
|
+
docker:
|
|
535
|
+
- image: cimg/base:2020.01
|
|
536
|
+
steps:
|
|
537
|
+
- slack/status
|
|
545
538
|
|
|
546
539
|
build:
|
|
547
540
|
docker:
|
|
@@ -564,30 +557,40 @@ jobs:
|
|
|
564
557
|
paths:
|
|
565
558
|
- ./node_modules
|
|
566
559
|
|
|
567
|
-
- run:
|
|
568
|
-
name: Install license-checker
|
|
569
|
-
command: npm install license-checker
|
|
570
|
-
|
|
571
|
-
- run:
|
|
572
|
-
name: Check for license violations (e.g. GPL)
|
|
573
|
-
command: npm run licenseCheck
|
|
574
|
-
|
|
575
560
|
- run:
|
|
576
561
|
name: Bundle using webpack
|
|
577
562
|
command: |
|
|
578
563
|
npm run clean
|
|
579
564
|
npm run build
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
cp -fr ./dist/* ./image/
|
|
583
|
-
gzip ./image/bundle.js
|
|
584
|
-
mv ./image/bundle.js.gz ./image/bundle.js
|
|
565
|
+
gzip ./dist/bundle.js
|
|
566
|
+
mv ./dist/bundle.js.gz ./dist/bundle.js
|
|
585
567
|
|
|
586
568
|
- persist_to_workspace:
|
|
587
569
|
root: ~/project
|
|
588
570
|
paths:
|
|
589
|
-
-
|
|
590
|
-
|
|
571
|
+
- dist
|
|
572
|
+
|
|
573
|
+
deploy-dev:
|
|
574
|
+
docker:
|
|
575
|
+
- image: circleci/node:erbium
|
|
576
|
+
steps:
|
|
577
|
+
- attach_workspace:
|
|
578
|
+
at: ~/project
|
|
579
|
+
- run: npm install -g firebase-tools
|
|
580
|
+
- run:
|
|
581
|
+
name: Deploy to dev site
|
|
582
|
+
command: firebase use $DEV_PROJ && firebase deploy --token "\$FIREBASE_TOKEN" --only hosting:$DEV_TARGET
|
|
583
|
+
|
|
584
|
+
deploy-prod:
|
|
585
|
+
docker:
|
|
586
|
+
- image: circleci/node:erbium
|
|
587
|
+
steps:
|
|
588
|
+
- attach_workspace:
|
|
589
|
+
at: ~/project
|
|
590
|
+
- run: npm install -g firebase-tools
|
|
591
|
+
- run:
|
|
592
|
+
name: Deploy to dev site
|
|
593
|
+
command: firebase use $PRD_PROJ && firebase deploy --token "\$FIREBASE_TOKEN" --only hosting:$PRD_TARGET
|
|
591
594
|
|
|
592
595
|
workflows:
|
|
593
596
|
version: 2.1
|
|
@@ -595,13 +598,21 @@ workflows:
|
|
|
595
598
|
jobs:
|
|
596
599
|
- build:
|
|
597
600
|
context: npm
|
|
598
|
-
-
|
|
599
|
-
context:
|
|
601
|
+
- slack/approval-notification:
|
|
602
|
+
context: slack
|
|
603
|
+
- deploy-dev:
|
|
604
|
+
context: firebase
|
|
605
|
+
type: approval
|
|
600
606
|
filters:
|
|
601
607
|
branches:
|
|
602
|
-
only:
|
|
608
|
+
only: development
|
|
603
609
|
requires:
|
|
604
610
|
- build
|
|
611
|
+
- status:
|
|
612
|
+
context: slack
|
|
613
|
+
requires:
|
|
614
|
+
- deploy-dev
|
|
615
|
+
|
|
605
616
|
build-deploy-prod:
|
|
606
617
|
jobs:
|
|
607
618
|
- build:
|
|
@@ -609,13 +620,20 @@ workflows:
|
|
|
609
620
|
filters:
|
|
610
621
|
branches:
|
|
611
622
|
only: master
|
|
612
|
-
-
|
|
613
|
-
context:
|
|
623
|
+
- slack/approval-notification:
|
|
624
|
+
context: slack
|
|
625
|
+
- deploy-prod:
|
|
626
|
+
context: firebase
|
|
627
|
+
type: approval
|
|
614
628
|
filters:
|
|
615
629
|
branches:
|
|
616
630
|
only: master
|
|
617
631
|
requires:
|
|
618
632
|
- build
|
|
633
|
+
- status:
|
|
634
|
+
context: slack
|
|
635
|
+
requires:
|
|
636
|
+
- deploy-prod
|
|
619
637
|
|
|
620
638
|
EOCIRCLE
|
|
621
639
|
}
|
package/src/helmup
CHANGED
|
@@ -21,12 +21,13 @@ PLATFORM=(
|
|
|
21
21
|
SYSTEM=(
|
|
22
22
|
coredns
|
|
23
23
|
elastic
|
|
24
|
-
polaris
|
|
25
24
|
redis
|
|
25
|
+
mysql
|
|
26
|
+
postgres
|
|
26
27
|
velero
|
|
27
28
|
reloader
|
|
28
29
|
tiller
|
|
29
|
-
|
|
30
|
+
monitoring
|
|
30
31
|
# custom-metrics
|
|
31
32
|
)
|
|
32
33
|
|
|
@@ -412,7 +413,7 @@ function doInstall() {
|
|
|
412
413
|
;;
|
|
413
414
|
|
|
414
415
|
"mysql")
|
|
415
|
-
helm
|
|
416
|
+
helm upgrade --install mysql stable/mysql -f mysql/mysql-values.yaml --version 1.6.3
|
|
416
417
|
printf "\n***Proxy 4306 with this => kubectl port-forward svc/mysql 4306:3306\n\n"
|
|
417
418
|
printf "\n***Grab MYSQL Root Password => MYSQL_ROOT_PASSWORD=\$(kubectl get secret --namespace default mysql -o jsonpath="{.data.mysql-root-password}" | base64 --decode; echo)"
|
|
418
419
|
printf "\n***Set MYSQL_HOST to 127.0.0.1 and MYSQL_PORT to 4306 and run => mysql -h \${MYSQL_HOST} -P\${MYSQL_PORT} -u root -p\${MYSQL_ROOT_PASSWORD} \n\n"
|
|
@@ -425,6 +426,10 @@ function doInstall() {
|
|
|
425
426
|
printf "\n***Proxy 8081 with this=> kubectl port-forward --namespace polaris svc/polaris-dashboard 8081:80\n\n"
|
|
426
427
|
;;
|
|
427
428
|
|
|
429
|
+
"postgres"|"postgresql")
|
|
430
|
+
helm repo add bitnami https://charts.bitnami.com/bitnami
|
|
431
|
+
helm upgrade --install postgres bitnami/postgresql -f postgres/postgres-values.yaml --version 8.9.6
|
|
432
|
+
|
|
428
433
|
"redis")
|
|
429
434
|
# https://github.com/helm/charts/tree/master/stable/redis
|
|
430
435
|
[ -z "$REDIS_HELM_CHART" ] && REDIS_HELM_CHART="v9.1.5"
|