@catladder/pipeline 0.0.0-next-6ea918c7 → 0.0.0-next-e3ccf7d4
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/dist/backends/github/createGithubJobs.js +33 -6
- package/dist/constants.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/examples/__snapshots__/automatic-releases.test.ts.snap +30 -2
- package/examples/__snapshots__/cloud-run-execute-script-on-deploy.test.ts.snap +30 -2
- package/examples/__snapshots__/cloud-run-existing-image.test.ts.snap +2 -2
- package/examples/__snapshots__/cloud-run-health-check-defaults.test.ts.snap +30 -2
- package/examples/__snapshots__/cloud-run-health-check-only-startup.test.ts.snap +30 -2
- package/examples/__snapshots__/cloud-run-health-check.test.ts.snap +30 -2
- package/examples/__snapshots__/cloud-run-http2.test.ts.snap +30 -2
- package/examples/__snapshots__/cloud-run-llama.test.ts.snap +2 -2
- package/examples/__snapshots__/cloud-run-memory-limit.test.ts.snap +30 -2
- package/examples/__snapshots__/cloud-run-meteor-with-worker.test.ts.snap +30 -2
- package/examples/__snapshots__/cloud-run-n8n.test.ts.snap +2 -2
- package/examples/__snapshots__/cloud-run-nextjs.test.ts.snap +30 -2
- package/examples/__snapshots__/cloud-run-no-cpu-throttling.test.ts.snap +30 -2
- package/examples/__snapshots__/cloud-run-no-service.test.ts.snap +30 -2
- package/examples/__snapshots__/cloud-run-non-public.test.ts.snap +30 -2
- package/examples/__snapshots__/cloud-run-post-stop-job.test.ts.snap +30 -2
- package/examples/__snapshots__/cloud-run-service-custom-vpc-connector.test.ts.snap +30 -2
- package/examples/__snapshots__/cloud-run-service-custom-vpc.test.ts.snap +30 -2
- package/examples/__snapshots__/cloud-run-service-gen2.test.ts.snap +30 -2
- package/examples/__snapshots__/cloud-run-service-increase-timout.test.ts.snap +30 -2
- package/examples/__snapshots__/cloud-run-service-with-volumes.test.ts.snap +30 -2
- package/examples/__snapshots__/cloud-run-session-affinity.test.ts.snap +30 -2
- package/examples/__snapshots__/cloud-run-storybook.test.ts.snap +18 -2
- package/examples/__snapshots__/cloud-run-with-agents.test.ts.snap +30 -2
- package/examples/__snapshots__/cloud-run-with-gpu.test.ts.snap +30 -2
- package/examples/__snapshots__/cloud-run-with-ngnix.test.ts.snap +30 -2
- package/examples/__snapshots__/cloud-run-with-sql-legacy-jobs.test.ts.snap +30 -2
- package/examples/__snapshots__/cloud-run-with-sql-multiple-dbs.test.ts.snap +90 -6
- package/examples/__snapshots__/cloud-run-with-sql-reuse-db.test.ts.snap +60 -4
- package/examples/__snapshots__/cloud-run-with-sql.test.ts.snap +30 -2
- package/examples/__snapshots__/cloud-run-with-worker.test.ts.snap +30 -2
- package/examples/__snapshots__/cloud-run-worker-pool.test.ts.snap +30 -2
- package/examples/__snapshots__/custom-build-job-with-tests.test.ts.snap +30 -2
- package/examples/__snapshots__/custom-build-job.test.ts.snap +18 -2
- package/examples/__snapshots__/custom-deploy.test.ts.snap +30 -2
- package/examples/__snapshots__/custom-docker-file.test.ts.snap +30 -2
- package/examples/__snapshots__/custom-verify-job.test.ts.snap +31 -3
- package/examples/__snapshots__/git-submodule.test.ts.snap +30 -2
- package/examples/__snapshots__/kubernetes-application-customization.test.ts.snap +3 -3
- package/examples/__snapshots__/kubernetes-with-cloud-sql.test.ts.snap +31 -3
- package/examples/__snapshots__/kubernetes-with-jobs.test.ts.snap +6 -6
- package/examples/__snapshots__/kubernetes-with-mongodb.test.ts.snap +31 -3
- package/examples/__snapshots__/local-dot-env.test.ts.snap +30 -2
- package/examples/__snapshots__/meteor-kubernetes.test.ts.snap +31 -3
- package/examples/__snapshots__/multiline-var.test.ts.snap +63 -7
- package/examples/__snapshots__/native-app.test.ts.snap +51 -3
- package/examples/__snapshots__/node-build-with-custom-image.test.ts.snap +30 -2
- package/examples/__snapshots__/node-build-with-docker-additions.test.ts.snap +30 -2
- package/examples/__snapshots__/override-secrets.test.ts.snap +30 -2
- package/examples/__snapshots__/pipelines-config.test.ts.snap +30 -2
- package/examples/__snapshots__/rails-k8s-with-worker.test.ts.snap +23 -3
- package/examples/__snapshots__/referencing-other-vars.test.ts.snap +71 -7
- package/examples/__snapshots__/wait-for-other-deploy.test.ts.snap +2 -2
- package/examples/__snapshots__/workspace-api-www-turbo-cache.test.ts.snap +28 -4
- package/examples/__snapshots__/workspace-api-www.test.ts.snap +28 -4
- package/package.json +1 -1
- package/src/backends/github/createGithubJobs.ts +37 -11
|
@@ -283,6 +283,37 @@ var makeGithubJob = function (context, job, allJobs, uploadProviderIds, images,
|
|
|
283
283
|
}))), isComponent ? getSecretsEnv(context, secretKinds) : {}), getReferencedSecretsEnv(runScript, secretKinds)), {
|
|
284
284
|
CL_JOB_IMAGE: image !== null && image !== void 0 ? image : "runner"
|
|
285
285
|
});
|
|
286
|
+
/**
|
|
287
|
+
* the github environment of the job — serving two purposes:
|
|
288
|
+
* deployment tracking on deploy jobs, and access to environment
|
|
289
|
+
* secrets (the repo-level cap of 100 secrets doesn't scale to
|
|
290
|
+
* multiple envs). Names are keyed by env NAME, never env type: an
|
|
291
|
+
* app can have several envs of the same type.
|
|
292
|
+
*
|
|
293
|
+
* - deploy jobs: `<env>-<component>` — static (unlike the former
|
|
294
|
+
* per-PR review names), so environment secrets can attach, and
|
|
295
|
+
* each component keeps its own deployment badge/url in the
|
|
296
|
+
* github ui. For review, PRs share the component's environment:
|
|
297
|
+
* a newer PR's deploy marks the previous one Inactive (the badge,
|
|
298
|
+
* not the app) — the price of a static name.
|
|
299
|
+
* - other jobs referencing secrets join the shared `<env>`
|
|
300
|
+
* environment — deliberately NOT the per-component one, whose
|
|
301
|
+
* Active deploy badge their deployment records would displace.
|
|
302
|
+
* NOTE: build-time and deploy-time vars are not differentiated
|
|
303
|
+
* yet, so this environment holds roughly ALL of the env's
|
|
304
|
+
* secrets (the build's dotenv references every component).
|
|
305
|
+
* - jobs without secret references get no environment
|
|
306
|
+
*/
|
|
307
|
+
var referencesSecrets = Object.values(env).some(function (value) {
|
|
308
|
+
return typeof value === "string" && (value.includes("${{ secrets.") || value.includes("${{ vars."));
|
|
309
|
+
});
|
|
310
|
+
var githubEnvironment = job.environment && isComponent ? __assign({
|
|
311
|
+
name: "".concat(context.env, "-").concat(context.name)
|
|
312
|
+
}, createsJobEnv ? {
|
|
313
|
+
url: "${{ steps.main.outputs.url }}"
|
|
314
|
+
} : {}) : referencesSecrets ? {
|
|
315
|
+
name: context.env
|
|
316
|
+
} : undefined;
|
|
286
317
|
var githubJob = __assign(__assign(__assign(__assign(__assign({
|
|
287
318
|
name: githubJobName(context, job.name),
|
|
288
319
|
"runs-on": "ubuntu-latest"
|
|
@@ -301,12 +332,8 @@ var makeGithubJob = function (context, job, allJobs, uploadProviderIds, images,
|
|
|
301
332
|
} : {})
|
|
302
333
|
} : {}), Object.keys(services).length > 0 ? {
|
|
303
334
|
services: services
|
|
304
|
-
} : {}),
|
|
305
|
-
environment:
|
|
306
|
-
name: context.environment.envType === "review" ? "review-pr${{ github.event.number }}-".concat(context.name) : "".concat(context.env, "-").concat(context.name)
|
|
307
|
-
}, createsJobEnv ? {
|
|
308
|
-
url: "${{ steps.main.outputs.url }}"
|
|
309
|
-
} : {})
|
|
335
|
+
} : {}), githubEnvironment ? {
|
|
336
|
+
environment: githubEnvironment
|
|
310
337
|
} : {}), {
|
|
311
338
|
env: env,
|
|
312
339
|
steps: __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(skipCheckout ? [] : [{
|
package/dist/constants.js
CHANGED
|
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
|
|
7
|
-
exports.PIPELINE_IMAGE_TAG = "next-
|
|
7
|
+
exports.PIPELINE_IMAGE_TAG = "next-e3ccf7d4" || "latest";
|
|
8
8
|
exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || "git.panter.ch:5001/catladder/catladder";
|