Skip to content
This repository was archived by the owner on Oct 4, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
functions/packages
.idea
.DS_Store
.DS_Store
taskcat_outputs
4 changes: 2 additions & 2 deletions functions/source/CreateSSHKey/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM lambci/lambda:build-python3.7
FROM lambci/lambda:build-python3.8

COPY . .

RUN mkdir -p python/ && \
pip install -t python/ -r ./requirements.txt && \
pip install -t ./ -r ./requirements.txt && \
find . -name "*.dist-info" -exec rm -rf {} \; | true && \
find . -name "*.egg-info" -exec rm -rf {} \; | true && \
find . -name "*.pth" -exec rm -rf {} \; | true && \
Expand Down
6 changes: 5 additions & 1 deletion functions/source/GitPullS3/lambda_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,11 @@ def lambda_handler(event, context):
# Bibucket server
branch_name = event['body-json']['push']['changes'][0]['new']['name']
except:
branch_name = 'master'
# Bitbucket Server v6.6.1
try:
branch_name = event['body-json']['changes'][0]['ref']['displayId']
except:
branch_name = 'master'
try:
# GitLab
remote_url = event['body-json']['project']['git_ssh_url']
Expand Down
13 changes: 6 additions & 7 deletions templates/git2s3.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ Resources:
- functions/packages/CreateSSHKey/lambda.zip
- functions/packages/DeleteBucketContents/lambda.zip
- functions/packages/GitPullS3/lambda.zip
- functions/packages/CustomActionLambda/lambda.zip

CopyZipsRole:
Type: AWS::IAM::Role
Expand Down Expand Up @@ -383,10 +382,10 @@ Resources:
Type: AWS::Lambda::Function
Properties:
Handler: lambda_function.lambda_handler
MemorySize: '128'
MemorySize: 128
Role: !GetAtt 'CreateSSHKeyRole.Arn'
Runtime: python3.8
Timeout: '300'
Timeout: 300
Code:
S3Bucket: !Ref 'LambdaZipsBucket'
S3Key: !Sub '${QSS3KeyPrefix}functions/packages/CreateSSHKey/lambda.zip'
Expand Down Expand Up @@ -451,10 +450,10 @@ Resources:
Type: AWS::Lambda::Function
Properties:
Handler: lambda_function.lambda_handler
MemorySize: '128'
MemorySize: 128
Role: !GetAtt 'DeleteBucketContentsRole.Arn'
Runtime: python3.8
Timeout: '300'
Timeout: 300
Code:
S3Bucket: !Ref 'LambdaZipsBucket'
S3Key: !Sub '${QSS3KeyPrefix}functions/packages/DeleteBucketContents/lambda.zip'
Expand Down Expand Up @@ -693,10 +692,10 @@ Resources:
Type: AWS::Lambda::Function
Properties:
Handler: lambda_function.lambda_handler
MemorySize: '128'
MemorySize: 128
Role: !GetAtt 'GitPullRole.Arn'
Runtime: python3.8
Timeout: '900'
Timeout: 900
VpcConfig: !If
- ShouldRunInVPC
- SecurityGroupIds:
Expand Down