Skip to content

Commit

Permalink
create parameters for efs id and cache access point id
Browse files Browse the repository at this point in the history
  • Loading branch information
Guslington committed Mar 15, 2022
1 parent 2fb6f3a commit bfbde9b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
2 changes: 2 additions & 0 deletions jenkins-ec2-agents.cfhighlander.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
ComponentParam 'VPCId', type: 'AWS::EC2::VPC::Id'
ComponentParam 'JenkinsMasterSecurityGroup', type: 'AWS::EC2::SecurityGroup::Id'
ComponentParam 'Subnets', type: 'CommaDelimitedList'
ComponentParam 'JenkinsFileSystem', ''
ComponentParam 'JenkinsAgentCacheAccessPoint', ''
end

LambdaFunctions 'ami_finder_custom_resources'
Expand Down
24 changes: 24 additions & 0 deletions jenkins-ec2-agents.cfndsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,29 @@
EnvironmentName: Ref(:EnvironmentName)
})
}

SSM_Parameter(:JenkinsEFSParameter) {
Description "Jenkins EFS ID"
Name FnSub("/ciinabox/${EnvironmentName}/agent/efs")
Property('Tier','Standard')
Type 'String'
Value Ref(:JenkinsFileSystem)
Property('Tags',{
Name: "#{external_parameters[:component_name]}-efs-id",
EnvironmentName: Ref(:EnvironmentName)
})
}

SSM_Parameter(:JenkinsAgentCacheAccessPointParameter) {
Description "Jenkins EFS agent access point ID for the Jenkins linux agent to attach in userdata for caching builds"
Name FnSub("/ciinabox/${EnvironmentName}/agent/cache-ap")
Property('Tier','Standard')
Type 'String'
Value Ref(:JenkinsAgentCacheAccessPoint)
Property('Tags',{
Name: "#{external_parameters[:component_name]}-efs-cache-access-point",
EnvironmentName: Ref(:EnvironmentName)
})
}

end
3 changes: 0 additions & 3 deletions lambdas/ami_finder/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,3 @@ def get_latest_ami(name):

def handler(event, context):
helper(event, context)


'Amzn2_Linux_Jenkins_Agent-*'

0 comments on commit bfbde9b

Please sign in to comment.