indraq_cli 2.4.0 → 2.6.0
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_v2.5.0.md +67 -0
- package/CHANGELOG_v2.6.0.md +9 -0
- package/LICENSE +21 -21
- package/README.md +422 -605
- package/RELEASE_CHECKS_v2.5.0.md +93 -0
- package/TEST_RESULTS_v2.5.0.txt +46 -0
- package/TEST_RESULTS_v2.6.0.txt +16 -0
- package/cloud-api/.dockerignore +18 -18
- package/cloud-api/.env.example +14 -14
- package/cloud-api/.indraq/project.json +4 -0
- package/cloud-api/Dockerfile +19 -19
- package/cloud-api/README.md +3 -3
- package/cloud-api/dist/index.js +57 -7
- package/cloud-api/dist/index.js.map +1 -0
- package/cloud-api/package.json +1 -1
- package/cloud-api/sql/001_init.sql +8 -8
- package/cloud-api/sql/002_user_providers_and_project_resources.sql +40 -40
- package/cloud-api/sql/003_environment_infrastructure.sql +19 -19
- package/cloud-api/sql/004_managed_aws_credentials.sql +20 -20
- package/cloud-api/sql/005_project_members_and_resource_grants.sql +22 -22
- package/cloud-api/sql/006_catalog_identity_password_security.sql +96 -96
- package/cloud-api/sql/007_aws_access_key_rotation.sql +16 -16
- package/cloud-api/sql/008_provider_scopes.sql +91 -91
- package/cloud-api/src/index.ts +50 -6
- package/cloud-api/tsconfig.json +18 -18
- package/dist/cli/doctor.command.js +1 -1
- package/dist/cli/doctor.command.js.map +1 -1
- package/dist/cli/help-content.d.ts.map +1 -1
- package/dist/cli/help-content.js +19 -18
- package/dist/cli/help-content.js.map +1 -1
- package/dist/modules/access/commands/access.command.js +34 -34
- package/dist/modules/access/commands/access.command.js.map +1 -1
- package/dist/modules/aws/commands/dns.command.d.ts.map +1 -1
- package/dist/modules/aws/commands/dns.command.js +3 -2
- package/dist/modules/aws/commands/dns.command.js.map +1 -1
- package/dist/modules/cloud/commands/cloud.command.d.ts +3 -0
- package/dist/modules/cloud/commands/cloud.command.d.ts.map +1 -1
- package/dist/modules/cloud/commands/cloud.command.js +121 -34
- package/dist/modules/cloud/commands/cloud.command.js.map +1 -1
- package/dist/modules/cloud/commands/environment.command.js +1 -1
- package/dist/modules/cloud/commands/environment.command.js.map +1 -1
- package/dist/modules/cloud/commands/provider.command.js +1 -1
- package/dist/modules/cloud/commands/provider.command.js.map +1 -1
- package/dist/modules/cloud/index.js +2 -2
- package/dist/modules/cloud/index.js.map +1 -1
- package/dist/modules/cloud/services/cloud-aws.service.d.ts +1 -1
- package/dist/modules/cloud/services/cloud-aws.service.d.ts.map +1 -1
- package/dist/modules/cloud/services/cloud-aws.service.js +2 -2
- package/dist/modules/cloud/services/cloud-aws.service.js.map +1 -1
- package/dist/modules/cloud/services/cloud-ghcr.service.js +2 -2
- package/dist/modules/cloud/services/cloud-ghcr.service.js.map +1 -1
- package/dist/modules/cloud/services/cloud-jenkins.service.d.ts +1 -1
- package/dist/modules/cloud/services/cloud-jenkins.service.d.ts.map +1 -1
- package/dist/modules/cloud/services/cloud-jenkins.service.js +157 -33
- package/dist/modules/cloud/services/cloud-jenkins.service.js.map +1 -1
- package/dist/modules/cloud/services/cloud-npm.service.d.ts +1 -1
- package/dist/modules/cloud/services/cloud-npm.service.d.ts.map +1 -1
- package/dist/modules/cloud/services/cloud-npm.service.js +2 -2
- package/dist/modules/cloud/services/cloud-npm.service.js.map +1 -1
- package/dist/modules/cloud/services/project-cleanup.service.d.ts +24 -0
- package/dist/modules/cloud/services/project-cleanup.service.d.ts.map +1 -0
- package/dist/modules/cloud/services/project-cleanup.service.js +141 -0
- package/dist/modules/cloud/services/project-cleanup.service.js.map +1 -0
- package/dist/modules/cloud/services/user-provider.service.d.ts +1 -1
- package/dist/modules/cloud/services/user-provider.service.d.ts.map +1 -1
- package/dist/modules/cloud/services/user-provider.service.js +3 -3
- package/dist/modules/cloud/services/user-provider.service.js.map +1 -1
- package/dist/modules/configure/configure.command.js +6 -4
- package/dist/modules/configure/configure.command.js.map +1 -1
- package/dist/modules/deploy/commands/build.command.d.ts.map +1 -1
- package/dist/modules/deploy/commands/build.command.js +23 -12
- package/dist/modules/deploy/commands/build.command.js.map +1 -1
- package/dist/modules/deploy/commands/configure-docker.command.js +6 -6
- package/dist/modules/deploy/commands/configure-docker.command.js.map +1 -1
- package/dist/modules/deploy/config/docker-config.js +1 -1
- package/dist/modules/deploy/config/docker-config.js.map +1 -1
- package/dist/modules/deploy/index.js +1 -1
- package/dist/modules/deploy/index.js.map +1 -1
- package/dist/modules/deploy/services/docker.service.js +1 -1
- package/dist/modules/deploy/services/docker.service.js.map +1 -1
- package/dist/modules/dockerfile/services/project-docker.service.d.ts +9 -0
- package/dist/modules/dockerfile/services/project-docker.service.d.ts.map +1 -0
- package/dist/modules/dockerfile/services/project-docker.service.js +122 -0
- package/dist/modules/dockerfile/services/project-docker.service.js.map +1 -0
- package/dist/modules/jenkins/commands/create-deployment.command.js +4 -4
- package/dist/modules/jenkins/commands/create-deployment.command.js.map +1 -1
- package/dist/modules/jenkins/index.js +1 -1
- package/dist/modules/jenkins/index.js.map +1 -1
- package/dist/modules/mobile/commands/mobile-environment.command.js +1 -1
- package/dist/modules/mobile/commands/mobile-environment.command.js.map +1 -1
- package/dist/modules/mobile/commands/mobile-prebuild.command.js +1 -1
- package/dist/modules/mobile/commands/mobile-prebuild.command.js.map +1 -1
- package/dist/modules/mobile/commands/ota.command.js +3 -3
- package/dist/modules/mobile/commands/ota.command.js.map +1 -1
- package/dist/modules/mobile/index.d.ts.map +1 -1
- package/dist/modules/mobile/index.js +8 -7
- package/dist/modules/mobile/index.js.map +1 -1
- package/dist/modules/mobile/services/mobile-project-directory.d.ts +3 -0
- package/dist/modules/mobile/services/mobile-project-directory.d.ts.map +1 -0
- package/dist/modules/mobile/services/mobile-project-directory.js +31 -0
- package/dist/modules/mobile/services/mobile-project-directory.js.map +1 -0
- package/dist/modules/mobile/services/ota-setup.service.d.ts.map +1 -1
- package/dist/modules/mobile/services/ota-setup.service.js +5 -3
- package/dist/modules/mobile/services/ota-setup.service.js.map +1 -1
- package/dist/modules/prebuild/commands/prebuild.command.d.ts +4 -0
- package/dist/modules/prebuild/commands/prebuild.command.d.ts.map +1 -1
- package/dist/modules/prebuild/commands/prebuild.command.js +155 -100
- package/dist/modules/prebuild/commands/prebuild.command.js.map +1 -1
- package/dist/modules/prebuild/index.js +2 -2
- package/dist/modules/prebuild/index.js.map +1 -1
- package/dist/modules/prebuild/setup-plan.d.ts +11 -0
- package/dist/modules/prebuild/setup-plan.d.ts.map +1 -0
- package/dist/modules/prebuild/setup-plan.js +58 -0
- package/dist/modules/prebuild/setup-plan.js.map +1 -0
- package/dist/modules/proxy/services/npm-api.service.d.ts +1 -0
- package/dist/modules/proxy/services/npm-api.service.d.ts.map +1 -1
- package/dist/modules/proxy/services/npm-api.service.js +1 -0
- package/dist/modules/proxy/services/npm-api.service.js.map +1 -1
- package/dist/modules/scaffold/commands/init.command.d.ts.map +1 -1
- package/dist/modules/scaffold/commands/init.command.js +33 -18
- package/dist/modules/scaffold/commands/init.command.js.map +1 -1
- package/dist/modules/scaffold/types.d.ts +3 -1
- package/dist/modules/scaffold/types.d.ts.map +1 -1
- package/dist/modules/scopes/commands/scope.command.d.ts +3 -1
- package/dist/modules/scopes/commands/scope.command.d.ts.map +1 -1
- package/dist/modules/scopes/commands/scope.command.js +15 -8
- package/dist/modules/scopes/commands/scope.command.js.map +1 -1
- package/dist/modules/scopes/index.js +1 -1
- package/dist/modules/scopes/index.js.map +1 -1
- package/dist/modules/scopes/services/scope-native.service.d.ts.map +1 -1
- package/dist/modules/scopes/services/scope-native.service.js +16 -5
- package/dist/modules/scopes/services/scope-native.service.js.map +1 -1
- package/dist/modules/setup/commands/setup.command.d.ts.map +1 -1
- package/dist/modules/setup/commands/setup.command.js +41 -24
- package/dist/modules/setup/commands/setup.command.js.map +1 -1
- package/dist/modules/users/commands/user.command.d.ts.map +1 -1
- package/dist/modules/users/commands/user.command.js +10 -2
- package/dist/modules/users/commands/user.command.js.map +1 -1
- package/dist/modules/users/providers/jenkins-user.provider.js +95 -95
- package/dist/modules/users/providers/npm-user.provider.d.ts.map +1 -1
- package/dist/modules/users/providers/npm-user.provider.js +31 -2
- package/dist/modules/users/providers/npm-user.provider.js.map +1 -1
- package/dist/shared/config/config-files.js +7 -7
- package/dist/shared/jenkins/role-strategy-groovy.js +84 -84
- package/dist/shared/process/run-npx.d.ts +4 -0
- package/dist/shared/process/run-npx.d.ts.map +1 -0
- package/dist/shared/process/run-npx.js +31 -0
- package/dist/shared/process/run-npx.js.map +1 -0
- package/docs/ARCHITECTURE.md +7 -7
- package/docs/CREATE-DEPLOYMENT-reference.groovy +8 -8
- package/docs/README_v2.6.0_DETAILED.md +1021 -0
- package/package.json +12 -5
- package/templates/jenkins/CREATE-DEPLOYMENT.groovy +8 -8
- package/templates/jenkins/Jenkinsfile-Mobile-App +759 -759
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -16,7 +16,7 @@ Supported presets include:
|
|
|
16
16
|
- user frontend + admin frontend + backend (`multiweb`)
|
|
17
17
|
- mobile
|
|
18
18
|
|
|
19
|
-
Each web component has its own path, framework, image name, ports and health endpoint.
|
|
19
|
+
Each web component has its own path, framework, image name, ports and health endpoint. GitHub Packages/Jenkins resources are keyed by component and environment.
|
|
20
20
|
|
|
21
21
|
## Deployment topology — where it runs
|
|
22
22
|
|
|
@@ -32,7 +32,7 @@ The Jenkins stage is explicit so a production backup named `backup-server` canno
|
|
|
32
32
|
|
|
33
33
|
## Provider scopes and credentials
|
|
34
34
|
|
|
35
|
-
AWS, NPM, Jenkins and
|
|
35
|
+
AWS, NPM, Jenkins and GitHub Packages are organization provider scopes. Users see/use only assigned scopes. Their native/provider credentials are resolved only when required and are not copied into project folders.
|
|
36
36
|
|
|
37
37
|
A project can bind different provider scopes for each environment. This allows the same component/pipeline name to exist on Jenkins A for the primary server and Jenkins B for the backup server, with separate NPM instances as well.
|
|
38
38
|
|
|
@@ -51,9 +51,9 @@ Route53 PRIMARY/SECONDARY remains a DNS-resource decision. Project topology prim
|
|
|
51
51
|
For one or more selected components, IndraQ:
|
|
52
52
|
|
|
53
53
|
1. builds the component image once
|
|
54
|
-
2. pushes the selected tag(s) once to
|
|
54
|
+
2. pushes the selected tag(s) once to GitHub Packages
|
|
55
55
|
3. resolves the immutable image digest
|
|
56
|
-
4. verifies all selected environments point at the same logical
|
|
56
|
+
4. verifies all selected environments point at the same logical GitHub Packages image
|
|
57
57
|
5. triggers each environment's own Jenkins controller sequentially with the same tag + digest
|
|
58
58
|
6. stops on the first failed target and reports that environment
|
|
59
59
|
|
|
@@ -61,15 +61,15 @@ This prevents primary/backup servers from receiving different image bytes during
|
|
|
61
61
|
|
|
62
62
|
## Project resources
|
|
63
63
|
|
|
64
|
-
Projects keep intent and external-resource associations, including
|
|
64
|
+
Projects keep intent and external-resource associations, including GitHub Packages image repositories, Jenkins jobs, Route53 routing/health checks, and NPM proxy hosts. Project membership controls who can discover/re-link a project. Resource grants record access to individual AWS, NPM, and Jenkins resources and are audited.
|
|
65
65
|
|
|
66
66
|
## Prebuild
|
|
67
67
|
|
|
68
|
-
Prebuild reconciles rather than blindly creates. Required infrastructure is
|
|
68
|
+
Prebuild reconciles rather than blindly creates. Required infrastructure is GitHub Packages + Jenkins. Route53/NPM remain optional.
|
|
69
69
|
|
|
70
70
|
v2.3 adds:
|
|
71
71
|
|
|
72
|
-
- `--required-only` — reconcile
|
|
72
|
+
- `--required-only` — reconcile GitHub Packages/Jenkins only
|
|
73
73
|
- `--all-targets` — reconcile every configured project deployment environment
|
|
74
74
|
|
|
75
75
|
Provider scope selection is environment-specific. If there is one unambiguous eligible missing scope, it can be linked directly; real choices are still presented interactively.
|
|
@@ -18,7 +18,7 @@ properties([
|
|
|
18
18
|
string(
|
|
19
19
|
name: 'IMAGE_NAME',
|
|
20
20
|
defaultValue: '',
|
|
21
|
-
description: '
|
|
21
|
+
description: 'GitHub Packages image name and generated Jenkins job name. Example: wholesum-order-service',
|
|
22
22
|
trim: true
|
|
23
23
|
),
|
|
24
24
|
string(
|
|
@@ -678,7 +678,7 @@ pipeline {
|
|
|
678
678
|
[key: 'PACKAGE_DIGEST', value: '$.package.package_version.container_metadata.tag.digest'],
|
|
679
679
|
[key: 'EVENT_ACTION', value: '$.action']
|
|
680
680
|
],
|
|
681
|
-
causeString: '
|
|
681
|
+
causeString: 'GitHub Packages: $PACKAGE_NAME:$PACKAGE_TAG',
|
|
682
682
|
token: 'wholesum-order-webhook',
|
|
683
683
|
printContributedVariables: true,
|
|
684
684
|
printPostContent: false,
|
|
@@ -704,7 +704,7 @@ pipeline {
|
|
|
704
704
|
env.DEPLOY_TAG = env.PACKAGE_TAG.trim()
|
|
705
705
|
env.DEPLOY_SOURCE = 'GITHUB_WEBHOOK'
|
|
706
706
|
env.DEPLOY_ACTION = 'DEPLOY'
|
|
707
|
-
echo '
|
|
707
|
+
echo 'GitHub Packages webhook deployment detected.'
|
|
708
708
|
} else {
|
|
709
709
|
if (!params.IMAGE_TAG?.trim()) {
|
|
710
710
|
error 'IMAGE_TAG is required for manual deployment.'
|
|
@@ -762,7 +762,7 @@ pipeline {
|
|
|
762
762
|
}
|
|
763
763
|
}
|
|
764
764
|
|
|
765
|
-
stage('Login to
|
|
765
|
+
stage('Login to GitHub Packages') {
|
|
766
766
|
steps {
|
|
767
767
|
withCredentials([
|
|
768
768
|
usernamePassword(
|
|
@@ -988,8 +988,8 @@ pipelineJob(JOB_NAME) {
|
|
|
988
988
|
Automatically generated Docker deployment pipeline.
|
|
989
989
|
|
|
990
990
|
Service: ${JOB_NAME}
|
|
991
|
-
|
|
992
|
-
|
|
991
|
+
GitHub Packages Image: ${GHCR_IMAGE}
|
|
992
|
+
GitHub Packages Credential: ${GHCR_CREDENTIAL_ID}
|
|
993
993
|
Container: ${DOCKER_CONTAINER}
|
|
994
994
|
Host Port: ${DOCKER_HOST_PORT}
|
|
995
995
|
Container Port: ${DOCKER_CONTAINER_PORT}
|
|
@@ -1073,7 +1073,7 @@ Generated by: CREATE-DEPLOYMENT
|
|
|
1073
1073
|
echo '=============================================='
|
|
1074
1074
|
echo ''
|
|
1075
1075
|
echo "Jenkins Job: ${jobName}"
|
|
1076
|
-
echo "
|
|
1076
|
+
echo "GitHub Packages Image: ${imageName}"
|
|
1077
1077
|
echo "Container: ${containerName}"
|
|
1078
1078
|
echo "Application: ${appType}"
|
|
1079
1079
|
if (appType == 'FRONTEND') {
|
|
@@ -1090,7 +1090,7 @@ Generated by: CREATE-DEPLOYMENT
|
|
|
1090
1090
|
echo "Health Endpoint: ${healthEndpoint}"
|
|
1091
1091
|
}
|
|
1092
1092
|
|
|
1093
|
-
echo 'Automatic
|
|
1093
|
+
echo 'Automatic GitHub Packages deployment: ENABLED'
|
|
1094
1094
|
echo 'Manual deployment: ENABLED'
|
|
1095
1095
|
echo 'Manual rollback: ENABLED'
|
|
1096
1096
|
echo 'Slack notifications: ENABLED'
|