indraq_cli 1.3.0 → 1.5.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/README.md +1082 -657
- package/dist/cli/create-program.d.ts.map +1 -1
- package/dist/cli/create-program.js +24 -6
- package/dist/cli/create-program.js.map +1 -1
- package/dist/cli/doctor.command.d.ts.map +1 -1
- package/dist/cli/doctor.command.js +23 -0
- package/dist/cli/doctor.command.js.map +1 -1
- package/dist/modules/configure/configure.command.d.ts.map +1 -0
- package/dist/modules/configure/configure.command.js +116 -0
- package/dist/modules/configure/configure.command.js.map +1 -0
- package/dist/modules/deploy/commands/build.command.d.ts +2 -2
- package/dist/modules/deploy/commands/build.command.d.ts.map +1 -1
- package/dist/modules/deploy/commands/build.command.js +45 -16
- package/dist/modules/deploy/commands/build.command.js.map +1 -1
- package/dist/modules/deploy/commands/configure-docker.command.d.ts +2 -0
- package/dist/modules/deploy/commands/configure-docker.command.d.ts.map +1 -0
- package/dist/modules/deploy/commands/configure-docker.command.js +169 -0
- package/dist/modules/deploy/commands/configure-docker.command.js.map +1 -0
- package/dist/modules/deploy/config/docker-config.d.ts +21 -0
- package/dist/modules/deploy/config/docker-config.d.ts.map +1 -0
- package/dist/modules/deploy/config/docker-config.js +187 -0
- package/dist/modules/deploy/config/docker-config.js.map +1 -0
- package/dist/modules/deploy/index.d.ts.map +1 -1
- package/dist/modules/deploy/index.js +9 -26
- package/dist/modules/deploy/index.js.map +1 -1
- package/dist/modules/mobile/commands/build-mobile.command.d.ts +11 -0
- package/dist/modules/mobile/commands/build-mobile.command.d.ts.map +1 -0
- package/dist/modules/mobile/commands/build-mobile.command.js +189 -0
- package/dist/modules/mobile/commands/build-mobile.command.js.map +1 -0
- package/dist/modules/mobile/commands/configure-mobile.command.d.ts +8 -0
- package/dist/modules/mobile/commands/configure-mobile.command.d.ts.map +1 -0
- package/dist/modules/mobile/commands/configure-mobile.command.js +353 -0
- package/dist/modules/mobile/commands/configure-mobile.command.js.map +1 -0
- package/dist/modules/mobile/config/mobile-config.d.ts +43 -0
- package/dist/modules/mobile/config/mobile-config.d.ts.map +1 -0
- package/dist/modules/mobile/config/mobile-config.js +211 -0
- package/dist/modules/mobile/config/mobile-config.js.map +1 -0
- package/dist/modules/mobile/index.d.ts +3 -0
- package/dist/modules/mobile/index.d.ts.map +1 -0
- package/dist/modules/mobile/index.js +50 -0
- package/dist/modules/mobile/index.js.map +1 -0
- package/dist/modules/mobile/services/jenkins-mobile.service.d.ts +31 -0
- package/dist/modules/mobile/services/jenkins-mobile.service.d.ts.map +1 -0
- package/dist/modules/mobile/services/jenkins-mobile.service.js +344 -0
- package/dist/modules/mobile/services/jenkins-mobile.service.js.map +1 -0
- package/dist/modules/mobile/services/project.service.d.ts +11 -0
- package/dist/modules/mobile/services/project.service.d.ts.map +1 -0
- package/dist/modules/mobile/services/project.service.js +73 -0
- package/dist/modules/mobile/services/project.service.js.map +1 -0
- package/dist/modules/mobile/services/source-bundle.service.d.ts +9 -0
- package/dist/modules/mobile/services/source-bundle.service.d.ts.map +1 -0
- package/dist/modules/mobile/services/source-bundle.service.js +114 -0
- package/dist/modules/mobile/services/source-bundle.service.js.map +1 -0
- package/dist/modules/mobile/services/version-sync.service.d.ts +7 -0
- package/dist/modules/mobile/services/version-sync.service.d.ts.map +1 -0
- package/dist/modules/mobile/services/version-sync.service.js +88 -0
- package/dist/modules/mobile/services/version-sync.service.js.map +1 -0
- package/dist/shared/config/config-files.d.ts +5 -0
- package/dist/shared/config/config-files.d.ts.map +1 -0
- package/dist/shared/config/config-files.js +88 -0
- package/dist/shared/config/config-files.js.map +1 -0
- package/dist/shared/config/jenkins-config.d.ts +36 -0
- package/dist/shared/config/jenkins-config.d.ts.map +1 -0
- package/dist/shared/config/jenkins-config.js +164 -0
- package/dist/shared/config/jenkins-config.js.map +1 -0
- package/dist/shared/jenkins/configure-jenkins.d.ts +7 -0
- package/dist/shared/jenkins/configure-jenkins.d.ts.map +1 -0
- package/dist/shared/jenkins/configure-jenkins.js +84 -0
- package/dist/shared/jenkins/configure-jenkins.js.map +1 -0
- package/dist/{modules/deploy/services → shared/jenkins}/jenkins.service.d.ts +5 -4
- package/dist/shared/jenkins/jenkins.service.d.ts.map +1 -0
- package/dist/{modules/deploy/services → shared/jenkins}/jenkins.service.js +43 -89
- package/dist/shared/jenkins/jenkins.service.js.map +1 -0
- package/dist/shared/runtime/runtime-doctor.js.map +1 -1
- package/package.json +10 -5
- package/templates/jenkins/Jenkinsfile-Mobile-App +759 -0
- package/dist/modules/deploy/commands/configure.command.d.ts.map +0 -1
- package/dist/modules/deploy/commands/configure.command.js +0 -404
- package/dist/modules/deploy/commands/configure.command.js.map +0 -1
- package/dist/modules/deploy/config/deployment-config.d.ts +0 -29
- package/dist/modules/deploy/config/deployment-config.d.ts.map +0 -1
- package/dist/modules/deploy/config/deployment-config.js +0 -164
- package/dist/modules/deploy/config/deployment-config.js.map +0 -1
- package/dist/modules/deploy/services/jenkins.service.d.ts.map +0 -1
- package/dist/modules/deploy/services/jenkins.service.js.map +0 -1
- /package/dist/modules/{deploy/commands → configure}/configure.command.d.ts +0 -0
package/README.md
CHANGED
|
@@ -9,413 +9,446 @@
|
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
11
|
<p align="center">
|
|
12
|
-
|
|
12
|
+
Docker & GHCR deployments · Jenkins automation · Expo / React Native Android builds · Live terminal logs
|
|
13
13
|
</p>
|
|
14
14
|
|
|
15
15
|
<p align="center">
|
|
16
|
-
<img alt="Node 24" src="https://img.shields.io/badge/Node.js-24.x-339933?logo=node.js&logoColor=white" />
|
|
17
|
-
<img alt="TypeScript" src="https://img.shields.io/badge/TypeScript-strict-3178C6?logo=typescript&logoColor=white" />
|
|
18
16
|
<img alt="npm" src="https://img.shields.io/npm/v/indraq_cli?logo=npm&label=npm" />
|
|
17
|
+
<img alt="Node 22+" src="https://img.shields.io/badge/Node.js-22%2B-339933?logo=node.js&logoColor=white" />
|
|
18
|
+
<img alt="Java 21" src="https://img.shields.io/badge/Java-21%20recommended-ED8B00?logo=openjdk&logoColor=white" />
|
|
19
|
+
<img alt="TypeScript" src="https://img.shields.io/badge/TypeScript-strict-3178C6?logo=typescript&logoColor=white" />
|
|
19
20
|
<img alt="License" src="https://img.shields.io/npm/l/indraq_cli" />
|
|
20
|
-
<img alt="Version" src="https://img.shields.io/badge/version-1.
|
|
21
|
+
<img alt="Version" src="https://img.shields.io/badge/version-1.5.5-264B63" />
|
|
21
22
|
</p>
|
|
22
23
|
|
|
23
24
|
> [!IMPORTANT]
|
|
24
|
-
> **IndraQ CLI is
|
|
25
|
+
> **IndraQ CLI is an engineering operations CLI created by IndraQ Innovations.** It is publicly installable from npm. The tool is designed so new internal capabilities can be added as separate modules instead of growing into one giant script.
|
|
25
26
|
|
|
26
27
|
---
|
|
27
28
|
|
|
28
29
|
## Index
|
|
29
30
|
|
|
30
|
-
1. [What
|
|
31
|
+
1. [What is IndraQ CLI?](#what-is-indraq-cli)
|
|
31
32
|
2. [Explain it like I am new](#explain-it-like-i-am-new)
|
|
32
|
-
3. [What
|
|
33
|
+
3. [What changed in v1.5.5?](#what-changed-in-v155)
|
|
33
34
|
4. [Requirements](#requirements)
|
|
34
35
|
5. [Install Java 21](#install-java-21)
|
|
35
|
-
6. [Install
|
|
36
|
-
7. [
|
|
37
|
-
8. [
|
|
38
|
-
9. [
|
|
39
|
-
10. [
|
|
40
|
-
11. [
|
|
41
|
-
12. [
|
|
42
|
-
13. [
|
|
43
|
-
14. [
|
|
44
|
-
15. [
|
|
45
|
-
16. [
|
|
46
|
-
17. [
|
|
47
|
-
18. [
|
|
48
|
-
19. [
|
|
49
|
-
20. [
|
|
50
|
-
21. [
|
|
36
|
+
6. [Install IndraQ CLI](#install-indraq-cli)
|
|
37
|
+
7. [Run the doctor](#run-the-doctor)
|
|
38
|
+
8. [Configuration home](#configuration-home)
|
|
39
|
+
9. [Configure Jenkins](#configure-jenkins)
|
|
40
|
+
10. [Configure Docker / GHCR](#configure-docker--ghcr)
|
|
41
|
+
11. [Configure Mobile App](#configure-mobile-app)
|
|
42
|
+
12. [Docker deployment](#docker-deployment)
|
|
43
|
+
13. [Mobile build overview](#mobile-build-overview)
|
|
44
|
+
14. [Mobile build matrix](#mobile-build-matrix)
|
|
45
|
+
15. [Mobile build commands](#mobile-build-commands)
|
|
46
|
+
16. [Mobile build flags](#mobile-build-flags)
|
|
47
|
+
17. [Android versioning and artifact names](#android-versioning-and-artifact-names)
|
|
48
|
+
18. [How local source reaches Jenkins](#how-local-source-reaches-jenkins)
|
|
49
|
+
19. [Root .env behavior](#root-env-behavior)
|
|
50
|
+
20. [Mobile Jenkins setup](#mobile-jenkins-setup)
|
|
51
|
+
21. [Configuration and secret storage](#configuration-and-secret-storage)
|
|
52
|
+
22. [Upgrade from v1.4 / v1.5](#upgrade-from-v14--v15)
|
|
53
|
+
23. [Command reference](#command-reference)
|
|
54
|
+
24. [Troubleshooting](#troubleshooting)
|
|
55
|
+
25. [Frequently asked questions](#frequently-asked-questions)
|
|
56
|
+
26. [Project architecture](#project-architecture)
|
|
57
|
+
27. [Final checklist](#final-checklist)
|
|
58
|
+
28. [License](#license)
|
|
51
59
|
|
|
52
60
|
---
|
|
53
61
|
|
|
54
|
-
## What
|
|
62
|
+
## What is IndraQ CLI?
|
|
55
63
|
|
|
56
|
-
IndraQ CLI is a
|
|
64
|
+
IndraQ CLI is a program you install once on a developer computer and then use from **any project folder**.
|
|
57
65
|
|
|
58
|
-
|
|
66
|
+
Instead of remembering many Docker, GitHub, Jenkins, Android, and build commands, you run a small IndraQ command such as:
|
|
59
67
|
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
│
|
|
63
|
-
├── Dockerfile
|
|
64
|
-
│
|
|
65
|
-
└── indraq deploy:dev
|
|
66
|
-
│
|
|
67
|
-
├── check Docker / GitHub / Java / Jenkins
|
|
68
|
-
├── build Docker image
|
|
69
|
-
├── push image to GHCR
|
|
70
|
-
├── find matching Jenkins job
|
|
71
|
-
├── start Jenkins build
|
|
72
|
-
└── show Jenkins logs in this terminal
|
|
68
|
+
```bash
|
|
69
|
+
indraq deploy:dev
|
|
73
70
|
```
|
|
74
71
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
---
|
|
72
|
+
or:
|
|
78
73
|
|
|
79
|
-
|
|
74
|
+
```bash
|
|
75
|
+
indraq build mobile:staging
|
|
76
|
+
```
|
|
80
77
|
|
|
81
|
-
|
|
78
|
+
The CLI validates the request, uses the saved configuration for the current project, performs the work, and shows failures directly in the same VS Code terminal.
|
|
82
79
|
|
|
83
|
-
|
|
80
|
+
### One installation, many projects
|
|
84
81
|
|
|
85
|
-
|
|
82
|
+
Install globally once:
|
|
86
83
|
|
|
87
84
|
```bash
|
|
88
|
-
|
|
85
|
+
npm install -g indraq_cli
|
|
89
86
|
```
|
|
90
87
|
|
|
91
|
-
|
|
88
|
+
Then use it anywhere:
|
|
92
89
|
|
|
93
|
-
|
|
90
|
+
```text
|
|
91
|
+
C:\Projects\accounting-service> indraq deploy:dev
|
|
92
|
+
C:\Projects\mobile-app> indraq build mobile:dev
|
|
93
|
+
C:\Projects\another-app> indraq configure
|
|
94
|
+
```
|
|
94
95
|
|
|
95
|
-
|
|
96
|
-
|---|---|
|
|
97
|
-
| **Docker image** | A packaged copy of your application |
|
|
98
|
-
| **GHCR** | GitHub's place for storing Docker images |
|
|
99
|
-
| **Jenkins pipeline/job** | The automation that deploys or processes your image |
|
|
96
|
+
Each project keeps its own `.indraq/` configuration. The CLI itself is not installed separately in every project.
|
|
100
97
|
|
|
101
98
|
---
|
|
102
99
|
|
|
103
|
-
##
|
|
100
|
+
## Explain it like I am new
|
|
104
101
|
|
|
105
|
-
|
|
106
|
-
flowchart TD
|
|
107
|
-
A[indraq deploy:dev / deploy:prod] --> B{Configuration exists?}
|
|
108
|
-
B -- No --> C[Stop: run indraq configure]
|
|
109
|
-
B -- Yes --> D[Check Docker, GitHub, Java and Jenkins]
|
|
110
|
-
D --> E{Jenkins job exists?}
|
|
111
|
-
E -- No --> F[Stop with clear error]
|
|
112
|
-
E -- Yes --> G[Ask for Docker tag]
|
|
113
|
-
G --> H[Build Docker image]
|
|
114
|
-
H --> I[Authenticate to GHCR]
|
|
115
|
-
I --> J[Push image to GHCR]
|
|
116
|
-
J --> K[Run Jenkins CLI build]
|
|
117
|
-
K --> L[Stream Jenkins console output]
|
|
118
|
-
L --> M{Pipeline result}
|
|
119
|
-
M -- Failed --> N[Return failure and keep logs visible]
|
|
120
|
-
M -- Success --> O[Deployment complete]
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
The Jenkins job name is intentionally simple:
|
|
124
|
-
|
|
125
|
-
> **Jenkins job name = configured image name**
|
|
102
|
+
Imagine you built a school project.
|
|
126
103
|
|
|
127
|
-
|
|
104
|
+
You have the project files on your computer. You want another computer called **Jenkins** to build or deploy them for you.
|
|
128
105
|
|
|
129
|
-
|
|
130
|
-
Image name: immortality-accounting-service
|
|
131
|
-
Expected Jenkins job: immortality-accounting-service
|
|
132
|
-
GHCR image: ghcr.io/indraq-innovations/immortality-accounting-service
|
|
133
|
-
```
|
|
106
|
+
Without IndraQ CLI, you may need to:
|
|
134
107
|
|
|
135
|
-
|
|
108
|
+
1. remember many commands;
|
|
109
|
+
2. open Jenkins in the browser;
|
|
110
|
+
3. choose the correct job;
|
|
111
|
+
4. fill many parameters;
|
|
112
|
+
5. copy environment variables;
|
|
113
|
+
6. wait for the build;
|
|
114
|
+
7. keep refreshing logs.
|
|
136
115
|
|
|
137
|
-
|
|
116
|
+
With IndraQ CLI, you configure the project once and later type one command.
|
|
138
117
|
|
|
139
|
-
|
|
118
|
+
For a mobile app:
|
|
140
119
|
|
|
141
|
-
|
|
120
|
+
```text
|
|
121
|
+
Your VS Code project
|
|
122
|
+
│
|
|
123
|
+
│ indraq build mobile:prod
|
|
124
|
+
▼
|
|
125
|
+
IndraQ CLI
|
|
126
|
+
│
|
|
127
|
+
├── checks you are at the project root
|
|
128
|
+
├── validates Expo / React Native
|
|
129
|
+
├── reads the saved Production settings
|
|
130
|
+
├── reads root .env automatically
|
|
131
|
+
├── creates a clean source snapshot
|
|
132
|
+
├── sends it to Production Jenkins
|
|
133
|
+
└── shows Jenkins logs here
|
|
134
|
+
│
|
|
135
|
+
▼
|
|
136
|
+
Production Jenkins
|
|
137
|
+
│
|
|
138
|
+
├── installs dependencies
|
|
139
|
+
├── prepares Android
|
|
140
|
+
├── builds APK/AAB
|
|
141
|
+
└── publishes the artifact
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
You do **not** need to give Jenkins a Git URL, Git branch, app subdirectory, or pasted `.env` content for this mobile workflow.
|
|
142
145
|
|
|
143
|
-
|
|
144
|
-
|---|---|---|
|
|
145
|
-
| **Node.js 24** | Runs IndraQ CLI | `node --version` |
|
|
146
|
-
| **npm** | Installs the CLI | `npm --version` |
|
|
147
|
-
| **Git** | Detects your GitHub authentication | `git --version` |
|
|
148
|
-
| **Docker** | Builds and pushes images | `docker --version` |
|
|
149
|
-
| **Java** | Runs `jenkins-cli.jar` | `java -version` |
|
|
150
|
-
| **Jenkins account** | Starts your pipeline | Jenkins username + API token/password |
|
|
146
|
+
---
|
|
151
147
|
|
|
152
|
-
|
|
153
|
-
> Jenkins accepts passwords for the CLI in many configurations, but an **API token is strongly preferred**. Treat the prompt `API token or password` as "paste your Jenkins API token here" whenever possible.
|
|
148
|
+
## What changed in v1.5.5?
|
|
154
149
|
|
|
155
|
-
|
|
150
|
+
v1.5.5 keeps the Android versioning and Jenkins/Git workflow from v1.5.x and hardens Android builds created from Windows source snapshots.
|
|
156
151
|
|
|
157
|
-
|
|
152
|
+
This patch fixes the mobile Jenkinsfile Groovy escaping error, makes the mobile Jenkins job name deterministic, makes project configuration Git-shareable, keeps Jenkins login credentials machine-local, and makes Docker deployments send the exact manual deployment parameters expected by the Jenkins pipeline.
|
|
158
153
|
|
|
159
|
-
```bash
|
|
160
|
-
java -version
|
|
161
|
-
```
|
|
162
154
|
|
|
163
|
-
|
|
155
|
+
### Jenkins-console-quality logs and server Gradle reuse in v1.5.5
|
|
164
156
|
|
|
165
|
-
|
|
166
|
-
|
|
157
|
+
- The terminal log streamer now reads Jenkins **`logText/progressiveHtml`**, the same progressive endpoint used by the classic Jenkins web console. Jenkins therefore removes/renders hidden `ConsoleNote` annotations before the CLI displays the text, so internal `ha:////...` payloads no longer pollute VS Code output.
|
|
158
|
+
- HTML markup is converted back to plain terminal text while preserving usernames, timestamps, Pipeline lines, errors, and normal line spacing. `progressiveText` remains only as a compatibility fallback with explicit ConsoleNote filtering.
|
|
159
|
+
- Failed mobile builds now end with a short **Key Jenkins error lines** summary plus the direct Jenkins build URL.
|
|
160
|
+
- The mobile Jenkinsfile still normalizes Windows CRLF in `android/gradlew`, but v1.5.5 also restores the Jenkins server's shared Gradle cache at `$HOME/.gradle` instead of creating an empty per-project Gradle cache.
|
|
161
|
+
- Gradle execution prefers the exact cached project-wrapper distribution. If no exact wrapper distribution is cached, an installed Jenkins-server Gradle from the same major version can be reused. The project wrapper remains the final fallback.
|
|
162
|
+
- If a wrapper download is genuinely necessary, the temporary Jenkins copy of `gradle-wrapper.properties` gets `networkTimeout=120000` (120 seconds) instead of failing at Gradle's short default timeout.
|
|
163
|
+
- `FULL_RESET` no longer deletes Jenkins' shared Gradle cache. It clears project-local npm/Expo caches and generated Android state only.
|
|
164
|
+
- Jenkins queue updates are printed as normal lines instead of carriage-return cursor updates.
|
|
167
165
|
|
|
168
|
-
|
|
166
|
+
### Jenkins/Git behavior hardened in v1.5.x
|
|
169
167
|
|
|
170
|
-
|
|
168
|
+
- Mobile always targets the Jenkins job **`Mobile app Cli build`**. The job name is no longer configurable per project.
|
|
169
|
+
- The mobile Jenkinsfile no longer contains the Groovy-invalid escaped-dot expression that caused `unexpected char: '\'` during pipeline compilation.
|
|
170
|
+
- Mobile Jenkins HTTP uploads now preserve the Jenkins web-session cookie together with the CSRF crumb, fixing HTTP 403 responses when Jenkins is configured with username/password authentication. API-token authentication remains supported.
|
|
171
|
+
- Mobile build output now says explicitly that `.env` is excluded only from the source archive and is uploaded separately to Jenkins.
|
|
172
|
+
- `.indraq/mobile.json`, `.indraq/docker.json`, and `.indraq/jenkins.json` are intended to be committed to Git.
|
|
173
|
+
- `.indraq/jenkins.local.json`, Jenkins username/token/password, `.env`, and `jenkins-cli.jar` are machine-local and never meant to be committed.
|
|
174
|
+
- Docker CLI deployments now start Jenkins with `ACTION=DEPLOY`, `IMAGE_TAG`, optional `IMAGE_DIGEST`, and `DEPLOYMENT_SOURCE=INDRAQ_CLI`.
|
|
175
|
+
- Expo versions are synchronized to `app.json` when possible. React Native CLI versions are synchronized to `android/app/build.gradle` / `build.gradle.kts` when those values are simple literals. Jenkins still enforces the requested version during the actual Android build.
|
|
171
176
|
|
|
172
|
-
|
|
177
|
+
### App name is now part of Mobile configuration
|
|
173
178
|
|
|
174
|
-
|
|
179
|
+
Every mobile project stores an app name. IndraQ uses this name when it creates the final APK/AAB filename.
|
|
175
180
|
|
|
176
|
-
|
|
181
|
+
### Android Version and versionCode
|
|
177
182
|
|
|
178
|
-
|
|
179
|
-
|
|
183
|
+
New projects start with:
|
|
184
|
+
|
|
185
|
+
```text
|
|
186
|
+
Version: 0.1
|
|
187
|
+
versionCode: 1
|
|
180
188
|
```
|
|
181
189
|
|
|
182
|
-
|
|
190
|
+
Both counters auto-increment **after a successful Jenkins build** by default. Failed or cancelled builds do not consume a version.
|
|
183
191
|
|
|
184
|
-
|
|
192
|
+
The version rule is simple: the final numeric part increases by one.
|
|
185
193
|
|
|
186
|
-
```
|
|
187
|
-
|
|
194
|
+
```text
|
|
195
|
+
0.1 → 0.2
|
|
196
|
+
0.9 → 0.10
|
|
197
|
+
1.2.3 → 1.2.4
|
|
188
198
|
```
|
|
189
199
|
|
|
190
|
-
|
|
200
|
+
`versionCode` increments by one:
|
|
191
201
|
|
|
192
202
|
```text
|
|
193
|
-
|
|
203
|
+
1 → 2 → 3 → 4
|
|
194
204
|
```
|
|
195
205
|
|
|
196
|
-
|
|
206
|
+
You can change either value or turn either auto-increment switch off from:
|
|
197
207
|
|
|
198
|
-
```
|
|
199
|
-
|
|
208
|
+
```text
|
|
209
|
+
indraq configure
|
|
210
|
+
→ Mobile App
|
|
211
|
+
→ Version & versionCode
|
|
200
212
|
```
|
|
201
213
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
#### If `winget` is unavailable
|
|
214
|
+
When auto-increment is disabled, IndraQ does not block the build. It prints a soft warning reminding you that the same value will be reused.
|
|
205
215
|
|
|
206
|
-
|
|
216
|
+
### Predictable Android artifact names
|
|
207
217
|
|
|
208
|
-
|
|
218
|
+
APK/AAB files produced by the IndraQ mobile Jenkinsfile now follow:
|
|
209
219
|
|
|
210
|
-
|
|
211
|
-
-
|
|
212
|
-
|
|
213
|
-
#### If Java is installed but `java -version` still fails
|
|
220
|
+
```text
|
|
221
|
+
<AppName>_<Version>_<versionCode>_<YYYY-MM-DD>_<HHmm>.<apk|aab>
|
|
222
|
+
```
|
|
214
223
|
|
|
215
|
-
|
|
224
|
+
Example:
|
|
216
225
|
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
$env:Path
|
|
220
|
-
where.exe java
|
|
226
|
+
```text
|
|
227
|
+
Nefazo_0.1_1_2026-08-30_2051.apk
|
|
221
228
|
```
|
|
222
229
|
|
|
223
|
-
|
|
230
|
+
The date/time is always generated in **Asia/Kolkata (IST)**. Time contains hours and minutes only.
|
|
231
|
+
|
|
232
|
+
### Mobile still always uses Production Jenkins
|
|
224
233
|
|
|
225
|
-
|
|
234
|
+
The Jenkins rule remains intentionally simple:
|
|
226
235
|
|
|
227
236
|
```text
|
|
228
|
-
|
|
237
|
+
indraq build mobile:dev → Production Jenkins
|
|
238
|
+
indraq build mobile:staging → Production Jenkins
|
|
239
|
+
indraq build mobile:prod → Production Jenkins
|
|
229
240
|
```
|
|
230
241
|
|
|
231
|
-
|
|
242
|
+
Docker continues to support both Development and Production Jenkins:
|
|
232
243
|
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
|
|
244
|
+
```text
|
|
245
|
+
indraq deploy:dev → Development Jenkins
|
|
246
|
+
indraq deploy:prod → Production Jenkins
|
|
236
247
|
```
|
|
237
248
|
|
|
238
|
-
###
|
|
249
|
+
### Existing v1.4 mobile projects migrate automatically
|
|
239
250
|
|
|
240
|
-
|
|
251
|
+
Existing `.indraq/mobile.json` files are upgraded automatically. Project type, app name, version/versionCode, auto-increment settings, and environment defaults are preserved when present. Older configurable mobile Jenkins job names are removed because mobile now always targets **`Mobile app Cli build`**.
|
|
241
252
|
|
|
242
|
-
|
|
243
|
-
sudo apt update
|
|
244
|
-
sudo apt install -y openjdk-21-jdk
|
|
245
|
-
```
|
|
253
|
+
---
|
|
246
254
|
|
|
247
|
-
|
|
255
|
+
## Requirements
|
|
248
256
|
|
|
249
|
-
|
|
250
|
-
java -version
|
|
251
|
-
javac -version
|
|
252
|
-
```
|
|
257
|
+
### Developer computer
|
|
253
258
|
|
|
254
|
-
|
|
259
|
+
| Requirement | Why | Check |
|
|
260
|
+
|---|---|---|
|
|
261
|
+
| **Node.js 22+** | Runs IndraQ CLI | `node --version` |
|
|
262
|
+
| **npm** | Installs / updates the CLI | `npm --version` |
|
|
263
|
+
| **Git** | Docker/GHCR authentication and optional source revision metadata | `git --version` |
|
|
264
|
+
| **Docker** | Docker deployment module | `docker --version` |
|
|
265
|
+
| **Java** | Runs Jenkins CLI | `java -version` |
|
|
266
|
+
| **tar** | Packages the local mobile source snapshot | `tar --version` |
|
|
267
|
+
| **Jenkins account** | Starts Jenkins jobs | Jenkins username + API token |
|
|
255
268
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
```
|
|
269
|
+
> [!TIP]
|
|
270
|
+
> Node.js **24** is recommended for IndraQ developer machines, but v1.5.5 supports Node.js **22 and newer**.
|
|
259
271
|
|
|
260
|
-
###
|
|
272
|
+
### Jenkins mobile build machine
|
|
261
273
|
|
|
262
|
-
|
|
274
|
+
The provided mobile Jenkinsfile expects the Jenkins agent to have:
|
|
263
275
|
|
|
264
|
-
|
|
265
|
-
|
|
276
|
+
- Java;
|
|
277
|
+
- Node.js and npm;
|
|
278
|
+
- Android SDK;
|
|
279
|
+
- `sdkmanager`;
|
|
280
|
+
- Bash;
|
|
281
|
+
- `tar` / `sha256sum`;
|
|
282
|
+
- Jenkins **File Parameter** plugin;
|
|
283
|
+
- writable `/opt/mobile-builder`;
|
|
284
|
+
- Android SDK at `/opt/android-sdk` unless you edit the Jenkinsfile;
|
|
285
|
+
- the Jenkins account should have a writable `$HOME/.gradle` cache (normally `/var/jenkins_home/.gradle`);
|
|
286
|
+
- optionally, a system `gradle` executable may be installed. IndraQ uses it only when its major version matches the project wrapper.
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
290
|
+
## Install Java 21
|
|
291
|
+
|
|
292
|
+
Java is required because Jenkins distributes its CLI as `jenkins-cli.jar`.
|
|
293
|
+
|
|
294
|
+
### Windows
|
|
295
|
+
|
|
296
|
+
Open PowerShell:
|
|
297
|
+
|
|
298
|
+
```powershell
|
|
299
|
+
winget install EclipseAdoptium.Temurin.21.JDK
|
|
266
300
|
```
|
|
267
301
|
|
|
268
|
-
Then
|
|
302
|
+
Then **fully close and reopen VS Code**.
|
|
269
303
|
|
|
270
|
-
|
|
304
|
+
Verify:
|
|
305
|
+
|
|
306
|
+
```powershell
|
|
271
307
|
java -version
|
|
308
|
+
where.exe java
|
|
272
309
|
```
|
|
273
310
|
|
|
274
|
-
###
|
|
275
|
-
|
|
276
|
-
Do not continue until this works:
|
|
311
|
+
### Ubuntu / Debian
|
|
277
312
|
|
|
278
313
|
```bash
|
|
314
|
+
sudo apt update
|
|
315
|
+
sudo apt install -y openjdk-21-jdk
|
|
279
316
|
java -version
|
|
280
317
|
```
|
|
281
318
|
|
|
282
|
-
|
|
319
|
+
### macOS
|
|
320
|
+
|
|
321
|
+
Using Homebrew:
|
|
283
322
|
|
|
284
323
|
```bash
|
|
285
|
-
|
|
324
|
+
brew install --cask temurin@21
|
|
325
|
+
java -version
|
|
286
326
|
```
|
|
287
327
|
|
|
288
|
-
|
|
328
|
+
> [!IMPORTANT]
|
|
329
|
+
> If `java -version` fails, fix Java before running Jenkins configuration.
|
|
289
330
|
|
|
290
331
|
---
|
|
291
332
|
|
|
292
|
-
## Install
|
|
333
|
+
## Install IndraQ CLI
|
|
293
334
|
|
|
294
|
-
|
|
335
|
+
Install globally:
|
|
295
336
|
|
|
296
337
|
```bash
|
|
297
338
|
npm install -g indraq_cli
|
|
298
339
|
```
|
|
299
340
|
|
|
300
|
-
|
|
341
|
+
Verify:
|
|
301
342
|
|
|
302
343
|
```bash
|
|
303
344
|
indraq --version
|
|
304
|
-
indraq --help
|
|
305
|
-
```
|
|
306
|
-
|
|
307
|
-
You should now be able to use `indraq` from any project folder:
|
|
308
|
-
|
|
309
|
-
```bash
|
|
310
|
-
indraq configure
|
|
311
|
-
indraq deploy:dev
|
|
312
|
-
indraq deploy:prod
|
|
313
345
|
```
|
|
314
346
|
|
|
315
|
-
|
|
347
|
+
Expected for this release:
|
|
316
348
|
|
|
317
|
-
```
|
|
318
|
-
|
|
349
|
+
```text
|
|
350
|
+
1.5.3
|
|
319
351
|
```
|
|
320
352
|
|
|
321
|
-
|
|
353
|
+
Update later:
|
|
322
354
|
|
|
323
355
|
```bash
|
|
324
|
-
|
|
356
|
+
npm install -g indraq_cli@latest
|
|
325
357
|
```
|
|
326
358
|
|
|
327
|
-
|
|
359
|
+
Uninstall:
|
|
328
360
|
|
|
329
361
|
```bash
|
|
330
362
|
npm uninstall -g indraq_cli
|
|
331
363
|
```
|
|
332
364
|
|
|
333
|
-
|
|
365
|
+
---
|
|
366
|
+
|
|
367
|
+
## Run the doctor
|
|
334
368
|
|
|
335
|
-
|
|
369
|
+
Before debugging a mysterious machine problem, run:
|
|
336
370
|
|
|
337
371
|
```bash
|
|
338
|
-
|
|
372
|
+
indraq doctor
|
|
339
373
|
```
|
|
340
374
|
|
|
341
|
-
|
|
375
|
+
It checks:
|
|
342
376
|
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
377
|
+
- Node.js version;
|
|
378
|
+
- Java;
|
|
379
|
+
- Git;
|
|
380
|
+
- `tar`;
|
|
381
|
+
- how the `indraq` command resolves on your machine.
|
|
346
382
|
|
|
347
|
-
|
|
383
|
+
This is especially useful on Windows if another file named `IndraQ` is shadowing the npm executable.
|
|
348
384
|
|
|
349
|
-
|
|
350
|
-
which indraq
|
|
351
|
-
```
|
|
352
|
-
|
|
353
|
-
If another file or program is found before the npm launcher, run `indraq doctor` if the CLI is reachable by another terminal/session, or fix the conflicting PATH entry.
|
|
385
|
+
---
|
|
354
386
|
|
|
355
|
-
|
|
387
|
+
## Configuration home
|
|
356
388
|
|
|
357
|
-
|
|
389
|
+
Run from the project you want to configure:
|
|
358
390
|
|
|
359
391
|
```bash
|
|
360
|
-
|
|
361
|
-
npm run build
|
|
362
|
-
npm link
|
|
392
|
+
indraq configure
|
|
363
393
|
```
|
|
364
394
|
|
|
365
|
-
|
|
395
|
+
You will see:
|
|
366
396
|
|
|
367
|
-
|
|
397
|
+
```text
|
|
398
|
+
IndraQ CLI Configuration
|
|
368
399
|
|
|
369
|
-
|
|
400
|
+
? What do you want to configure?
|
|
401
|
+
> Jenkins
|
|
402
|
+
Docker / GHCR
|
|
403
|
+
Mobile App
|
|
404
|
+
------------------------------
|
|
405
|
+
Review current project configuration
|
|
406
|
+
Exit
|
|
407
|
+
```
|
|
370
408
|
|
|
371
|
-
|
|
409
|
+
The rule is simple:
|
|
372
410
|
|
|
373
|
-
|
|
411
|
+
> **Persistent settings are changed with `indraq configure`. One-time build changes are supplied as flags.**
|
|
374
412
|
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
```
|
|
413
|
+
---
|
|
414
|
+
|
|
415
|
+
## Configure Jenkins
|
|
379
416
|
|
|
380
|
-
|
|
417
|
+
Choose:
|
|
381
418
|
|
|
382
419
|
```text
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
├── choose environment
|
|
386
|
-
├── configure image name
|
|
387
|
-
├── connect and verify Jenkins
|
|
388
|
-
├── choose GitHub / GHCR destination
|
|
389
|
-
├── choose Dockerfile
|
|
390
|
-
└── save configuration
|
|
420
|
+
Configure
|
|
421
|
+
└── Jenkins
|
|
391
422
|
```
|
|
392
423
|
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
### Step 1 - Choose environment
|
|
424
|
+
The Jenkins menu is:
|
|
396
425
|
|
|
397
426
|
```text
|
|
398
|
-
? Select the environment you want to configure:
|
|
399
427
|
> Development
|
|
400
|
-
Production
|
|
428
|
+
Production — used by all mobile builds
|
|
429
|
+
------------------
|
|
430
|
+
Review Jenkins connections
|
|
431
|
+
Back
|
|
401
432
|
```
|
|
402
433
|
|
|
403
|
-
|
|
434
|
+
There are only **two Jenkins infrastructure environments** in a project.
|
|
404
435
|
|
|
405
|
-
|
|
436
|
+
| Jenkins connection | Used by |
|
|
437
|
+
|---|---|
|
|
438
|
+
| **Development** | `indraq deploy:dev` |
|
|
439
|
+
| **Production** | `indraq deploy:prod` **and every mobile build** |
|
|
406
440
|
|
|
407
|
-
|
|
441
|
+
This means:
|
|
408
442
|
|
|
409
443
|
```text
|
|
410
|
-
|
|
411
|
-
|
|
444
|
+
Mobile Development ┐
|
|
445
|
+
Mobile Staging ├──→ Production Jenkins
|
|
446
|
+
Mobile Production ┘
|
|
412
447
|
```
|
|
413
448
|
|
|
414
|
-
|
|
449
|
+
A command such as `indraq build mobile:dev` means **build the app using its Development mobile settings on Production Jenkins**. It does not mean “use Development Jenkins.”
|
|
415
450
|
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
You enter:
|
|
451
|
+
For each Jenkins connection, IndraQ asks for:
|
|
419
452
|
|
|
420
453
|
```text
|
|
421
454
|
Jenkins URL/domain
|
|
@@ -423,769 +456,1161 @@ Jenkins username
|
|
|
423
456
|
Jenkins API token or password
|
|
424
457
|
```
|
|
425
458
|
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
```text
|
|
429
|
-
https://jenkins.example.com
|
|
430
|
-
```
|
|
459
|
+
It then:
|
|
431
460
|
|
|
432
|
-
|
|
461
|
+
1. downloads `<jenkins>/jnlpJars/jenkins-cli.jar`;
|
|
462
|
+
2. stores the secret outside the project;
|
|
463
|
+
3. runs Jenkins `who-am-i`;
|
|
464
|
+
4. rejects wrong credentials immediately;
|
|
465
|
+
5. saves the verified non-secret connection metadata in `.indraq/jenkins.json`.
|
|
433
466
|
|
|
434
|
-
|
|
435
|
-
1. Is Java available?
|
|
436
|
-
2. Can the CLI download /jnlpJars/jenkins-cli.jar?
|
|
437
|
-
3. Can these credentials authenticate?
|
|
438
|
-
4. Does Jenkins CLI `who-am-i` identify a real user?
|
|
439
|
-
5. Does WebSocket mode work? If not, can HTTP CLI mode work?
|
|
440
|
-
```
|
|
467
|
+
Configure Jenkins once per project. Normal Docker/mobile build commands reuse the saved connection and credentials.
|
|
441
468
|
|
|
442
|
-
|
|
469
|
+
Use a Jenkins API token instead of an account password whenever possible.
|
|
443
470
|
|
|
444
|
-
|
|
445
|
-
> The Jenkins connection is currently **project-level**. Development and Production share the same Jenkins controller/account, while each environment can have its own image/job name.
|
|
471
|
+
---
|
|
446
472
|
|
|
447
|
-
|
|
473
|
+
## Configure Docker / GHCR
|
|
448
474
|
|
|
449
|
-
|
|
475
|
+
Choose:
|
|
450
476
|
|
|
451
477
|
```text
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
GitHub organization
|
|
478
|
+
Configure
|
|
479
|
+
└── Docker / GHCR
|
|
455
480
|
```
|
|
456
481
|
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
Example:
|
|
482
|
+
The menu lets you independently change:
|
|
460
483
|
|
|
461
484
|
```text
|
|
462
|
-
|
|
463
|
-
|
|
485
|
+
Development
|
|
486
|
+
Production
|
|
487
|
+
GitHub / GHCR destination
|
|
488
|
+
Review
|
|
489
|
+
Back
|
|
464
490
|
```
|
|
465
491
|
|
|
466
|
-
|
|
467
|
-
|
|
492
|
+
Development and Production each store:
|
|
493
|
+
|
|
494
|
+
- image name;
|
|
495
|
+
- Dockerfile path.
|
|
496
|
+
|
|
497
|
+
GitHub/GHCR stores:
|
|
468
498
|
|
|
469
|
-
|
|
499
|
+
- personal account or organization;
|
|
500
|
+
- selected GHCR owner.
|
|
470
501
|
|
|
471
|
-
|
|
502
|
+
The Docker deployment Jenkins connection is configured separately under **Jenkins**.
|
|
503
|
+
|
|
504
|
+
When `indraq deploy:dev` or `indraq deploy:prod` has built and pushed the image, the CLI starts the Jenkins job whose name matches the image repository name (for example `ghcr.io/indraq-innovations/immortality-accounting-service` maps to Jenkins job `immortality-accounting-service`) and supplies exactly:
|
|
472
505
|
|
|
473
506
|
```text
|
|
474
|
-
|
|
507
|
+
ACTION=DEPLOY
|
|
508
|
+
IMAGE_TAG=<primary pushed tag>
|
|
509
|
+
IMAGE_DIGEST=<sha256 digest, when available>
|
|
510
|
+
DEPLOYMENT_SOURCE=INDRAQ_CLI
|
|
475
511
|
```
|
|
476
512
|
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
The Dockerfile path is stored separately for Development and Production.
|
|
513
|
+
This is the CLI path; the Jenkinsfile may still keep its Generic Webhook Trigger for other deployment sources if you want it.
|
|
480
514
|
|
|
481
515
|
---
|
|
482
516
|
|
|
483
|
-
##
|
|
484
|
-
|
|
485
|
-
This is the normal behavior after the project has already been configured once.
|
|
517
|
+
## Configure Mobile App
|
|
486
518
|
|
|
487
|
-
|
|
519
|
+
Choose:
|
|
488
520
|
|
|
489
|
-
```
|
|
490
|
-
|
|
521
|
+
```text
|
|
522
|
+
Configure
|
|
523
|
+
└── Mobile App
|
|
491
524
|
```
|
|
492
525
|
|
|
493
|
-
|
|
526
|
+
The menu is:
|
|
494
527
|
|
|
495
528
|
```text
|
|
496
|
-
|
|
497
|
-
|
|
529
|
+
> Project settings
|
|
530
|
+
Version & versionCode
|
|
531
|
+
Development
|
|
532
|
+
Staging
|
|
498
533
|
Production
|
|
534
|
+
------------------
|
|
535
|
+
Review Mobile App configuration
|
|
536
|
+
Back
|
|
499
537
|
```
|
|
500
538
|
|
|
501
|
-
|
|
539
|
+
### Project settings
|
|
540
|
+
|
|
541
|
+
IndraQ asks for:
|
|
502
542
|
|
|
503
543
|
```text
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
Dockerfile path (Dockerfile)
|
|
509
|
-
─────────────────────────────────────────────────────────────
|
|
510
|
-
Review current configuration
|
|
511
|
-
Exit configuration
|
|
544
|
+
Mobile app name
|
|
545
|
+
Project type
|
|
546
|
+
- Expo
|
|
547
|
+
- React Native CLI
|
|
512
548
|
```
|
|
513
549
|
|
|
514
|
-
|
|
550
|
+
The app name is saved per project and is used in the final APK/AAB filename.
|
|
515
551
|
|
|
516
|
-
|
|
552
|
+
The mobile Jenkins job is **not configurable**. Every mobile build targets exactly:
|
|
517
553
|
|
|
518
554
|
```text
|
|
519
|
-
|
|
520
|
-
↓
|
|
521
|
-
change Dockerfile
|
|
522
|
-
↓
|
|
523
|
-
save only that change
|
|
524
|
-
↓
|
|
525
|
-
return to the settings menu
|
|
555
|
+
Mobile app Cli build
|
|
526
556
|
```
|
|
527
557
|
|
|
528
|
-
The
|
|
558
|
+
All mobile Development, Staging, and Production builds use the project's **Production Jenkins** connection. The CLI verifies that `Mobile app Cli build` exists before uploading source.
|
|
529
559
|
|
|
530
|
-
###
|
|
560
|
+
### Version & versionCode settings
|
|
531
561
|
|
|
532
|
-
|
|
562
|
+
Choose:
|
|
533
563
|
|
|
534
564
|
```text
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
Saved
|
|
538
|
-
↓
|
|
539
|
-
Settings menu
|
|
540
|
-
↓
|
|
541
|
-
Change GitHub destination
|
|
542
|
-
↓
|
|
543
|
-
Saved
|
|
544
|
-
↓
|
|
545
|
-
Settings menu
|
|
546
|
-
↓
|
|
547
|
-
Exit configuration
|
|
565
|
+
Mobile App
|
|
566
|
+
→ Version & versionCode
|
|
548
567
|
```
|
|
549
568
|
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
If you are finished, choose:
|
|
569
|
+
You can configure these independently:
|
|
553
570
|
|
|
554
571
|
```text
|
|
555
|
-
|
|
572
|
+
Version
|
|
573
|
+
versionCode
|
|
574
|
+
Auto-increment Version
|
|
575
|
+
Auto-increment versionCode
|
|
556
576
|
```
|
|
557
577
|
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
Choose:
|
|
578
|
+
Defaults:
|
|
561
579
|
|
|
562
580
|
```text
|
|
563
|
-
|
|
581
|
+
Version: 0.1
|
|
582
|
+
versionCode: 1
|
|
583
|
+
Auto-increment Version: ON
|
|
584
|
+
Auto-increment versionCode: ON
|
|
564
585
|
```
|
|
565
586
|
|
|
566
|
-
|
|
587
|
+
Auto-increment happens only after Jenkins reports `SUCCESS`. A failed build leaves both saved values unchanged.
|
|
588
|
+
|
|
589
|
+
If you manually change Version/versionCode while a Jenkins build is still running, IndraQ will not overwrite your newer values when that build finishes.
|
|
590
|
+
|
|
591
|
+
### Version values survive Git clones
|
|
592
|
+
|
|
593
|
+
`.indraq/mobile.json` is project configuration and should be committed. That means another developer who clones/pulls the repository receives the same next Version/versionCode.
|
|
594
|
+
|
|
595
|
+
IndraQ also synchronizes the configured values into the Android-facing project file when it can do so safely:
|
|
567
596
|
|
|
568
597
|
```text
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
Dockerfile path
|
|
572
|
-
GHCR destination
|
|
573
|
-
Jenkins URL
|
|
574
|
-
Jenkins username
|
|
575
|
-
Expected Jenkins job name
|
|
598
|
+
Expo → app.json → expo.version + expo.android.versionCode
|
|
599
|
+
React Native CLI → android/app/build.gradle(.kts) → versionName + versionCode
|
|
576
600
|
```
|
|
577
601
|
|
|
578
|
-
|
|
602
|
+
Before a remote build, Jenkins applies the requested values again after Expo prebuild / before Gradle, so the artifact uses the values shown in the CLI build plan.
|
|
603
|
+
|
|
604
|
+
After a successful build with auto-increment enabled, commit the changed `.indraq/mobile.json` and synced app-version file(s). Failed builds do not increment the shared values.
|
|
605
|
+
|
|
606
|
+
### Environment settings
|
|
607
|
+
|
|
608
|
+
Each mobile environment stores:
|
|
579
609
|
|
|
580
|
-
|
|
610
|
+
- default build output;
|
|
611
|
+
- default build profile.
|
|
581
612
|
|
|
582
|
-
|
|
613
|
+
Profiles:
|
|
614
|
+
|
|
615
|
+
| Profile | Meaning |
|
|
583
616
|
|---|---|
|
|
584
|
-
|
|
|
585
|
-
|
|
|
586
|
-
|
|
|
587
|
-
| GitHub / GHCR destination | No — shared by the project |
|
|
588
|
-
| Jenkins API token/password | No — tied to the saved Jenkins account and kept outside the project config |
|
|
617
|
+
| **FAST** | Fresh source snapshot; reuse project npm cache plus the Jenkins server shared Gradle cache |
|
|
618
|
+
| **CLEAN** | Clean generated project build state before building |
|
|
619
|
+
| **FULL_RESET** | Clear project npm/Expo/generated Android state while preserving the Jenkins server shared Gradle cache |
|
|
589
620
|
|
|
590
|
-
|
|
621
|
+
After saving one environment you return to the Mobile App menu, so you can configure another environment without rerunning the command.
|
|
591
622
|
|
|
592
623
|
---
|
|
593
624
|
|
|
594
|
-
##
|
|
625
|
+
## Docker deployment
|
|
595
626
|
|
|
596
|
-
|
|
627
|
+
Development:
|
|
597
628
|
|
|
598
629
|
```bash
|
|
599
630
|
indraq deploy:dev
|
|
600
631
|
```
|
|
601
632
|
|
|
602
|
-
|
|
633
|
+
Alias:
|
|
603
634
|
|
|
604
635
|
```bash
|
|
605
636
|
indraq deploy:development
|
|
606
637
|
```
|
|
607
638
|
|
|
608
|
-
|
|
639
|
+
Production:
|
|
609
640
|
|
|
610
|
-
|
|
641
|
+
```bash
|
|
642
|
+
indraq deploy:prod
|
|
643
|
+
```
|
|
644
|
+
|
|
645
|
+
Alias:
|
|
646
|
+
|
|
647
|
+
```bash
|
|
648
|
+
indraq deploy:production
|
|
649
|
+
```
|
|
650
|
+
|
|
651
|
+
Docker deployment still follows this flow:
|
|
611
652
|
|
|
612
653
|
```text
|
|
613
|
-
|
|
654
|
+
validate Docker / GitHub / Java / Jenkins
|
|
655
|
+
↓
|
|
656
|
+
build Docker image
|
|
657
|
+
↓
|
|
658
|
+
push image to GHCR
|
|
659
|
+
↓
|
|
660
|
+
find Jenkins job with same name as image
|
|
661
|
+
↓
|
|
662
|
+
run Jenkins pipeline
|
|
663
|
+
↓
|
|
664
|
+
stream logs into terminal
|
|
614
665
|
```
|
|
615
666
|
|
|
616
|
-
|
|
667
|
+
---
|
|
668
|
+
|
|
669
|
+
## Mobile build overview
|
|
670
|
+
|
|
671
|
+
> [!IMPORTANT]
|
|
672
|
+
> **Every mobile build runs on the saved Production Jenkins connection.** `mobile:dev`, `mobile:staging`, and `mobile:prod` are mobile application environments, not Jenkins environments.
|
|
673
|
+
|
|
674
|
+
|
|
675
|
+
The mobile module deliberately does **not** ask for:
|
|
676
|
+
|
|
677
|
+
- Git repository URL;
|
|
678
|
+
- Git branch;
|
|
679
|
+
- app subdirectory;
|
|
680
|
+
- pasted env text;
|
|
681
|
+
- "save env" checkbox.
|
|
682
|
+
|
|
683
|
+
Why? Because the CLI is already running inside the developer's project.
|
|
684
|
+
|
|
685
|
+
### Root directory rule
|
|
686
|
+
|
|
687
|
+
Run mobile builds from the directory containing the mobile app's `package.json`.
|
|
688
|
+
|
|
689
|
+
Correct:
|
|
690
|
+
|
|
691
|
+
```text
|
|
692
|
+
my-mobile-app/
|
|
693
|
+
├── package.json ← run command here
|
|
694
|
+
├── .env
|
|
695
|
+
├── src/
|
|
696
|
+
├── android/ ← React Native CLI
|
|
697
|
+
└── ...
|
|
698
|
+
```
|
|
699
|
+
|
|
700
|
+
Wrong:
|
|
701
|
+
|
|
702
|
+
```text
|
|
703
|
+
my-mobile-app/android/ ← do not run it here
|
|
704
|
+
```
|
|
705
|
+
|
|
706
|
+
IndraQ does not silently search parent folders. If `package.json` is not in the current directory, the build stops.
|
|
707
|
+
|
|
708
|
+
---
|
|
709
|
+
|
|
710
|
+
## Mobile build matrix
|
|
711
|
+
|
|
712
|
+
Invalid combinations are blocked both by the CLI **and** by the Jenkinsfile.
|
|
713
|
+
|
|
714
|
+
| Project type | Environment | Allowed output |
|
|
715
|
+
|---|---|---|
|
|
716
|
+
| Expo | Development | **Development Client only** |
|
|
717
|
+
| Expo | Staging | **Release APK** or **Release AAB** |
|
|
718
|
+
| Expo | Production | **Release APK** or **Release AAB** |
|
|
719
|
+
| React Native CLI | Development | **Debug APK only** |
|
|
720
|
+
| React Native CLI | Staging | **Release APK** or **Release AAB** |
|
|
721
|
+
| React Native CLI | Production | **Release APK** or **Release AAB** |
|
|
722
|
+
|
|
723
|
+
The CLI does not show impossible choices during configuration.
|
|
724
|
+
|
|
725
|
+
For example, Expo Development automatically becomes:
|
|
617
726
|
|
|
618
727
|
```text
|
|
619
|
-
|
|
728
|
+
Build output: Development Client
|
|
620
729
|
```
|
|
621
730
|
|
|
731
|
+
There is no pointless APK/AAB menu for that combination.
|
|
732
|
+
|
|
622
733
|
---
|
|
623
734
|
|
|
624
|
-
##
|
|
735
|
+
## Mobile build commands
|
|
625
736
|
|
|
626
|
-
|
|
737
|
+
Development:
|
|
627
738
|
|
|
628
739
|
```bash
|
|
629
|
-
indraq
|
|
740
|
+
indraq build mobile:dev
|
|
630
741
|
```
|
|
631
742
|
|
|
632
|
-
|
|
743
|
+
Alias:
|
|
633
744
|
|
|
634
745
|
```bash
|
|
635
|
-
indraq
|
|
746
|
+
indraq build mobile:development
|
|
636
747
|
```
|
|
637
748
|
|
|
638
|
-
|
|
749
|
+
Staging:
|
|
639
750
|
|
|
640
|
-
|
|
751
|
+
```bash
|
|
752
|
+
indraq build mobile:staging
|
|
753
|
+
```
|
|
641
754
|
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
755
|
+
Production:
|
|
756
|
+
|
|
757
|
+
```bash
|
|
758
|
+
indraq build mobile:prod
|
|
759
|
+
```
|
|
760
|
+
|
|
761
|
+
Alias:
|
|
762
|
+
|
|
763
|
+
```bash
|
|
764
|
+
indraq build mobile:production
|
|
765
|
+
```
|
|
766
|
+
|
|
767
|
+
### First build
|
|
768
|
+
|
|
769
|
+
If required mobile configuration is missing, the CLI asks only for the missing settings and saves them.
|
|
770
|
+
|
|
771
|
+
### Later builds
|
|
772
|
+
|
|
773
|
+
Once configured:
|
|
774
|
+
|
|
775
|
+
```bash
|
|
776
|
+
indraq build mobile:staging
|
|
647
777
|
```
|
|
648
778
|
|
|
779
|
+
uses the saved Staging output/profile without asking the same questions again.
|
|
780
|
+
|
|
781
|
+
Before uploading anything, IndraQ prints a build plan and asks for confirmation.
|
|
782
|
+
|
|
649
783
|
---
|
|
650
784
|
|
|
651
|
-
##
|
|
785
|
+
## Mobile build flags
|
|
652
786
|
|
|
653
|
-
|
|
787
|
+
Flags override saved defaults **for one build only**.
|
|
654
788
|
|
|
655
|
-
|
|
789
|
+
They do not permanently change `mobile.json`.
|
|
790
|
+
|
|
791
|
+
### Output override
|
|
792
|
+
|
|
793
|
+
```bash
|
|
794
|
+
indraq build mobile:staging --output aab
|
|
795
|
+
```
|
|
656
796
|
|
|
657
|
-
|
|
797
|
+
Accepted output aliases:
|
|
658
798
|
|
|
659
799
|
```text
|
|
660
|
-
|
|
800
|
+
dev-client / development-client
|
|
801
|
+
debug / debug-apk
|
|
802
|
+
apk / release-apk
|
|
803
|
+
aab / release-aab
|
|
661
804
|
```
|
|
662
805
|
|
|
663
|
-
|
|
806
|
+
The matrix is still enforced. For example, this is rejected:
|
|
664
807
|
|
|
665
|
-
|
|
808
|
+
```bash
|
|
809
|
+
indraq build mobile:dev --output aab
|
|
810
|
+
```
|
|
666
811
|
|
|
667
|
-
|
|
812
|
+
for an Expo Development project.
|
|
668
813
|
|
|
669
|
-
###
|
|
814
|
+
### Profile override
|
|
670
815
|
|
|
671
|
-
|
|
816
|
+
```bash
|
|
817
|
+
indraq build mobile:prod --profile clean
|
|
818
|
+
```
|
|
819
|
+
|
|
820
|
+
Available profiles:
|
|
672
821
|
|
|
673
822
|
```text
|
|
674
|
-
|
|
823
|
+
fast
|
|
824
|
+
clean
|
|
825
|
+
full-reset
|
|
826
|
+
```
|
|
827
|
+
|
|
828
|
+
### Verbose Gradle logs
|
|
829
|
+
|
|
830
|
+
```bash
|
|
831
|
+
indraq build mobile:prod --verbose
|
|
675
832
|
```
|
|
676
833
|
|
|
677
|
-
|
|
834
|
+
### Dry run
|
|
678
835
|
|
|
679
|
-
|
|
836
|
+
Validate everything and print the plan without uploading source or starting Jenkins:
|
|
680
837
|
|
|
681
|
-
```
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
838
|
+
```bash
|
|
839
|
+
indraq build mobile:staging --dry-run
|
|
840
|
+
```
|
|
841
|
+
|
|
842
|
+
### Skip final confirmation
|
|
843
|
+
|
|
844
|
+
Useful for a developer who already knows exactly what will run:
|
|
845
|
+
|
|
846
|
+
```bash
|
|
847
|
+
indraq build mobile:prod --yes
|
|
689
848
|
```
|
|
690
849
|
|
|
691
|
-
|
|
850
|
+
Example combination:
|
|
851
|
+
|
|
852
|
+
```bash
|
|
853
|
+
indraq build mobile:prod --output aab --profile clean --verbose --yes
|
|
854
|
+
```
|
|
692
855
|
|
|
693
|
-
|
|
856
|
+
---
|
|
694
857
|
|
|
695
|
-
|
|
858
|
+
## Android versioning and artifact names
|
|
696
859
|
|
|
697
|
-
-
|
|
698
|
-
- read the target job;
|
|
699
|
-
- trigger/build the target job;
|
|
700
|
-
- view the build output needed by the CLI.
|
|
860
|
+
IndraQ v1.5.5 currently manages **Android** versioning only. iOS version/build-number management is intentionally out of scope for now.
|
|
701
861
|
|
|
702
|
-
|
|
862
|
+
### What value does a build use?
|
|
703
863
|
|
|
704
|
-
|
|
864
|
+
A build uses the values currently stored in `.indraq/mobile.json`.
|
|
705
865
|
|
|
706
|
-
|
|
866
|
+
Example before the build:
|
|
707
867
|
|
|
708
868
|
```text
|
|
709
|
-
|
|
869
|
+
Version: 0.1
|
|
870
|
+
versionCode: 1
|
|
710
871
|
```
|
|
711
872
|
|
|
712
|
-
|
|
873
|
+
The Jenkins build receives exactly `0.1` and `1`, applies them to the generated/native Android Gradle project, and produces the APK/AAB with those values.
|
|
713
874
|
|
|
714
|
-
|
|
875
|
+
Only after Jenkins finishes successfully are enabled counters advanced for the next build.
|
|
715
876
|
|
|
716
|
-
|
|
877
|
+
### Auto-increment examples
|
|
717
878
|
|
|
718
|
-
|
|
879
|
+
With both switches ON:
|
|
719
880
|
|
|
720
|
-
|
|
881
|
+
```text
|
|
882
|
+
Build 1 uses: 0.1 / 1
|
|
883
|
+
Success
|
|
884
|
+
Next saved: 0.2 / 2
|
|
721
885
|
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
886
|
+
Build 2 uses: 0.2 / 2
|
|
887
|
+
Success
|
|
888
|
+
Next saved: 0.3 / 3
|
|
889
|
+
```
|
|
725
890
|
|
|
726
|
-
|
|
891
|
+
If `Auto-increment Version` is OFF:
|
|
727
892
|
|
|
728
|
-
```
|
|
729
|
-
|
|
893
|
+
```text
|
|
894
|
+
Version stays 0.1
|
|
895
|
+
versionCode may still move 1 → 2 → 3
|
|
730
896
|
```
|
|
731
897
|
|
|
732
|
-
|
|
898
|
+
If `Auto-increment versionCode` is OFF, IndraQ prints a warning before every mobile build because Android release stores normally expect a higher versionCode for upgrades.
|
|
899
|
+
|
|
900
|
+
### Artifact filename
|
|
901
|
+
|
|
902
|
+
The Jenkins mobile pipeline renames the primary APK/AAB to:
|
|
733
903
|
|
|
734
904
|
```text
|
|
735
|
-
|
|
905
|
+
<AppName>_<Version>_<versionCode>_<YYYY-MM-DD>_<HHmm>.<extension>
|
|
736
906
|
```
|
|
737
907
|
|
|
738
908
|
Example:
|
|
739
909
|
|
|
740
910
|
```text
|
|
741
|
-
|
|
911
|
+
Nefazo_User_1.4_27_2026-08-30_2051.aab
|
|
742
912
|
```
|
|
743
913
|
|
|
914
|
+
Rules:
|
|
915
|
+
|
|
916
|
+
- timezone: `Asia/Kolkata` (IST);
|
|
917
|
+
- date: `YYYY-MM-DD`;
|
|
918
|
+
- time: 24-hour `HHmm`;
|
|
919
|
+
- seconds are intentionally omitted;
|
|
920
|
+
- unsafe filename characters in the configured app name are replaced with `_`.
|
|
921
|
+
|
|
744
922
|
---
|
|
745
923
|
|
|
746
|
-
##
|
|
924
|
+
## How local source reaches Jenkins
|
|
747
925
|
|
|
748
|
-
|
|
926
|
+
This is the mobile source-upload design.
|
|
749
927
|
|
|
750
|
-
|
|
928
|
+
The old mobile Jenkins pipeline cloned a Git URL. The new flow builds the files that are **actually on the developer's computer right now**.
|
|
751
929
|
|
|
752
|
-
```
|
|
753
|
-
|
|
930
|
+
```mermaid
|
|
931
|
+
flowchart TD
|
|
932
|
+
A[Developer runs indraq build mobile:prod] --> B[Verify current directory is project root]
|
|
933
|
+
B --> C[Validate Expo / React Native project]
|
|
934
|
+
C --> D[Create clean temporary source snapshot]
|
|
935
|
+
D --> E[Calculate SHA-256]
|
|
936
|
+
E --> F[Upload snapshot to Jenkins]
|
|
937
|
+
F --> G[Jenkins verifies SHA-256]
|
|
938
|
+
G --> H[Extract source]
|
|
939
|
+
H --> I[Build Android]
|
|
940
|
+
I --> J[Archive APK / AAB]
|
|
941
|
+
J --> K[Stream logs + artifact URL to terminal]
|
|
754
942
|
```
|
|
755
943
|
|
|
756
|
-
|
|
944
|
+
### What is excluded from the source snapshot?
|
|
757
945
|
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
},
|
|
777
|
-
"prod": {
|
|
778
|
-
"name": "Production",
|
|
779
|
-
"imageName": "my-service",
|
|
780
|
-
"dockerfilePath": "Dockerfile"
|
|
781
|
-
}
|
|
782
|
-
}
|
|
783
|
-
}
|
|
946
|
+
IndraQ excludes common generated/sensitive files such as:
|
|
947
|
+
|
|
948
|
+
```text
|
|
949
|
+
.git/
|
|
950
|
+
.indraq/
|
|
951
|
+
node_modules/
|
|
952
|
+
coverage/
|
|
953
|
+
dist/
|
|
954
|
+
build/
|
|
955
|
+
.vscode/
|
|
956
|
+
.idea/
|
|
957
|
+
.env
|
|
958
|
+
.env.*
|
|
959
|
+
*.apk
|
|
960
|
+
*.aab
|
|
961
|
+
android/.gradle/
|
|
962
|
+
android/app/build/
|
|
963
|
+
ios/Pods/
|
|
784
964
|
```
|
|
785
965
|
|
|
786
|
-
|
|
966
|
+
The source archive is created in the system temporary directory, uploaded, then deleted locally.
|
|
787
967
|
|
|
788
|
-
###
|
|
968
|
+
### Why SHA-256?
|
|
789
969
|
|
|
790
|
-
|
|
970
|
+
The CLI calculates a SHA-256 hash before upload. Jenkins calculates it again before extraction.
|
|
971
|
+
|
|
972
|
+
If they do not match, the build stops.
|
|
973
|
+
|
|
974
|
+
---
|
|
975
|
+
|
|
976
|
+
## Root .env behavior
|
|
977
|
+
|
|
978
|
+
You no longer paste `.env` into Jenkins.
|
|
979
|
+
|
|
980
|
+
For build outputs that need an environment file, IndraQ automatically uses:
|
|
791
981
|
|
|
792
982
|
```text
|
|
793
|
-
|
|
794
|
-
├── jenkins-cli.jar
|
|
795
|
-
└── auth
|
|
983
|
+
<mobile-project-root>/.env
|
|
796
984
|
```
|
|
797
985
|
|
|
798
|
-
The `
|
|
986
|
+
The `.env` file is:
|
|
987
|
+
|
|
988
|
+
1. **not included** inside the source archive;
|
|
989
|
+
2. uploaded separately as a Jenkins file parameter;
|
|
990
|
+
3. copied into the temporary build source;
|
|
991
|
+
4. never printed in logs;
|
|
992
|
+
5. removed from the Jenkins workspace in `post { always { ... } }`.
|
|
799
993
|
|
|
800
994
|
> [!CAUTION]
|
|
801
|
-
>
|
|
995
|
+
> Jenkins file parameters can remain in Jenkins build data according to your controller/plugin retention behavior. The workspace copy is deleted, but highly sensitive production secrets should still follow your normal Jenkins retention and secret-management policy.
|
|
802
996
|
|
|
803
|
-
|
|
997
|
+
If a required `.env` is missing, the build stops before source upload.
|
|
998
|
+
|
|
999
|
+
Expo Development Client does not require `.env`, but if a root `.env` exists IndraQ still supplies it automatically.
|
|
804
1000
|
|
|
805
1001
|
---
|
|
806
1002
|
|
|
807
|
-
##
|
|
1003
|
+
## Mobile Jenkins setup
|
|
808
1004
|
|
|
809
|
-
|
|
1005
|
+
The mobile source-upload workflow requires the Jenkins **File Parameter** plugin.
|
|
810
1006
|
|
|
811
|
-
|
|
812
|
-
|---|---|
|
|
813
|
-
| `indraq --version` | Show installed CLI version |
|
|
814
|
-
| `indraq --help` | Show available commands |
|
|
815
|
-
| `indraq configure` | First run: complete setup. Later runs: open the environment settings menu |
|
|
816
|
-
| `indraq deploy:dev` | Deploy development |
|
|
817
|
-
| `indraq deploy:development` | Same as `deploy:dev` |
|
|
818
|
-
| `indraq deploy:prod` | Deploy production |
|
|
819
|
-
| `indraq deploy:production` | Same as `deploy:prod` |
|
|
1007
|
+
### Step 1 — install the plugin
|
|
820
1008
|
|
|
821
|
-
|
|
1009
|
+
In Jenkins:
|
|
822
1010
|
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
indraq deploy build --env prod
|
|
830
|
-
indraq deploy build --env production
|
|
1011
|
+
```text
|
|
1012
|
+
Manage Jenkins
|
|
1013
|
+
→ Plugins
|
|
1014
|
+
→ Available plugins
|
|
1015
|
+
→ search: File Parameter
|
|
1016
|
+
→ install "File Parameter"
|
|
831
1017
|
```
|
|
832
1018
|
|
|
833
|
-
|
|
1019
|
+
Plugin ID:
|
|
834
1020
|
|
|
835
|
-
|
|
1021
|
+
```text
|
|
1022
|
+
file-parameters
|
|
1023
|
+
```
|
|
836
1024
|
|
|
837
|
-
|
|
1025
|
+
### Step 2 — use the IndraQ v1.5 mobile Jenkinsfile
|
|
1026
|
+
|
|
1027
|
+
This repository includes:
|
|
838
1028
|
|
|
839
1029
|
```text
|
|
840
|
-
|
|
841
|
-
├── index.ts
|
|
842
|
-
├── cli/
|
|
843
|
-
│ └── create-program.ts
|
|
844
|
-
├── modules/
|
|
845
|
-
│ └── deploy/
|
|
846
|
-
│ ├── commands/
|
|
847
|
-
│ │ ├── configure.command.ts
|
|
848
|
-
│ │ └── build.command.ts
|
|
849
|
-
│ ├── config/
|
|
850
|
-
│ │ └── deployment-config.ts
|
|
851
|
-
│ └── services/
|
|
852
|
-
│ ├── docker.service.ts
|
|
853
|
-
│ └── jenkins.service.ts
|
|
854
|
-
└── shared/
|
|
855
|
-
├── git/
|
|
856
|
-
└── github/
|
|
1030
|
+
templates/jenkins/Jenkinsfile-Mobile-App
|
|
857
1031
|
```
|
|
858
1032
|
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
> A future feature should become a module, not another giant block inside deployment.
|
|
1033
|
+
Use that pipeline for the Jenkins mobile build job.
|
|
862
1034
|
|
|
863
|
-
|
|
1035
|
+
It declares two large file parameters:
|
|
864
1036
|
|
|
865
1037
|
```text
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
src/modules/server/
|
|
869
|
-
src/modules/secrets/
|
|
870
|
-
src/modules/diagnostics/
|
|
1038
|
+
SOURCE_BUNDLE
|
|
1039
|
+
ENV_FILE
|
|
871
1040
|
```
|
|
872
1041
|
|
|
873
|
-
|
|
1042
|
+
plus normal metadata/build parameters supplied automatically by the CLI.
|
|
874
1043
|
|
|
875
|
-
|
|
1044
|
+
> [!IMPORTANT]
|
|
1045
|
+
> If you replace an existing Pipeline Jenkinsfile with this one, run/save the job once if Jenkins needs an initial run to register the new parameter definitions. After that the CLI uses `buildWithParameters` automatically.
|
|
876
1046
|
|
|
877
|
-
###
|
|
1047
|
+
### Step 3 — Jenkins agent paths
|
|
878
1048
|
|
|
879
|
-
|
|
1049
|
+
Default paths in the template:
|
|
880
1050
|
|
|
881
|
-
|
|
1051
|
+
```text
|
|
1052
|
+
ANDROID_HOME=/opt/android-sdk
|
|
1053
|
+
ANDROID_SDK_ROOT=/opt/android-sdk
|
|
1054
|
+
MOBILE_BUILDER_HOME=/opt/mobile-builder
|
|
1055
|
+
```
|
|
1056
|
+
|
|
1057
|
+
Change the Jenkinsfile if your Jenkins agent uses different paths.
|
|
1058
|
+
|
|
1059
|
+
### Step 4 — configure the CLI
|
|
882
1060
|
|
|
883
1061
|
```bash
|
|
884
|
-
|
|
1062
|
+
indraq configure
|
|
885
1063
|
```
|
|
886
1064
|
|
|
887
|
-
|
|
1065
|
+
Configure the Jenkins connection once:
|
|
888
1066
|
|
|
889
|
-
```
|
|
890
|
-
|
|
1067
|
+
```text
|
|
1068
|
+
Jenkins
|
|
1069
|
+
→ Production
|
|
891
1070
|
```
|
|
892
1071
|
|
|
893
|
-
|
|
1072
|
+
Enter the Production Jenkins URL, username, and API token. **All mobile Development, Staging, and Production builds use this Production Jenkins connection.**
|
|
894
1073
|
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
1074
|
+
Then configure the mobile project:
|
|
1075
|
+
|
|
1076
|
+
```text
|
|
1077
|
+
Mobile App
|
|
1078
|
+
→ Project settings
|
|
1079
|
+
```
|
|
1080
|
+
|
|
1081
|
+
Set the app name and project type. On Jenkins, create/rename the mobile Pipeline job to exactly:
|
|
1082
|
+
|
|
1083
|
+
```text
|
|
1084
|
+
Mobile app Cli build
|
|
898
1085
|
```
|
|
899
1086
|
|
|
900
|
-
|
|
1087
|
+
The CLI checks this exact job on Production Jenkins before every mobile build.
|
|
1088
|
+
|
|
1089
|
+
### Live logs
|
|
1090
|
+
|
|
1091
|
+
Mobile source upload is triggered through Jenkins HTTP `buildWithParameters`, then IndraQ follows the queue item, discovers the build number, and streams Jenkins **`logText/progressiveHtml`** into VS Code. This is the same progressive console endpoint used by the classic Jenkins browser console, so Jenkins' hidden `ConsoleNote` metadata is rendered/removed before IndraQ converts the remaining HTML to readable terminal text.
|
|
901
1092
|
|
|
902
|
-
|
|
1093
|
+
If Jenkins fails, the CLI exits with failure, prints a short **Key Jenkins error lines** summary, and prints the direct Jenkins build URL. The complete live output remains above it.
|
|
903
1094
|
|
|
904
|
-
|
|
1095
|
+
---
|
|
1096
|
+
|
|
1097
|
+
## Configuration and secret storage
|
|
1098
|
+
|
|
1099
|
+
Project-local configuration:
|
|
905
1100
|
|
|
906
1101
|
```text
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
1102
|
+
<project>/.indraq/
|
|
1103
|
+
├── jenkins.json # shared — commit
|
|
1104
|
+
├── docker.json # shared — commit
|
|
1105
|
+
├── mobile.json # shared — commit
|
|
1106
|
+
├── jenkins.local.json # machine-local — ignored
|
|
1107
|
+
└── .gitignore
|
|
910
1108
|
```
|
|
911
1109
|
|
|
912
|
-
|
|
1110
|
+
The generated `.indraq/.gitignore` ignores **only machine-local files** such as `jenkins.local.json`. Shared project configuration is intentionally visible to Git.
|
|
913
1111
|
|
|
914
|
-
|
|
915
|
-
indraq
|
|
916
|
-
```
|
|
1112
|
+
> [!IMPORTANT]
|
|
1113
|
+
> Older IndraQ setups often ignored the whole `.indraq/` directory. v1.5.5 automatically appends safe re-include rules to the project root `.gitignore` so `jenkins.json`, `docker.json`, and `mobile.json` can be committed while `jenkins.local.json` remains ignored. Run `git status` after configuration and commit the three shared JSON files.
|
|
917
1114
|
|
|
918
|
-
|
|
1115
|
+
### `jenkins.json`
|
|
919
1116
|
|
|
920
|
-
|
|
1117
|
+
Stores non-secret Jenkins metadata:
|
|
921
1118
|
|
|
922
|
-
|
|
1119
|
+
```text
|
|
1120
|
+
Development Jenkins connection
|
|
1121
|
+
Production Jenkins connection
|
|
1122
|
+
```
|
|
923
1123
|
|
|
924
|
-
|
|
1124
|
+
Usage is fixed and easy to remember:
|
|
925
1125
|
|
|
926
1126
|
```text
|
|
927
|
-
|
|
1127
|
+
Docker DEV → Development Jenkins
|
|
1128
|
+
Docker PROD → Production Jenkins
|
|
1129
|
+
Mobile DEV / STAGING / PROD → Production Jenkins
|
|
928
1130
|
```
|
|
929
1131
|
|
|
930
|
-
Jenkins
|
|
1132
|
+
It stores Jenkins URL/transport only. It does **not** store Jenkins username, token, or password.
|
|
1133
|
+
|
|
1134
|
+
The local `jenkins.local.json` contains only the machine's credential binding ID and is ignored by Git. The actual username + API token/password remain under the user's home directory.
|
|
1135
|
+
|
|
1136
|
+
### `docker.json`
|
|
1137
|
+
|
|
1138
|
+
Stores:
|
|
931
1139
|
|
|
932
1140
|
```text
|
|
933
|
-
|
|
1141
|
+
GitHub / GHCR owner
|
|
1142
|
+
Development image + Dockerfile
|
|
1143
|
+
Production image + Dockerfile
|
|
934
1144
|
```
|
|
935
1145
|
|
|
936
|
-
|
|
1146
|
+
### `mobile.json`
|
|
937
1147
|
|
|
938
|
-
|
|
1148
|
+
Stores:
|
|
1149
|
+
|
|
1150
|
+
```text
|
|
1151
|
+
stable project ID
|
|
1152
|
+
app name
|
|
1153
|
+
project type
|
|
1154
|
+
Android Version + versionCode
|
|
1155
|
+
auto-increment switches for Version + versionCode
|
|
1156
|
+
Development output/profile
|
|
1157
|
+
Staging output/profile
|
|
1158
|
+
Production output/profile
|
|
1159
|
+
```
|
|
939
1160
|
|
|
940
|
-
|
|
1161
|
+
It does **not** store `.env` values.
|
|
941
1162
|
|
|
942
|
-
###
|
|
1163
|
+
### Jenkins secret location
|
|
943
1164
|
|
|
944
|
-
|
|
1165
|
+
Jenkins login credentials live outside the repository and never survive a Git clone:
|
|
945
1166
|
|
|
946
|
-
```
|
|
947
|
-
|
|
948
|
-
|
|
1167
|
+
```text
|
|
1168
|
+
~/.indraq/
|
|
1169
|
+
└── jenkins/
|
|
1170
|
+
└── <server-account-id>/
|
|
1171
|
+
├── jenkins-cli.jar
|
|
1172
|
+
└── auth
|
|
949
1173
|
```
|
|
950
1174
|
|
|
951
|
-
|
|
1175
|
+
Never commit this directory.
|
|
952
1176
|
|
|
953
|
-
|
|
1177
|
+
---
|
|
954
1178
|
|
|
955
|
-
|
|
1179
|
+
## Upgrade from v1.4 / v1.5
|
|
956
1180
|
|
|
957
|
-
|
|
1181
|
+
Update the public package:
|
|
958
1182
|
|
|
959
1183
|
```bash
|
|
960
|
-
|
|
1184
|
+
npm install -g indraq_cli@latest
|
|
961
1185
|
```
|
|
962
1186
|
|
|
963
|
-
|
|
1187
|
+
Verify:
|
|
964
1188
|
|
|
965
|
-
|
|
1189
|
+
```bash
|
|
1190
|
+
indraq --version
|
|
1191
|
+
```
|
|
966
1192
|
|
|
967
|
-
|
|
968
|
-
|
|
1193
|
+
Expected for this release:
|
|
1194
|
+
|
|
1195
|
+
```text
|
|
1196
|
+
1.5.3
|
|
969
1197
|
```
|
|
970
1198
|
|
|
971
|
-
|
|
1199
|
+
v1.5.5 automatically migrates older `.indraq/mobile.json` and Jenkins config layouts. Existing mobile environment/version settings are preserved. Older Jenkins username/server binding fields are split so only non-secret server metadata remains in tracked `jenkins.json`; the current machine binding is written to ignored `jenkins.local.json`.
|
|
972
1200
|
|
|
973
|
-
|
|
1201
|
+
For projects coming from pre-versioning releases, Android version settings initialize as:
|
|
974
1202
|
|
|
975
|
-
|
|
1203
|
+
```text
|
|
1204
|
+
Version: 0.1
|
|
1205
|
+
versionCode: 1
|
|
1206
|
+
Auto Version: ON
|
|
1207
|
+
Auto versionCode: ON
|
|
1208
|
+
```
|
|
976
1209
|
|
|
977
|
-
|
|
1210
|
+
Because v1.5 did not store the configured app name, open:
|
|
978
1211
|
|
|
979
|
-
|
|
1212
|
+
```text
|
|
1213
|
+
indraq configure
|
|
1214
|
+
→ Mobile App
|
|
1215
|
+
→ Project settings
|
|
1216
|
+
```
|
|
980
1217
|
|
|
981
|
-
|
|
1218
|
+
and confirm the app name once.
|
|
982
1219
|
|
|
983
|
-
|
|
1220
|
+
Docker/GHCR and Jenkins configuration remain compatible.
|
|
1221
|
+
|
|
1222
|
+
---
|
|
984
1223
|
|
|
985
|
-
|
|
1224
|
+
## Command reference
|
|
1225
|
+
|
|
1226
|
+
| Command | Purpose |
|
|
1227
|
+
|---|---|
|
|
1228
|
+
| `indraq --version` | Show installed CLI version |
|
|
1229
|
+
| `indraq --help` | Show commands |
|
|
1230
|
+
| `indraq doctor` | Diagnose runtime / PATH prerequisites |
|
|
1231
|
+
| `indraq configure` | Open configuration home |
|
|
1232
|
+
| `indraq deploy:dev` | Docker Development deployment |
|
|
1233
|
+
| `indraq deploy:development` | Alias of `deploy:dev` |
|
|
1234
|
+
| `indraq deploy:prod` | Docker Production deployment |
|
|
1235
|
+
| `indraq deploy:production` | Alias of `deploy:prod` |
|
|
1236
|
+
| `indraq build mobile:dev` | Mobile Development build |
|
|
1237
|
+
| `indraq build mobile:development` | Alias of `mobile:dev` |
|
|
1238
|
+
| `indraq build mobile:staging` | Mobile Staging build |
|
|
1239
|
+
| `indraq build mobile:prod` | Mobile Production build |
|
|
1240
|
+
| `indraq build mobile:production` | Alias of `mobile:prod` |
|
|
1241
|
+
|
|
1242
|
+
Mobile flags:
|
|
986
1243
|
|
|
987
|
-
|
|
1244
|
+
```text
|
|
1245
|
+
--output <dev-client|debug-apk|apk|aab>
|
|
1246
|
+
--profile <fast|clean|full-reset>
|
|
1247
|
+
--verbose
|
|
1248
|
+
--dry-run
|
|
1249
|
+
-y, --yes
|
|
1250
|
+
```
|
|
988
1251
|
|
|
989
|
-
|
|
1252
|
+
---
|
|
990
1253
|
|
|
991
|
-
|
|
1254
|
+
## Troubleshooting
|
|
992
1255
|
|
|
993
|
-
###
|
|
1256
|
+
### `Java is required for Jenkins CLI`
|
|
994
1257
|
|
|
995
|
-
|
|
1258
|
+
Check:
|
|
996
1259
|
|
|
997
1260
|
```bash
|
|
998
|
-
|
|
1261
|
+
java -version
|
|
999
1262
|
```
|
|
1000
1263
|
|
|
1001
|
-
|
|
1264
|
+
Install Java 21 and reopen VS Code.
|
|
1265
|
+
|
|
1266
|
+
---
|
|
1002
1267
|
|
|
1003
|
-
###
|
|
1268
|
+
### `tar is required`
|
|
1004
1269
|
|
|
1005
|
-
|
|
1270
|
+
Check:
|
|
1006
1271
|
|
|
1007
|
-
|
|
1272
|
+
```bash
|
|
1273
|
+
tar --version
|
|
1274
|
+
```
|
|
1008
1275
|
|
|
1009
|
-
|
|
1276
|
+
Modern Windows 10/11, macOS, and most Linux distributions already provide `tar`.
|
|
1010
1277
|
|
|
1011
|
-
|
|
1278
|
+
Ubuntu/Debian:
|
|
1012
1279
|
|
|
1013
|
-
|
|
1280
|
+
```bash
|
|
1281
|
+
sudo apt install -y tar
|
|
1282
|
+
```
|
|
1014
1283
|
|
|
1015
|
-
|
|
1284
|
+
---
|
|
1016
1285
|
|
|
1017
|
-
|
|
1286
|
+
### `You are not in a mobile project root`
|
|
1018
1287
|
|
|
1019
1288
|
Run:
|
|
1020
1289
|
|
|
1021
1290
|
```bash
|
|
1022
|
-
|
|
1291
|
+
ls
|
|
1023
1292
|
```
|
|
1024
1293
|
|
|
1025
|
-
|
|
1294
|
+
or on PowerShell:
|
|
1026
1295
|
|
|
1027
|
-
|
|
1296
|
+
```powershell
|
|
1297
|
+
Get-ChildItem
|
|
1298
|
+
```
|
|
1028
1299
|
|
|
1029
|
-
|
|
1300
|
+
The current directory must contain:
|
|
1301
|
+
|
|
1302
|
+
```text
|
|
1303
|
+
package.json
|
|
1304
|
+
```
|
|
1030
1305
|
|
|
1031
|
-
|
|
1306
|
+
For React Native CLI it must also contain:
|
|
1032
1307
|
|
|
1033
|
-
|
|
1308
|
+
```text
|
|
1309
|
+
android/
|
|
1310
|
+
android/gradlew
|
|
1311
|
+
```
|
|
1034
1312
|
|
|
1035
1313
|
---
|
|
1036
1314
|
|
|
1037
|
-
|
|
1315
|
+
### `expo-dev-client is not installed`
|
|
1038
1316
|
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
- [ ] First-time `indraq configure` completes successfully.
|
|
1047
|
-
- [ ] Running `indraq configure` again opens the selective settings menu instead of the full wizard.
|
|
1048
|
-
- [ ] Jenkins credentials pass the `who-am-i` check.
|
|
1049
|
-
- [ ] The correct GitHub personal account or organization is selected.
|
|
1050
|
-
- [ ] Development image name matches its Jenkins job name.
|
|
1051
|
-
- [ ] Production image name matches its Jenkins job name.
|
|
1052
|
-
- [ ] The project has the expected Dockerfile.
|
|
1053
|
-
- [ ] The Jenkins user has read/build permission.
|
|
1054
|
-
- [ ] GHCR push permission exists for the selected owner.
|
|
1055
|
-
- [ ] `indraq deploy:dev` can build, push, run Jenkins, and show logs.
|
|
1056
|
-
- [ ] Production is tested deliberately before relying on it for releases.
|
|
1317
|
+
For Expo Development Client:
|
|
1318
|
+
|
|
1319
|
+
```bash
|
|
1320
|
+
npx expo install expo-dev-client
|
|
1321
|
+
```
|
|
1322
|
+
|
|
1323
|
+
Then retry.
|
|
1057
1324
|
|
|
1058
1325
|
---
|
|
1059
1326
|
|
|
1060
|
-
|
|
1327
|
+
### `.env was not found`
|
|
1061
1328
|
|
|
1062
|
-
|
|
1329
|
+
Create:
|
|
1063
1330
|
|
|
1064
1331
|
```text
|
|
1065
|
-
|
|
1066
|
-
indraq db:migrate
|
|
1067
|
-
indraq server:health
|
|
1068
|
-
indraq server:deploy
|
|
1069
|
-
indraq docker:clean
|
|
1070
|
-
indraq secrets:check
|
|
1071
|
-
indraq diagnostics
|
|
1332
|
+
<project-root>/.env
|
|
1072
1333
|
```
|
|
1073
1334
|
|
|
1074
|
-
|
|
1335
|
+
Do not paste it into Jenkins.
|
|
1075
1336
|
|
|
1076
|
-
|
|
1337
|
+
---
|
|
1077
1338
|
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
```
|
|
1339
|
+
### Jenkins HTTP 400 / file parameter error
|
|
1340
|
+
|
|
1341
|
+
Make sure:
|
|
1342
|
+
|
|
1343
|
+
1. Jenkins **File Parameter** plugin is installed;
|
|
1344
|
+
2. the job uses `templates/jenkins/Jenkinsfile-Mobile-App` from v1.5.5;
|
|
1345
|
+
3. Jenkins has registered the parameters;
|
|
1346
|
+
4. the Jenkins job is named exactly `Mobile app Cli build`.
|
|
1087
1347
|
|
|
1088
1348
|
---
|
|
1089
1349
|
|
|
1090
|
-
|
|
1091
|
-
<img src="docs/assets/indraq-mark.png" alt="IndraQ" width="72" />
|
|
1092
|
-
</p>
|
|
1350
|
+
### Jenkins job not found
|
|
1093
1351
|
|
|
1094
|
-
|
|
1095
|
-
<strong>Built by IndraQ Innovations for engineering operations.</strong><br/>
|
|
1096
|
-
Make repetitive engineering work predictable, visible, and difficult to misuse.
|
|
1097
|
-
</p>
|
|
1352
|
+
For mobile, the job name is fixed. In Jenkins, create or rename the Pipeline to exactly:
|
|
1098
1353
|
|
|
1099
|
-
|
|
1354
|
+
```text
|
|
1355
|
+
Mobile app Cli build
|
|
1356
|
+
```
|
|
1100
1357
|
|
|
1101
|
-
|
|
1358
|
+
Then make sure `indraq configure → Jenkins → Production` points at that Jenkins controller and that this computer has valid Jenkins credentials.
|
|
1102
1359
|
|
|
1103
|
-
|
|
1360
|
+
For Docker, the Jenkins job name must match the configured image name.
|
|
1361
|
+
|
|
1362
|
+
---
|
|
1363
|
+
|
|
1364
|
+
### `indraq` opens another Windows file/application
|
|
1104
1365
|
|
|
1105
1366
|
Run:
|
|
1106
1367
|
|
|
1107
1368
|
```powershell
|
|
1108
1369
|
where.exe indraq
|
|
1370
|
+
indraq doctor
|
|
1109
1371
|
```
|
|
1110
1372
|
|
|
1111
|
-
The npm launcher should be the first
|
|
1373
|
+
The npm launcher should be the first `indraq` result.
|
|
1374
|
+
|
|
1375
|
+
---
|
|
1376
|
+
|
|
1377
|
+
### npm shows `EEXIST` for `indraq.ps1`
|
|
1378
|
+
|
|
1379
|
+
This usually means an old `npm link` launcher is still present.
|
|
1112
1380
|
|
|
1113
|
-
|
|
1381
|
+
Remove the old global development link/package, then reinstall:
|
|
1382
|
+
|
|
1383
|
+
```powershell
|
|
1384
|
+
npm unlink -g indraq_cli
|
|
1385
|
+
npm uninstall -g indraq_cli
|
|
1386
|
+
npm install -g indraq_cli
|
|
1387
|
+
```
|
|
1114
1388
|
|
|
1115
1389
|
---
|
|
1116
1390
|
|
|
1117
|
-
## Publishing and npm organization management
|
|
1118
1391
|
|
|
1119
|
-
|
|
1392
|
+
### `./gradlew: cannot execute: required file not found`
|
|
1120
1393
|
|
|
1121
|
-
|
|
1394
|
+
This normally means the mobile source snapshot came from Windows and `android/gradlew` contains CRLF line endings. IndraQ normalizes the wrapper automatically on Jenkins before the build and invokes it through Bash.
|
|
1122
1395
|
|
|
1123
|
-
The
|
|
1396
|
+
The Jenkins server provides the Android toolchain:
|
|
1124
1397
|
|
|
1125
1398
|
```text
|
|
1126
|
-
|
|
1399
|
+
Java → Jenkins server
|
|
1400
|
+
ANDROID_HOME → /opt/android-sdk
|
|
1401
|
+
Android NDKs → /opt/android-sdk/ndk/*
|
|
1402
|
+
Shared Gradle cache → $HOME/.gradle (normally /var/jenkins_home/.gradle)
|
|
1403
|
+
Preferred Gradle → exact cached wrapper distribution
|
|
1404
|
+
Server fallback → installed Gradle when it is the same major version
|
|
1405
|
+
Final fallback → project wrapper with 120-second download timeout
|
|
1127
1406
|
```
|
|
1128
1407
|
|
|
1129
|
-
|
|
1408
|
+
This restores the shared Gradle-cache behavior used by the earlier Git-checkout mobile pipeline. `FULL_RESET` deliberately preserves the server's `$HOME/.gradle` cache.
|
|
1409
|
+
|
|
1410
|
+
### Gradle wrapper tries to download and times out
|
|
1411
|
+
|
|
1412
|
+
v1.5.5 first checks the Jenkins server's shared wrapper cache. If the requested distribution is already cached, the wrapper uses it without internet access. If there is no exact cached wrapper but Jenkins has a system Gradle from the same major version, IndraQ reuses the server Gradle. Only when neither option exists does the project wrapper attempt a download, with `networkTimeout=120000` applied to the temporary Jenkins copy of `gradle-wrapper.properties`.
|
|
1413
|
+
|
|
1414
|
+
If the Jenkins machine has neither a compatible installed Gradle nor the requested wrapper cached and it has no outbound access to Gradle distributions, install/cache the required Gradle version on that Jenkins machine once.
|
|
1415
|
+
|
|
1416
|
+
### Jenkins logs contain `ha:////...`, look diagonal, or are unreadable in VS Code
|
|
1417
|
+
|
|
1418
|
+
The `ha:////...` strings are Jenkins `ConsoleNote` annotations embedded in raw `progressiveText`. The Jenkins browser UI renders/hides those annotations. v1.5.5 now consumes Jenkins `logText/progressiveHtml`—the same progressive endpoint used by the classic web console—and converts the rendered output back to plain terminal text.
|
|
1419
|
+
|
|
1420
|
+
The CLI also normalizes line endings and strips terminal control sequences. Upgrade to v1.5.5 or newer if you see raw `ha:////...` payloads or staircase/right-shifted output.
|
|
1421
|
+
|
|
1422
|
+
---
|
|
1423
|
+
|
|
1424
|
+
## Frequently asked questions
|
|
1425
|
+
|
|
1426
|
+
### Do I install IndraQ CLI in every project?
|
|
1427
|
+
|
|
1428
|
+
No. Install globally once per computer:
|
|
1130
1429
|
|
|
1131
1430
|
```bash
|
|
1132
1431
|
npm install -g indraq_cli
|
|
1133
1432
|
```
|
|
1134
1433
|
|
|
1135
|
-
|
|
1434
|
+
Each project only gets its own `.indraq/` configuration.
|
|
1435
|
+
|
|
1436
|
+
### Does the mobile build require me to push my latest code to Git first?
|
|
1437
|
+
|
|
1438
|
+
No. The mobile builder snapshots the files currently on disk. Uncommitted changes are included.
|
|
1439
|
+
|
|
1440
|
+
### Does Jenkins need access to my GitHub repository for mobile builds?
|
|
1441
|
+
|
|
1442
|
+
Not for the v1.5 source-upload pipeline. The CLI sends the source snapshot directly.
|
|
1443
|
+
|
|
1444
|
+
### Does Docker deployment still use GitHub/GHCR?
|
|
1445
|
+
|
|
1446
|
+
Yes. Docker builds continue to push images to GHCR and then run the configured Jenkins deployment job.
|
|
1447
|
+
|
|
1448
|
+
### Can Staging and Production have different mobile outputs?
|
|
1449
|
+
|
|
1450
|
+
Yes. Example:
|
|
1451
|
+
|
|
1452
|
+
```text
|
|
1453
|
+
Staging: Release APK / FAST
|
|
1454
|
+
Production: Release AAB / CLEAN
|
|
1455
|
+
```
|
|
1456
|
+
|
|
1457
|
+
### Can I build an APK once without changing my saved Production AAB default?
|
|
1458
|
+
|
|
1459
|
+
Yes:
|
|
1136
1460
|
|
|
1137
1461
|
```bash
|
|
1138
|
-
indraq
|
|
1462
|
+
indraq build mobile:prod --output apk
|
|
1139
1463
|
```
|
|
1140
1464
|
|
|
1141
|
-
The
|
|
1465
|
+
The saved default remains unchanged.
|
|
1142
1466
|
|
|
1143
|
-
###
|
|
1467
|
+
### Does IndraQ save `.env`?
|
|
1144
1468
|
|
|
1145
|
-
|
|
1469
|
+
No. It reads the root `.env` at build time and uploads it separately when required.
|
|
1146
1470
|
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1471
|
+
### When does Version/versionCode increment?
|
|
1472
|
+
|
|
1473
|
+
After a **successful** Jenkins mobile build. The build uses the currently saved values first, then enabled counters advance for the next build. Failed/cancelled builds do not consume values.
|
|
1474
|
+
|
|
1475
|
+
### Can I turn auto-increment off?
|
|
1476
|
+
|
|
1477
|
+
Yes:
|
|
1478
|
+
|
|
1479
|
+
```text
|
|
1480
|
+
indraq configure
|
|
1481
|
+
→ Mobile App
|
|
1482
|
+
→ Version & versionCode
|
|
1151
1483
|
```
|
|
1152
1484
|
|
|
1153
|
-
|
|
1485
|
+
Version and versionCode have separate switches. When either is OFF, the build continues but IndraQ prints a reminder warning.
|
|
1154
1486
|
|
|
1155
|
-
|
|
1487
|
+
### What timezone is used in APK/AAB filenames?
|
|
1156
1488
|
|
|
1157
|
-
|
|
1158
|
-
|
|
1489
|
+
Always `Asia/Kolkata` (IST), using `YYYY-MM-DD_HHmm`.
|
|
1490
|
+
|
|
1491
|
+
### Which Jenkins does Mobile use?
|
|
1492
|
+
|
|
1493
|
+
**Production Jenkins only.** This is intentional.
|
|
1494
|
+
|
|
1495
|
+
```text
|
|
1496
|
+
mobile:dev → Production Jenkins
|
|
1497
|
+
mobile:staging → Production Jenkins
|
|
1498
|
+
mobile:prod → Production Jenkins
|
|
1159
1499
|
```
|
|
1160
1500
|
|
|
1161
|
-
|
|
1501
|
+
The mobile Development/Staging/Production selection controls the app build environment and allowed output. It does not select a Jenkins controller.
|
|
1162
1502
|
|
|
1163
|
-
|
|
1164
|
-
|
|
1503
|
+
### Why can Docker use Development and Production Jenkins?
|
|
1504
|
+
|
|
1505
|
+
Docker deployments represent infrastructure environments. `indraq deploy:dev` can deploy through Development Jenkins while `indraq deploy:prod` can use Production Jenkins. Mobile builds are build jobs rather than Docker environment deployments, so they always use the single Production Jenkins path.
|
|
1506
|
+
|
|
1507
|
+
---
|
|
1508
|
+
|
|
1509
|
+
## Project architecture
|
|
1510
|
+
|
|
1511
|
+
```text
|
|
1512
|
+
src/
|
|
1513
|
+
├── cli/
|
|
1514
|
+
│ ├── create-program.ts
|
|
1515
|
+
│ └── doctor.command.ts
|
|
1516
|
+
│
|
|
1517
|
+
├── modules/
|
|
1518
|
+
│ ├── configure/
|
|
1519
|
+
│ │ └── configure.command.ts
|
|
1520
|
+
│ │
|
|
1521
|
+
│ ├── deploy/
|
|
1522
|
+
│ │ ├── commands/
|
|
1523
|
+
│ │ ├── config/
|
|
1524
|
+
│ │ └── services/
|
|
1525
|
+
│ │
|
|
1526
|
+
│ └── mobile/
|
|
1527
|
+
│ ├── commands/
|
|
1528
|
+
│ │ ├── configure-mobile.command.ts
|
|
1529
|
+
│ │ └── build-mobile.command.ts
|
|
1530
|
+
│ ├── config/
|
|
1531
|
+
│ │ └── mobile-config.ts
|
|
1532
|
+
│ └── services/
|
|
1533
|
+
│ ├── project.service.ts
|
|
1534
|
+
│ ├── source-bundle.service.ts
|
|
1535
|
+
│ └── jenkins-mobile.service.ts
|
|
1536
|
+
│
|
|
1537
|
+
└── shared/
|
|
1538
|
+
├── config/
|
|
1539
|
+
├── git/
|
|
1540
|
+
├── github/
|
|
1541
|
+
├── jenkins/
|
|
1542
|
+
└── runtime/
|
|
1543
|
+
|
|
1544
|
+
templates/
|
|
1545
|
+
└── jenkins/
|
|
1546
|
+
└── Jenkinsfile-Mobile-App
|
|
1165
1547
|
```
|
|
1166
1548
|
|
|
1167
|
-
|
|
1549
|
+
This is intentional. Future modules can be added without dumping unrelated logic into the deployment module.
|
|
1168
1550
|
|
|
1169
|
-
|
|
1551
|
+
Possible future commands:
|
|
1170
1552
|
|
|
1171
|
-
|
|
1553
|
+
```text
|
|
1554
|
+
indraq database ...
|
|
1555
|
+
indraq backup ...
|
|
1556
|
+
indraq server ...
|
|
1557
|
+
indraq secrets ...
|
|
1558
|
+
indraq diagnostics ...
|
|
1559
|
+
```
|
|
1172
1560
|
|
|
1173
|
-
|
|
1561
|
+
---
|
|
1174
1562
|
|
|
1175
|
-
|
|
1176
|
-
2. Open **Teams**.
|
|
1177
|
-
3. Open the team that should maintain the CLI (for example, `developers`).
|
|
1178
|
-
4. Open **Packages**.
|
|
1179
|
-
5. Choose **Add Existing Package**.
|
|
1180
|
-
6. Select `indraq_cli`.
|
|
1181
|
-
7. Give the team **read/write** access if that team should be able to publish future versions.
|
|
1563
|
+
## Final checklist
|
|
1182
1564
|
|
|
1183
|
-
|
|
1565
|
+
### Developer machine
|
|
1566
|
+
|
|
1567
|
+
- [ ] Node.js 22+ installed
|
|
1568
|
+
- [ ] npm installed
|
|
1569
|
+
- [ ] Java available with `java -version`
|
|
1570
|
+
- [ ] Git installed
|
|
1571
|
+
- [ ] `tar` available
|
|
1572
|
+
- [ ] Docker installed if using Docker deployment
|
|
1573
|
+
- [ ] `npm install -g indraq_cli` completed
|
|
1574
|
+
- [ ] `indraq doctor` passes
|
|
1575
|
+
|
|
1576
|
+
### Docker deployment project
|
|
1577
|
+
|
|
1578
|
+
- [ ] `indraq configure → Jenkins → Development/Production`
|
|
1579
|
+
- [ ] `indraq configure → Docker / GHCR`
|
|
1580
|
+
- [ ] Dockerfile exists
|
|
1581
|
+
- [ ] GitHub/GHCR authentication works
|
|
1582
|
+
- [ ] Jenkins deployment job names match image names
|
|
1583
|
+
|
|
1584
|
+
### Mobile project
|
|
1585
|
+
|
|
1586
|
+
- [ ] command is run from package.json root
|
|
1587
|
+
- [ ] Production Jenkins connection configured (`indraq configure → Jenkins → Production`)
|
|
1588
|
+
- [ ] Jenkins File Parameter plugin installed
|
|
1589
|
+
- [ ] Jenkins job uses the v1.5.5 mobile Jenkinsfile
|
|
1590
|
+
- [ ] Mobile project type configured
|
|
1591
|
+
- [ ] Jenkins job is named exactly `Mobile app Cli build` and exists on Production Jenkins
|
|
1592
|
+
- [ ] Development / Staging / Production defaults configured as needed
|
|
1593
|
+
- [ ] root `.env` exists for APK/AAB/debug builds
|
|
1594
|
+
- [ ] Expo Development Client has `expo-dev-client`
|
|
1595
|
+
- [ ] `.indraq/mobile.json` is not ignored and is committed so Version/versionCode survive across developers
|
|
1184
1596
|
|
|
1185
1597
|
---
|
|
1186
1598
|
|
|
1187
1599
|
## License
|
|
1188
1600
|
|
|
1189
|
-
|
|
1601
|
+
MIT License. See [`LICENSE`](LICENSE).
|
|
1602
|
+
|
|
1603
|
+
<p align="center">
|
|
1604
|
+
<img src="docs/assets/indraq-mark.png" alt="IndraQ" width="72" />
|
|
1605
|
+
</p>
|
|
1606
|
+
|
|
1607
|
+
<p align="center">
|
|
1608
|
+
<strong>Built and maintained by IndraQ Innovations.</strong>
|
|
1609
|
+
</p>
|
|
1610
|
+
|
|
1611
|
+
|
|
1612
|
+
### Jenkins mobile upload returns HTTP 403
|
|
1613
|
+
|
|
1614
|
+
IndraQ CLI v1.5.5 preserves the Jenkins web-session cookie together with the CSRF crumb when a Jenkins username/password is used. Jenkins ties crumbs to the session that created them, so both values must travel together. API-token authentication is exempt from the crumb requirement.
|
|
1190
1615
|
|
|
1191
|
-
|
|
1616
|
+
If a mobile build still returns HTTP 403, v1.5.5 prints Jenkins' own response message. A permission error means the configured Jenkins user needs **Job/Read** and **Job/Build** on the `Mobile app Cli build` job. A CSRF error means the Jenkins controller or reverse proxy is rejecting the crumb/session and the printed Jenkins message should be used for diagnosis.
|