@hellopearl/dv-gitlab 0.2.3 → 0.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hellopearl/dv-gitlab",
3
- "version": "0.2.3",
3
+ "version": "0.3.0",
4
4
  "description": "Unified GitLab CI tooling -- MR comments, pipeline triggers, preview env management",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -112,6 +112,7 @@ async function triggerPipelinePreview({
112
112
  { key: 'SOURCE_MR_IID', value: mrIid },
113
113
  { key: 'BRANCH', value: branch },
114
114
  { key: 'AMPLIFY_APP_ID', value: appId },
115
+ { key: 'PREVIEW_DOMAIN', value: process.env.PREVIEW_DOMAIN || '' },
115
116
  ],
116
117
  };
117
118
 
@@ -226,7 +227,7 @@ export async function postbuild() {
226
227
  const deleted = await client.deleteNotesByMarker(
227
228
  projectId,
228
229
  mr.iid,
229
- '<!-- dv-gitlab:preview -->',
230
+ '<!-- amplify:build-status -->',
230
231
  );
231
232
  if (deleted) {
232
233
  debug(`[postbuild] removed ${deleted} stale preview comment(s)`);
@@ -248,7 +249,7 @@ export async function postbuild() {
248
249
  await client.deleteNotesByMarker(
249
250
  projectId,
250
251
  mr.iid,
251
- '<!-- dv-gitlab:pipeline -->',
252
+ '<!-- amplify:pipeline-trigger -->',
252
253
  );
253
254
 
254
255
  const triggerResult = await triggerPipelinePreview({
@@ -261,11 +262,14 @@ export async function postbuild() {
261
262
 
262
263
  if (triggerResult) {
263
264
  const triggerBody = renderTemplate('pipeline-triggered', {
265
+ branch,
266
+ capture: process.env.QA_PIPELINE_CAPTURE || '',
264
267
  environment: process.env.QA_PIPELINE_ENVIRONMENT || '',
265
268
  pipelineId: triggerResult.id.toString(),
266
269
  pipelineUrl: triggerResult.webUrl,
267
270
  project: process.env.QA_PIPELINE_PROJECT || '',
268
271
  ref: process.env.QA_PIPELINE_REF || '',
272
+ scope: process.env.QA_PIPELINE_SCOPE || '',
269
273
  });
270
274
 
271
275
  const triggerPosted = await client.postNote(projectId, mr.iid, triggerBody);
@@ -1,13 +1,17 @@
1
- <!-- dv-gitlab:pipeline -->
2
- ## 🔄 Automation Pipeline Triggered
1
+ <!-- amplify:pipeline-trigger -->
2
+ ## :gear: Automation Pipeline Triggered
3
3
 
4
- | | |
5
- | --------------- | ---------------------------------- |
6
- | **Pipeline** | [#{{pipelineId}}]({{pipelineUrl}}) |
7
- | **Project** | `{{project}}` |
8
- | **Ref** | `{{ref}}` |
9
- | **Environment** | `{{environment}}` |
4
+ | | |
5
+ |---|---|
6
+ | **Pipeline** | [#{{pipelineId}}]({{pipelineUrl}}) |
7
+ | **Branch** | `{{branch}}` |
8
+ | **Ref** | `{{ref}}` |
9
+ | **Project** | `{{project}}` |
10
+ | **Environment** | `{{environment}}` |
11
+ | **Scope** | `{{scope}}` |
12
+ | **Capture** | `{{capture}}` |
10
13
 
11
- ---
14
+ :hourglass_flowing_sand: Results will be posted here when the pipeline completes.
12
15
 
13
- Results will be posted here once the pipeline completes.
16
+ ---
17
+ :robot: *Posted by Amplify*
@@ -1,11 +1,15 @@
1
- <!-- dv-gitlab:preview -->
2
- ## Preview Build Failed
1
+ <!-- amplify:build-status -->
2
+ ## :x: Preview Build Failed
3
3
 
4
- | | |
5
- | ---------- | -------------- |
6
- | **Branch** | `{{branch}}` |
4
+ | | |
5
+ |---|---|
6
+ | **Branch** | `{{branch}}` |
7
7
  | **Commit** | `{{commitId}}` |
8
+ | **Console** | [Amplify Build Logs](https://{{region}}.console.aws.amazon.com/amplify/home#/{{appId}}/{{branch}}/{{jobId}}) |
8
9
 
9
- ---
10
+ ```diff
11
+ - Build failed -- check console for details
12
+ ```
10
13
 
11
- The Amplify preview build did not complete successfully. Check the [Amplify Console](https://{{region}}.console.aws.amazon.com/amplify/home#/{{appId}}/{{branch}}) for details.
14
+ ---
15
+ :robot: *Posted by Amplify*
@@ -1,19 +1,18 @@
1
- <!-- dv-gitlab:preview -->
2
- ## 🚀 Preview Environment Ready
1
+ <!-- amplify:build-status -->
2
+ ## :white_check_mark: Preview Environment Ready
3
3
 
4
- | | |
5
- | --------------- | -------------------------------- |
6
- | **Branch** | `{{branch}}` |
7
- | **Commit** | `{{commitId}}` |
8
- | **Preview URL** | [{{previewUrl}}]({{previewUrl}}) |
4
+ :rocket: **[Open Preview]({{previewUrl}})**
9
5
 
10
- ---
11
-
12
- <details>
13
- <summary>Build details</summary>
6
+ | | |
7
+ |---|---|
8
+ | **Branch** | `{{branch}}` |
9
+ | **Commit** | `{{commitId}}` |
10
+ | **Preview** | {{previewUrl}} |
11
+ | **Console** | [Amplify Build Logs](https://{{region}}.console.aws.amazon.com/amplify/home#/{{appId}}/{{branch}}/{{jobId}}) |
14
12
 
15
- - **App ID:** `{{appId}}`
16
- - **Job ID:** `{{jobId}}`
17
- - **Region:** `{{region}}`
13
+ ```diff
14
+ + Build succeeded -- preview is live
15
+ ```
18
16
 
19
- </details>
17
+ ---
18
+ :robot: *Posted by Amplify*