diff --git a/cdk/stacks/ContinuousDeployment.ts b/cdk/stacks/ContinuousDeployment.ts index e25b9eb9..f4fea22e 100644 --- a/cdk/stacks/ContinuousDeployment.ts +++ b/cdk/stacks/ContinuousDeployment.ts @@ -62,6 +62,19 @@ export class ContinuousDeploymentStack extends CloudFormation.Stack { 'Whether the continuous deployment of the Device UI is enabled or disabled.', }) + // CD for the Device UI is implied by enabled CD (in that case this Stack exists) and enabled Device UI + const enabledFirmwareCiCD = checkFlag({ + key: 'firmware-ci', + component: 'Firmware CI Continuous Deployment', + onUndefined: 'disabled', + }) + new CloudFormation.CfnOutput(this, 'firmwareCiCD', { + value: enabledFirmwareCiCD ? 'enabled' : 'disabled', + exportName: `${this.stackName}:firmwareCiCD`, + description: + 'Whether the continuous deployment of the Firmware CI is enabled or disabled.', + }) + const { bifravstAWS, deviceUI, webApp } = properties const codeBuildRole = new IAM.Role(this, 'CodeBuildRole', { @@ -134,6 +147,10 @@ export class ContinuousDeploymentStack extends CloudFormation.Stack { name: 'DEVICEUI', value: enableDeviceUICD ? '1' : '0', }, + { + name: 'FIRMWARECI', + value: enabledFirmwareCiCD ? '1' : '0', + }, ], }, }) diff --git a/continuous-deployment.yml b/continuous-deployment.yml index 7cad1f56..ef8d0e46 100644 --- a/continuous-deployment.yml +++ b/continuous-deployment.yml @@ -9,4 +9,4 @@ phases: build: commands: - npx cdk deploy --trace -v --require-approval never '*' -c webapp=$WEBAPP - -c deviceui=$DEVICEUI + -c deviceui=$DEVICEUI -c firmware-ci=$FIRMWARECI