Skip to content

Commit 309be5d

Browse files
authored
Merge pull request #577 from pagopa/feature/PN-18230
Feature/pn 18230
2 parents 818b9c9 + a850ef0 commit 309be5d

File tree

3 files changed

+113
-0
lines changed

3 files changed

+113
-0
lines changed

cd-cli/cnf-templates/complete-pipeline.yaml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,11 @@ Resources:
437437
sed -i -e "s|pn_zendesk_auth_commitId=.*|pn_zendesk_auth_commitId=$COMMIT_ID|" desired-commit-ids-env.sh
438438
export PIPELINE_NAME="pn-zendesk-auth-update-pipeline"
439439
fi
440+
- |
441+
if ( [ "$PROJECT" = "pn-bfhd" ] ) then
442+
sed -i -e "s|pn_bfhd_commitId=.*|pn_bfhd_commitId=$COMMIT_ID|" desired-commit-ids-env.sh
443+
export PIPELINE_NAME="pn-bfhd-update-pipeline"
444+
fi
440445
- |
441446
if ( [ "$PROJECT" = "pn-portfat" ] ) then
442447
sed -i -e "s|pn_portfat_commitId=.*|pn_portfat_commitId=$COMMIT_ID|" desired-commit-ids-env.sh
@@ -5838,6 +5843,99 @@ Resources:
58385843
- Name: PnZendeskAuthOutput
58395844
RunOrder: 3
58405845

5846+
# MICROSERVICE PN-BFHD
5847+
############################
5848+
PnBfhdDeployPipeline:
5849+
Condition: RequiresSingleProjects
5850+
Type: AWS::CodePipeline::Pipeline
5851+
Properties:
5852+
RoleArn: !GetAtt ChooseAndLaunchPipelineCodeBuildRole.Arn
5853+
Name: !Sub '${ProjectName}-bfhd-update-pipeline'
5854+
ArtifactStore:
5855+
Type: S3
5856+
Location: !Ref PipelineArtifactBucket
5857+
Stages:
5858+
- Name: Download_Configurations
5859+
Actions:
5860+
# Trigger build when material set is changed
5861+
- Name: Read_CommitIds_And_ImageUrls_File
5862+
ActionTypeId:
5863+
Provider: S3
5864+
Owner: AWS
5865+
Version: 1
5866+
Category: Source
5867+
Configuration:
5868+
PollForSourceChanges: false
5869+
S3Bucket: !Ref CdArtifactBucket
5870+
S3ObjectKey: 'config/desired-commit-ids-env.sh'
5871+
OutputArtifacts:
5872+
- Name: DesiredCommitIds
5873+
Namespace: 'DesiredCommitIdsNS'
5874+
RunOrder: 1
5875+
# CodePipeline CodeArtifact integration issue
5876+
- Name: EmptyZipBecauseCodeBuildWithCodepipelineNeedOneZipInputArtifact
5877+
ActionTypeId:
5878+
Provider: S3
5879+
Owner: AWS
5880+
Version: 1
5881+
Category: Source
5882+
Configuration:
5883+
PollForSourceChanges: false
5884+
S3Bucket: !Ref CdArtifactBucket
5885+
S3ObjectKey: 'empty.zip'
5886+
OutputArtifacts:
5887+
- Name: EmptyZip
5888+
RunOrder: 1
5889+
- Name: DeployAll
5890+
Actions:
5891+
# Download cd-cli scripts
5892+
- Name: Download_CLI_Scripts
5893+
ActionTypeId:
5894+
Category: Build
5895+
Owner: AWS
5896+
Version: 1
5897+
Provider: CodeBuild
5898+
Configuration:
5899+
ProjectName: !Ref DownloadScriptsCodebuildProject
5900+
PrimarySource: EmptyZip
5901+
EnvironmentVariables: !Sub '[
5902+
{"name":"EnvName", "value":"${EnvName}", "type":"PLAINTEXT"},
5903+
{"name":"AwsRegion", "value":"${AWS::Region}", "type":"PLAINTEXT"},
5904+
{"name":"DesiredCommitIdsBucketName", "value":"${CdArtifactBucket}", "type":"PLAINTEXT"},
5905+
{"name":"DesiredCommitIdsPath", "value":"config/desired-commit-ids-env.sh", "type":"PLAINTEXT"},
5906+
{"name":"DesiredCommitIdsVersionId", "value":"#{DesiredCommitIdsNS.VersionId}", "type":"PLAINTEXT"}
5907+
]'
5908+
InputArtifacts:
5909+
- Name: EmptyZip
5910+
OutputArtifacts:
5911+
- Name: DesiredCommitIdsAndScripts
5912+
RunOrder: 1
5913+
5914+
# Update pn-bfhd
5915+
- Name: Update_Bfhd
5916+
ActionTypeId:
5917+
Category: Build
5918+
Owner: AWS
5919+
Version: 1
5920+
Provider: CodeBuild
5921+
Configuration:
5922+
ProjectName: !Ref UpdateMultiLambdaServiceCodeBuildProject
5923+
PrimarySource: DesiredCommitIdsAndScripts
5924+
EnvironmentVariables: !Sub '[
5925+
{"name":"EnvName", "value":"${EnvName}", "type":"PLAINTEXT"},
5926+
{"name":"AwsRegion", "value":"${AWS::Region}", "type":"PLAINTEXT"},
5927+
{"name":"CdArtifactBucketName", "value":"${CdArtifactBucket}", "type":"PLAINTEXT"},
5928+
{"name":"CiArtifactBucketName", "value":"${CiArtifactBucketNameParam}", "type":"PLAINTEXT"},
5929+
{"name":"MsName", "value":"pn-bfhd", "type":"PLAINTEXT"},
5930+
{"name":"MsNumber", "value":"0", "type":"PLAINTEXT"},
5931+
{"name":"VarPrefix", "value":"pn_bfhd", "type":"PLAINTEXT"}
5932+
]'
5933+
InputArtifacts:
5934+
- Name: DesiredCommitIdsAndScripts
5935+
OutputArtifacts:
5936+
- Name: PnBfhdOutput
5937+
RunOrder: 3
5938+
58415939
# MICROSERVICE PN-KAFKA-BRIDGE
58425940
############################
58435941
PnKafkaBridgeDeployPipeline:

cd-cli/custom-config/pn-bfhd/empty.txt

Whitespace-only changes.

ci/infra/root.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2078,6 +2078,21 @@ Resources:
20782078
NodeVersion: "18"
20792079
TimeoutInMinutes: 10
20802080

2081+
# Progetto pn-bfhd
2082+
PnBfhdLambda:
2083+
Type: AWS::CloudFormation::Stack
2084+
Properties:
2085+
TemplateURL: !Sub "https://s3.amazonaws.com/${PnCiCdTemplatesBucketName}/ci/builders/nodejs-multilambda-codebuild.yaml"
2086+
Parameters:
2087+
GitHubProjectName: "pn-bfhd"
2088+
BaseDir: "functions"
2089+
BaseDirEscaped: "functions"
2090+
GitHubDefaultBranch: "develop"
2091+
CiArtifactBucket: !Ref "CiArtifactBucket"
2092+
NotificationSNSTopic: !Ref "NotificationSNSTopic"
2093+
NodeVersion: "22"
2094+
TimeoutInMinutes: 10
2095+
20812096
# Progetto Auth Fleet con Multilambda
20822097
PnAuthFleetLambdas:
20832098
Type: AWS::CloudFormation::Stack

0 commit comments

Comments
 (0)