@simplysf/simply-cicd 0.15.2 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +127 -38
- package/lib/commands/simply/cicd/build/lwc-jest.d.ts +2 -1
- package/lib/commands/simply/cicd/build/lwc-jest.js +8 -3
- package/lib/commands/simply/cicd/build/lwc-jest.js.map +1 -1
- package/lib/commands/simply/cicd/notify/build.d.ts +28 -0
- package/lib/commands/simply/cicd/notify/build.js +136 -0
- package/lib/commands/simply/cicd/notify/build.js.map +1 -0
- package/lib/common/build/lwcJest.d.ts +17 -1
- package/lib/common/build/lwcJest.js +98 -8
- package/lib/common/build/lwcJest.js.map +1 -1
- package/lib/common/notify/buildNotification.d.ts +53 -0
- package/lib/common/notify/buildNotification.js +176 -0
- package/lib/common/notify/buildNotification.js.map +1 -0
- package/lib/common/notify/templates.d.ts +2 -0
- package/lib/common/notify/templates.js +21 -0
- package/lib/common/notify/templates.js.map +1 -1
- package/messages/simply.cicd.build.lwc-jest.md +9 -1
- package/messages/simply.cicd.notify.build.md +83 -0
- package/messages/simply.cicd.notify.teams.md +1 -1
- package/oclif.manifest.json +1499 -1306
- package/package.json +2 -2
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Send a build job's failure, or the package version it created, to Microsoft Teams, with issue-tracker integration.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Run in every build job's `after_script`. Which card it posts depends on `--ci-job-status`:
|
|
8
|
+
|
|
9
|
+
- `failed`: a failure card with the job, stage, branch, and pipeline, whichever build job failed.
|
|
10
|
+
- `success`: a package version card, but only when the job created a package version. The card shows the new version tag, its `04t` ID, and the issue references in the commits since the previous version tag. Every other successful job sends nothing.
|
|
11
|
+
- Anything else (e.g. `canceled`): nothing.
|
|
12
|
+
|
|
13
|
+
The `04t` ID comes from `--subscriber-package-version-id`, or else from the `subscriberPackageVersionId.env` file that `build create-package-version` writes to the working directory. The new version's tag is the tag at `HEAD` annotated with that ID. The previous version's tag is the nearest earlier tag in the project's version tag format (`plugins.simply.versionTagFormat` or `SIMPLY_CICD_VERSION_TAG_FORMAT`). The command fetches tags, and the full history when the clone is shallow. If a tag or the history can't be found, the card shows `N/A` instead of failing the job.
|
|
14
|
+
|
|
15
|
+
# flags.ci-commit-ref-name.summary
|
|
16
|
+
|
|
17
|
+
The git branch or tag ref for this pipeline run.
|
|
18
|
+
|
|
19
|
+
# flags.ci-job-name.summary
|
|
20
|
+
|
|
21
|
+
The name of the current CI job.
|
|
22
|
+
|
|
23
|
+
# flags.ci-job-stage.summary
|
|
24
|
+
|
|
25
|
+
The stage of the current CI job.
|
|
26
|
+
|
|
27
|
+
# flags.ci-job-status.summary
|
|
28
|
+
|
|
29
|
+
The status of the current CI job (e.g. success, failed, canceled).
|
|
30
|
+
|
|
31
|
+
# flags.ci-pipeline-id.summary
|
|
32
|
+
|
|
33
|
+
The ID of the current CI pipeline.
|
|
34
|
+
|
|
35
|
+
# flags.ci-pipeline-url.summary
|
|
36
|
+
|
|
37
|
+
The URL of the current CI pipeline.
|
|
38
|
+
|
|
39
|
+
# flags.ci-project-title.summary
|
|
40
|
+
|
|
41
|
+
The project title shown in the notification card's heading.
|
|
42
|
+
|
|
43
|
+
# flags.subscriber-package-version-id.summary
|
|
44
|
+
|
|
45
|
+
The subscriber package version ID (04t...) created by this job. Defaults to the one in subscriberPackageVersionId.env, written by build create-package-version.
|
|
46
|
+
|
|
47
|
+
# flags.enabled.summary
|
|
48
|
+
|
|
49
|
+
Whether the notification is actually sent. Defaults to false so pipelines can gate this behind their own condition.
|
|
50
|
+
|
|
51
|
+
# flags.alm-base-url.summary
|
|
52
|
+
|
|
53
|
+
Base URL that an issue reference is appended to, e.g. https://jira.example.com/browse for Jira or https://gitlab.com/group/project/-/issues for GitLab Issues. References are shown without links if not provided.
|
|
54
|
+
|
|
55
|
+
# flags.alm-project-key.summary
|
|
56
|
+
|
|
57
|
+
Fallback project key(s) used to search commit messages for issue references, if none are configured in .sfdevrc.json. Only used by prefix-keyed trackers such as Jira.
|
|
58
|
+
|
|
59
|
+
# flags.alm-provider.summary
|
|
60
|
+
|
|
61
|
+
The issue tracker whose reference format to look for in commit messages.
|
|
62
|
+
|
|
63
|
+
# flags.teams-webhook-url.summary
|
|
64
|
+
|
|
65
|
+
One or more Teams webhook URLs to send the notification to.
|
|
66
|
+
|
|
67
|
+
# flags.debug.summary
|
|
68
|
+
|
|
69
|
+
Enable verbose debug logging.
|
|
70
|
+
|
|
71
|
+
# examples
|
|
72
|
+
|
|
73
|
+
- Post a card from a build job's after_script; it only sends one when the job failed or created a package version:
|
|
74
|
+
|
|
75
|
+
<%= config.bin %> <%= command.id %> --ci-job-name push-scratch --ci-job-status "$CI_JOB_STATUS" --teams-webhook-url https://outlook.office.com/webhook/... --enabled
|
|
76
|
+
|
|
77
|
+
- Announce a package version with linked Jira stories:
|
|
78
|
+
|
|
79
|
+
<%= config.bin %> <%= command.id %> --ci-job-status success --alm-base-url https://jira.example.com/browse --teams-webhook-url https://outlook.office.com/webhook/... --enabled
|
|
80
|
+
|
|
81
|
+
# error.missingTeamsWebhookUrl
|
|
82
|
+
|
|
83
|
+
--teams-webhook-url must be specified.
|
|
@@ -4,7 +4,7 @@ Send a serialized JSON payload to a Microsoft Teams webhook.
|
|
|
4
4
|
|
|
5
5
|
# description
|
|
6
6
|
|
|
7
|
-
Posts a payload as-is to one or more Microsoft Teams incoming webhook URLs. Use this for custom notifications that don't fit the built-in `notify project
|
|
7
|
+
Posts a payload as-is to one or more Microsoft Teams incoming webhook URLs. Use this for custom notifications that don't fit the built-in `notify project`, `notify happy-soup`, or `notify build` card templates.
|
|
8
8
|
|
|
9
9
|
# flags.payload.summary
|
|
10
10
|
|