@otwld/nx-argo 0.0.12 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +4 -3
- package/package.json +3 -3
- package/src/generators/stack-project/stack-project.js +5 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
## Unreleased
|
|
2
2
|
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
- Make stable staging Applications descriptor-driven for generated stack projects.
|
|
6
|
+
|
|
3
7
|
### Breaking changes
|
|
4
8
|
|
|
5
9
|
- Generate and validate `values-preview.yaml` as the only pull-request preview
|
|
6
10
|
values path.
|
|
11
|
+
- Stop generating `application-staging.yaml`; stable staging Applications are
|
|
12
|
+
generated from repository delivery descriptors.
|
|
13
|
+
- Stop generating the `validate-application-staging` target for stack projects.
|
|
7
14
|
|
|
8
15
|
## 0.0.8 (2026-08-12)
|
|
9
16
|
|
package/README.md
CHANGED
|
@@ -20,9 +20,10 @@ pnpm exec nx g @otwld/nx-argo:preview-project web \
|
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
`stack-project` creates one complete boundary at `gitops/<stack>` and registers
|
|
23
|
-
its Argo resources in the repository-root `kustomization.yaml`. It writes
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
its Argo resources in the repository-root `kustomization.yaml`. It writes the
|
|
24
|
+
production Application, stable staging/production/preview values, and an
|
|
25
|
+
optional GitHub pull-request ApplicationSet. Add a `delivery.yaml` descriptor
|
|
26
|
+
for the repository-owned stable staging ApplicationSet. The stack project declares
|
|
26
27
|
the chart and every mapped application as `implicitDependencies` and records the
|
|
27
28
|
delivery contract consumed by `@otwld/nx-delivery`. It also declares the four
|
|
28
29
|
`delivery:stack-*` targets; install `@otwld/nx-delivery` before invoking them:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@otwld/nx-argo",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"exports": {
|
|
@@ -27,6 +27,6 @@
|
|
|
27
27
|
"publishConfig": {
|
|
28
28
|
"access": "public"
|
|
29
29
|
},
|
|
30
|
-
"
|
|
31
|
-
"
|
|
30
|
+
"executors": "./executors.json",
|
|
31
|
+
"generators": "./generators.json"
|
|
32
32
|
}
|
|
@@ -107,12 +107,10 @@ function updateKustomization(tree, generatedFiles) {
|
|
|
107
107
|
/** Builds all Argo manifests and stable value files owned by the boundary. */
|
|
108
108
|
function getGeneratedFiles(directory, stack, chartPath, namespacePrefix, repository, values, applications, options) {
|
|
109
109
|
const applicationFiles = {
|
|
110
|
-
staging: (0, devkit_1.joinPathFragments)(directory, 'application-staging.yaml'),
|
|
111
110
|
production: (0, devkit_1.joinPathFragments)(directory, 'application-production.yaml'),
|
|
112
111
|
};
|
|
113
112
|
const files = {
|
|
114
|
-
[applicationFiles.
|
|
115
|
-
[applicationFiles.production]: (0, yaml_1.stringify)(createApplication(stack, 'production', chartPath, namespacePrefix, repository, values.production, directory, options.argoProject), { lineWidth: 0 }),
|
|
113
|
+
[applicationFiles.production]: (0, yaml_1.stringify)(createApplication(stack, chartPath, namespacePrefix, repository, values.production, directory, options.argoProject), { lineWidth: 0 }),
|
|
116
114
|
};
|
|
117
115
|
for (const environment of ['staging', 'production', 'preview']) {
|
|
118
116
|
files[(0, devkit_1.joinPathFragments)(directory, values[environment])] = (0, yaml_1.stringify)(createValues(applications, environment), { lineWidth: 0 });
|
|
@@ -124,8 +122,8 @@ function getGeneratedFiles(directory, stack, chartPath, namespacePrefix, reposit
|
|
|
124
122
|
}
|
|
125
123
|
return { applicationFiles, applicationSetFile, files };
|
|
126
124
|
}
|
|
127
|
-
/** Creates
|
|
128
|
-
function createApplication(stack,
|
|
125
|
+
/** Creates the stable Argo CD production Application. */
|
|
126
|
+
function createApplication(stack, chartPath, namespacePrefix, repository, valuesFile, directory, argoProject = 'default') {
|
|
129
127
|
const repositoryUrl = repository.url;
|
|
130
128
|
const repositoryRevision = repository.revision;
|
|
131
129
|
const gitopsValuesPath = (0, devkit_1.joinPathFragments)(directory, valuesFile);
|
|
@@ -133,7 +131,7 @@ function createApplication(stack, environment, chartPath, namespacePrefix, repos
|
|
|
133
131
|
apiVersion: 'argoproj.io/v1alpha1',
|
|
134
132
|
kind: 'Application',
|
|
135
133
|
metadata: {
|
|
136
|
-
name: `${stack}
|
|
134
|
+
name: `${stack}-production`,
|
|
137
135
|
namespace: 'argocd',
|
|
138
136
|
},
|
|
139
137
|
spec: {
|
|
@@ -153,7 +151,7 @@ function createApplication(stack, environment, chartPath, namespacePrefix, repos
|
|
|
153
151
|
],
|
|
154
152
|
destination: {
|
|
155
153
|
server: 'https://kubernetes.default.svc',
|
|
156
|
-
namespace: `${namespacePrefix}
|
|
154
|
+
namespace: `${namespacePrefix}-production`,
|
|
157
155
|
},
|
|
158
156
|
syncPolicy: {
|
|
159
157
|
syncOptions: ['CreateNamespace=true'],
|
|
@@ -275,10 +273,6 @@ function createValues(applications, environment) {
|
|
|
275
273
|
/** Declares Argo validation targets for generated manifests. */
|
|
276
274
|
function getValidationTargets(files, options) {
|
|
277
275
|
const targets = {
|
|
278
|
-
'validate-application-staging': {
|
|
279
|
-
executor: '@otwld/nx-argo:validate-application',
|
|
280
|
-
options: { file: relativeToProject(files.applicationFiles.staging) },
|
|
281
|
-
},
|
|
282
276
|
'validate-application-production': {
|
|
283
277
|
executor: '@otwld/nx-argo:validate-application',
|
|
284
278
|
options: { file: relativeToProject(files.applicationFiles.production) },
|