@firestartr/cli 1.45.0-snapshot-9 → 1.45.0-snapshot-11

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.
Files changed (2) hide show
  1. package/build/index.js +14 -27
  2. package/package.json +1 -1
package/build/index.js CHANGED
@@ -281748,7 +281748,6 @@ async function writePlanInGithubPR(prUrl, planText) {
281748
281748
  }
281749
281749
  async function addApplyCommitStatus(cr, state, targetURL = '', description = '', context = '') {
281750
281750
  try {
281751
- await addCommitStatusToHeadCommit(cr.metadata.annotations['firestartr.dev/last-claim-pr'], state, targetURL, description, context);
281752
281751
  await addCommitStatusToPrMergeCommit(cr.metadata.annotations['firestartr.dev/last-state-pr'], state, targetURL, description, context);
281753
281752
  }
281754
281753
  catch (e) {
@@ -281790,12 +281789,6 @@ async function addCommitStatusToPrMergeCommit(prAnnotationValue, state, targetUR
281790
281789
  fDebug(`Adding commit status to ${prAnnotationValue} for owner ${owner}, repo ${repo} and SHA ${branchSha}`);
281791
281790
  await github_0.repo.addCommitStatus(state, branchSha, repo, owner, targetURL, description, context);
281792
281791
  }
281793
- async function addCommitStatusToHeadCommit(prAnnotationValue, state, targetURL, description, context) {
281794
- const { owner, repo, prNumber } = catalog_common.generic.getOwnerRepoPrNumberFromAnnotationValue(prAnnotationValue);
281795
- const branchSha = await github_0.pulls.getPrLastCommitSHA(prNumber, repo, owner);
281796
- fDebug(`Adding commit status to ${prAnnotationValue} for owner ${owner}, repo ${repo} and SHA ${branchSha}`);
281797
- await github_0.repo.addCommitStatus(state, branchSha, repo, owner, targetURL, description, context);
281798
- }
281799
281792
  async function getLastStatePrInfo(cr) {
281800
281793
  try {
281801
281794
  const prInfo = cr.metadata.annotations['firestartr.dev/last-state-pr'];
@@ -285058,8 +285051,7 @@ async function* doApply(item, op, handler) {
285058
285051
  }
285059
285052
  const deps = await handler.resolveReferences();
285060
285053
  cdktf_log('Item %s has the following dependencies: %O', item.metadata.name, deps);
285061
- if ((item.metadata.annotations['firestartr.dev/last-claim-pr'] || false) &&
285062
- (item.metadata.annotations['firestartr.dev/last-state-pr'] || false)) {
285054
+ if (item.metadata.annotations['firestartr.dev/last-state-pr'] || false) {
285063
285055
  await addApplyCommitStatus(item, 'pending', catalog_common.generic.getPrLinkFromAnnotationValue(item.metadata.annotations['firestartr.dev/last-state-pr']), 'Performing apply operation...', `Terraform Apply ${item.metadata.name}`);
285064
285056
  }
285065
285057
  const applyOutput = await provisioner.runProvisioner({
@@ -285095,8 +285087,7 @@ async function* doApply(item, op, handler) {
285095
285087
  message: 'doApply',
285096
285088
  };
285097
285089
  await handler.writeTerraformOutputInTfResult(item, output);
285098
- if ((item.metadata.annotations['firestartr.dev/last-claim-pr'] || false) &&
285099
- (item.metadata.annotations['firestartr.dev/last-state-pr'] || false)) {
285090
+ if (item.metadata.annotations['firestartr.dev/last-state-pr'] || false) {
285100
285091
  await addApplyCommitStatus(item, 'success', catalog_common.generic.getPrLinkFromAnnotationValue(item.metadata.annotations['firestartr.dev/last-state-pr']), 'Apply operation completed', `Terraform Apply ${item.metadata.name}`);
285101
285092
  }
285102
285093
  handler.success();
@@ -285132,8 +285123,7 @@ async function* doApply(item, op, handler) {
285132
285123
  status: 'False',
285133
285124
  message: error.toString(),
285134
285125
  };
285135
- if ((item.metadata.annotations['firestartr.dev/last-claim-pr'] || false) &&
285136
- (item.metadata.annotations['firestartr.dev/last-state-pr'] || false)) {
285126
+ if (item.metadata.annotations['firestartr.dev/last-state-pr'] || false) {
285137
285127
  await addApplyCommitStatus(item, 'failure', catalog_common.generic.getPrLinkFromAnnotationValue(item.metadata.annotations['firestartr.dev/last-state-pr']), 'Apply operation failed', `Terraform Apply ${item.metadata.name}`);
285138
285128
  }
285139
285129
  handler.error();
@@ -286469,8 +286459,7 @@ async function* process_operation_doApply(item, op, handler) {
286469
286459
  const deps = await handler.resolveReferences();
286470
286460
  process_operation_log('Item %s has the following dependencies: %O', item.metadata.name, deps);
286471
286461
  const context = buildProvisionerContext(item, deps);
286472
- if ((item.metadata.annotations['firestartr.dev/last-claim-pr'] || false) &&
286473
- (item.metadata.annotations['firestartr.dev/last-state-pr'] || false)) {
286462
+ if (item.metadata.annotations['firestartr.dev/last-state-pr'] || false) {
286474
286463
  await addApplyCommitStatus(item, 'pending', catalog_common.generic.getPrLinkFromAnnotationValue(item.metadata.annotations['firestartr.dev/last-state-pr']), 'Performing apply operation...', `Terraform Apply ${item.metadata.name}`);
286475
286464
  }
286476
286465
  const applyOutput = await runTerraformProvisioner(context, 'apply');
@@ -286505,8 +286494,7 @@ async function* process_operation_doApply(item, op, handler) {
286505
286494
  message: 'doApply',
286506
286495
  };
286507
286496
  await handler.writeTerraformOutputInTfResult(item, output);
286508
- if ((item.metadata.annotations['firestartr.dev/last-claim-pr'] || false) &&
286509
- (item.metadata.annotations['firestartr.dev/last-state-pr'] || false)) {
286497
+ if (item.metadata.annotations['firestartr.dev/last-state-pr'] || false) {
286510
286498
  await addApplyCommitStatus(item, 'success', catalog_common.generic.getPrLinkFromAnnotationValue(item.metadata.annotations['firestartr.dev/last-state-pr']), 'Apply operation completed', `Terraform Apply ${item.metadata.name}`);
286511
286499
  }
286512
286500
  handler.success();
@@ -286536,8 +286524,7 @@ async function* process_operation_doApply(item, op, handler) {
286536
286524
  status: 'False',
286537
286525
  message: JSON.stringify(e),
286538
286526
  };
286539
- if ((item.metadata.annotations['firestartr.dev/last-claim-pr'] || false) &&
286540
- (item.metadata.annotations['firestartr.dev/last-state-pr'] || false)) {
286527
+ if (item.metadata.annotations['firestartr.dev/last-state-pr'] || false) {
286541
286528
  await addApplyCommitStatus(item, 'failure', catalog_common.generic.getPrLinkFromAnnotationValue(item.metadata.annotations['firestartr.dev/last-state-pr']), 'Apply operation failed', `Terraform Apply ${item.metadata.name}`);
286542
286529
  }
286543
286530
  handler.error();
@@ -286780,27 +286767,27 @@ function getErrorOutputMessage(cr, key, ref) {
286780
286767
  return `
286781
286768
 
286782
286769
  ❌ No output ${key} found in secret '${ref.secret.metadata.name}' .
286783
-
286770
+
286784
286771
  ❗❕ Your terraform project has not the output '${key}' .
286785
-
286772
+
286786
286773
  Maybe you forgot to add it or your reference is wrong.
286787
-
286774
+
286788
286775
  🔗 Terraform project: ${cr.spec.module}
286789
-
286776
+
286790
286777
  🖹 Output example:
286791
-
286778
+
286792
286779
  ... your terraform code ...
286793
-
286780
+
286794
286781
  # missing output
286795
286782
  output '${key}' {
286796
286783
  value = <your_value>
286797
286784
  }
286798
-
286785
+
286799
286786
  `;
286800
286787
  }
286801
286788
  else if (cr.spec.source === 'Inline') {
286802
286789
  return `❗❕ Could not find output '${key}' in inline module:
286803
-
286790
+
286804
286791
  ${cr.spec.module}
286805
286792
  `;
286806
286793
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firestartr/cli",
3
- "version": "1.45.0-snapshot-9",
3
+ "version": "1.45.0-snapshot-11",
4
4
  "private": false,
5
5
  "description": "Commandline tool",
6
6
  "main": "build/main.js",