@certik/skynet 0.16.3 → 0.16.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/deploy.js +3 -15
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/deploy.js
CHANGED
|
@@ -67,7 +67,7 @@ const genConfig = ({
|
|
|
67
67
|
cron
|
|
68
68
|
? `# Triggers periodically
|
|
69
69
|
periodic {
|
|
70
|
-
|
|
70
|
+
crons = ["${cron}"]
|
|
71
71
|
prohibit_overlap = true
|
|
72
72
|
}`
|
|
73
73
|
: ""
|
|
@@ -156,8 +156,10 @@ EOH
|
|
|
156
156
|
|
|
157
157
|
# It is possible to set environment variables which will be
|
|
158
158
|
# available to the task when it runs.
|
|
159
|
+
# always update environment so that new deployment always triggers
|
|
159
160
|
env {
|
|
160
161
|
SKYNET_ENVIRONMENT="${isProduction ? "prd" : "dev"}"
|
|
162
|
+
SKYNET_DEPLOYED_AT="${new Date().toISOString()}"
|
|
161
163
|
}
|
|
162
164
|
|
|
163
165
|
kill_timeout = "${killTimeout || "60s"}"
|
|
@@ -358,13 +360,6 @@ function createModeDeploy({
|
|
|
358
360
|
delta: { cpu: deltaCpu, mem: deltaMem, killTimeout: deltaKillTimeout },
|
|
359
361
|
};
|
|
360
362
|
|
|
361
|
-
// added an always changing env var
|
|
362
|
-
// to ensure new deployment always triggers
|
|
363
|
-
env = {
|
|
364
|
-
...env,
|
|
365
|
-
SKYNET_DEPLOYED_AT: new Date().toISOString(),
|
|
366
|
-
};
|
|
367
|
-
|
|
368
363
|
// by default use delta cpu/mem settings
|
|
369
364
|
const { cpu, mem, killTimeout } = modeResouces[mode] || modeResouces.delta;
|
|
370
365
|
|
|
@@ -549,13 +544,6 @@ function createDeploy({
|
|
|
549
544
|
cron = cmdSchedule;
|
|
550
545
|
}
|
|
551
546
|
|
|
552
|
-
// added an always changing env var
|
|
553
|
-
// to ensure new deployment always triggers
|
|
554
|
-
env = {
|
|
555
|
-
...env,
|
|
556
|
-
SKYNET_DEPLOYED_AT: new Date().toISOString(),
|
|
557
|
-
};
|
|
558
|
-
|
|
559
547
|
const nomadJobDefinition = genConfig({
|
|
560
548
|
jobName,
|
|
561
549
|
cron: INTERVAL_ALIASES[cron] || cron,
|