@devramps/cli 0.1.8 → 0.1.10

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/dist/index.js +11 -17
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -173,6 +173,9 @@ var MultiStackProgress = class {
173
173
  stack.status = success2 ? "complete" : "failed";
174
174
  stack.completed = success2 ? stack.total : stack.completed;
175
175
  if (failureReason) stack.failureReason = failureReason;
176
+ if (!stack.cfnStatus || stack.cfnStatus === "STARTING") {
177
+ stack.cfnStatus = success2 ? "NO_CHANGES" : failureReason || "FAILED";
178
+ }
176
179
  this.scheduleRender();
177
180
  }
178
181
  }
@@ -1520,18 +1523,6 @@ function addOidcProviderResource(template, conditional = true) {
1520
1523
  }
1521
1524
  };
1522
1525
  }
1523
- function getOidcProviderArn(accountId, conditional = true) {
1524
- if (conditional) {
1525
- return {
1526
- "Fn::If": [
1527
- "CreateOIDCProvider",
1528
- { "Fn::GetAtt": ["DevRampsOIDCProvider", "Arn"] },
1529
- `arn:aws:iam::${accountId}:oidc-provider/${OIDC_PROVIDER_URL}`
1530
- ]
1531
- };
1532
- }
1533
- return { "Fn::GetAtt": ["DevRampsOIDCProvider", "Arn"] };
1534
- }
1535
1526
  function buildOidcTrustPolicy(accountId, subject) {
1536
1527
  return {
1537
1528
  Version: "2012-10-17",
@@ -1909,7 +1900,6 @@ function createTerraformStateBucketPolicy(bucketName, cicdAccountId, allowedAcco
1909
1900
  function generateOrgStackTemplate(options) {
1910
1901
  const { orgSlug, cicdAccountId, targetAccountIds } = options;
1911
1902
  const template = createBaseTemplate(`DevRamps Org Stack for ${orgSlug}`);
1912
- addOidcProviderResource(template, true);
1913
1903
  const kmsKeyPolicy = buildKmsKeyPolicy(cicdAccountId, targetAccountIds);
1914
1904
  template.Resources.DevRampsKMSKey = createKmsKeyResource(
1915
1905
  `DevRamps encryption key for org: ${orgSlug}`,
@@ -1973,10 +1963,6 @@ function generateOrgStackTemplate(options) {
1973
1963
  TerraformStateBucketArn: {
1974
1964
  Description: "ARN of the Terraform state bucket",
1975
1965
  Value: { "Fn::GetAtt": ["TerraformStateBucket", "Arn"] }
1976
- },
1977
- OIDCProviderArn: {
1978
- Description: "ARN of the OIDC provider",
1979
- Value: getOidcProviderArn(cicdAccountId, true)
1980
1966
  }
1981
1967
  };
1982
1968
  return template;
@@ -2656,6 +2642,14 @@ async function buildDeploymentPlan(pipelines, pipelineArtifacts, authData, curre
2656
2642
  const accountStacks = [];
2657
2643
  const accountStackName = getAccountStackName();
2658
2644
  const accountsWithStacks = /* @__PURE__ */ new Set();
2645
+ accountsWithStacks.add(cicdAccountId);
2646
+ accountStacks.push({
2647
+ stackType: "Account" /* ACCOUNT */,
2648
+ stackName: accountStackName,
2649
+ accountId: cicdAccountId,
2650
+ region: cicdRegion,
2651
+ action: await determineStackAction(accountStackName, cicdCredentials, cicdRegion)
2652
+ });
2659
2653
  for (const pipeline of pipelines) {
2660
2654
  for (const stage of pipeline.stages) {
2661
2655
  if (accountsWithStacks.has(stage.account_id)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devramps/cli",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "description": "DevRamps CLI - Bootstrap AWS infrastructure for CI/CD pipelines",
5
5
  "main": "dist/index.js",
6
6
  "bin": {