Skip to content
This repository was archived by the owner on Mar 19, 2024. It is now read-only.

Update to Swift 5.1.3 #31

Merged
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
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,12 @@ script:
- make invoke_lambda_local SWIFT_EXECUTABLE=S3Test SWIFT_PROJECT_PATH=Examples/S3Test LAMBDA_FUNCTION_NAME=S3Test LAMBDA_HANDLER=S3Test.getObject
- make stop_docker_compose_env SWIFT_EXECUTABLE=S3Test SWIFT_PROJECT_PATH=Examples/S3Test LAMBDA_FUNCTION_NAME=S3Test LAMBDA_HANDLER=S3Test.getObject
- make test_lambda_local_output SWIFT_EXECUTABLE=S3Test SWIFT_PROJECT_PATH=Examples/S3Test LAMBDA_FUNCTION_NAME=S3Test LAMBDA_HANDLER=S3Test.getObject

deploy:
provider: releases
api_key:
secure: Ddgpz/LsTWeTTr8Xm0br+Vs3Is58V2bOHthwLOt5a1TbyhWAgU+tyc6lwvd51mhQxeNNVPSOWLKC4QgJEp2KI2ZCaw0K+Czb8lqMzWF5eJggDmJ0+wOZIHVEWMO7smLTwDc1jWtdnQA3qkPtXgSw0ERcJ9z4/haz1Q8v7Jj5qfoBJiNxnYYvw/79ElqROIjtQ0asX/i6xhZSlBFO1dXo5QPzX7XeNREQmh2dCkjfoeYSFSCah4Tnn5akxX36Pef1DJvWdFvc623pWAUoCpeswIMW/htby5tJQ6+C9PK+2yzqomKfU9gTK9iv7Nt3X1LN3KsXpk6VHgtljiUkEsecXjYB5WVBT00mY/4bnTPyY6RjI/V6C0aGnTE+0Pj78kDofJKj5uNevFi4vlBI2g4s4G0mRASFRp+sk3ASmzl62Lohkl1LfNiPYKRKRA2jT81s79zBnYv/MQ7t3fY+yd7iP+NrJfDFR/XG0vxBOQrNRpq6LR0M7DeHgTD/d9an2WEqJlX9pp+Ji/ywwepW7b/NLv42xeN99SnHbDmJJ/eZ4P1IC37JCOT5CjJ9wIyP8c+Q89JT30nlvON9xPM8MOx/MrVAGCeqC6FW1Zjc6oakTRZdngMqN1acH5OosLX83cOjjXo8ivRt5Sm2tfX3ZuOgL98kdaYsIBPIYbYhZDODdvM=
file: ".build/layer/swift-lambda-runtime-5-1-3.zip"
skip_cleanup: true
on:
tags: true
2 changes: 1 addition & 1 deletion Examples/HTTPSRequest/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM nio-swift:5.1.2
FROM nio-swift:5.1.3

# Or your actual UID, GID on Linux if not the default 1000
ARG USERNAME=vscode
Expand Down
4 changes: 2 additions & 2 deletions Examples/HTTPSRequest/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
SWIFT_PROJECT_PATH=Examples/HTTPSRequest

start_docker_compose_env:
cd $(SWIFT_PROJECT_PATH); docker-compose up -d ; sleep 2
cd $(SWIFT_PROJECT_PATH); docker-compose up -d; sleep 5

stop_docker_compose_env:
cd $(SWIFT_PROJECT_PATH); docker-compose stop
cd $(SWIFT_PROJECT_PATH); sleep 5; docker-compose stop
2 changes: 1 addition & 1 deletion Examples/HTTPSRequest/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# HTTPSRequest

[![Swift 5](https://img.shields.io/badge/Swift-5.0-blue.svg)](https://swift.org/download/) [![Swift 5.1.2](https://img.shields.io/badge/Swift-5.1.2-blue.svg)](https://swift.org/download/)
[![Swift 5](https://img.shields.io/badge/Swift-5.0-blue.svg)](https://swift.org/download/) [![Swift 5.1.3](https://img.shields.io/badge/Swift-5.1.3-blue.svg)](https://swift.org/download/)

This example shows the usage of the [LambdaSwiftSprinter](https://github.com/swift-sprinter/aws-lambda-swift-sprinter-core) framework and the plugin [LambdaSwiftSprinterNioPlugin](https://github.com/swift-sprinter/aws-lambda-swift-sprinter-nio-plugin) to build a lambda capable to perform an HTTPS request.

Expand Down
2 changes: 1 addition & 1 deletion Examples/HTTPSRequest/event.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"url": "https://www.example.com"
"url": "https://raw.githubusercontent.com/swift-sprinter/aws-lambda-swift-sprinter/master/Examples/HTTPSRequest/test.txt"
}
2 changes: 1 addition & 1 deletion Examples/HTTPSRequest/outfile.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"content":"<!doctype html>\n<html>\n<head>\n <title>Example Domain<\/title>\n\n <meta charset=\"utf-8\" \/>\n <meta http-equiv=\"Content-type\" content=\"text\/html; charset=utf-8\" \/>\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" \/>\n <style type=\"text\/css\">\n body {\n background-color: #f0f0f2;\n margin: 0;\n padding: 0;\n font-family: -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", \"Open Sans\", \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n \n }\n div {\n width: 600px;\n margin: 5em auto;\n padding: 2em;\n background-color: #fdfdff;\n border-radius: 0.5em;\n box-shadow: 2px 3px 7px 2px rgba(0,0,0,0.02);\n }\n a:link, a:visited {\n color: #38488f;\n text-decoration: none;\n }\n @media (max-width: 700px) {\n div {\n margin: 0 auto;\n width: auto;\n }\n }\n <\/style> \n<\/head>\n\n<body>\n<div>\n <h1>Example Domain<\/h1>\n <p>This domain is for use in illustrative examples in documents. You may use this\n domain in literature without prior coordination or asking for permission.<\/p>\n <p><a href=\"https:\/\/www.iana.org\/domains\/example\">More information...<\/a><\/p>\n<\/div>\n<\/body>\n<\/html>\n"}
{"content":"Hello HTTPS World! Hello Swift Sprinter!"}
1 change: 1 addition & 0 deletions Examples/HTTPSRequest/test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Hello HTTPS World! Hello Swift Sprinter!
2 changes: 1 addition & 1 deletion Examples/HelloWorld/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM nio-swift:5.1.2
FROM nio-swift:5.1.3

# Or your actual UID, GID on Linux if not the default 1000
ARG USERNAME=vscode
Expand Down
2 changes: 1 addition & 1 deletion Examples/HelloWorld/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# HelloWorld

[![Swift 5](https://img.shields.io/badge/Swift-5.0-blue.svg)](https://swift.org/download/) [![Swift 5.1.2](https://img.shields.io/badge/Swift-5.1.2-blue.svg)](https://swift.org/download/)
[![Swift 5](https://img.shields.io/badge/Swift-5.0-blue.svg)](https://swift.org/download/) [![Swift 5.1.3](https://img.shields.io/badge/Swift-5.1.3-blue.svg)](https://swift.org/download/)

This example shows the usage of the [LambdaSwiftSprinter](https://github.com/swift-sprinter/aws-lambda-swift-sprinter-core) framework to build a simple lambda.

Expand Down
2 changes: 1 addition & 1 deletion Examples/S3Test/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM nio-swift:5.1.2
FROM nio-swift:5.1.3

# Or your actual UID, GID on Linux if not the default 1000
ARG USERNAME=vscode
Expand Down
2 changes: 1 addition & 1 deletion Examples/S3Test/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# S3Test

[![Swift 5](https://img.shields.io/badge/Swift-5.0-blue.svg)](https://swift.org/download/) [![Swift 5.1.2](https://img.shields.io/badge/Swift-5.1.2-blue.svg)](https://swift.org/download/)
[![Swift 5](https://img.shields.io/badge/Swift-5.0-blue.svg)](https://swift.org/download/) [![Swift 5.1.3](https://img.shields.io/badge/Swift-5.1.3-blue.svg)](https://swift.org/download/)

This example shows the usage of the [LambdaSwiftSprinter](https://github.com/swift-sprinter/aws-lambda-swift-sprinter-core) framework with the third-party library [https://github.com/swift-aws/aws-sdk-swift.git](https://github.com/swift-aws/aws-sdk-swift.git) to build a lambda capable to perform an HTTPS request to an S3 Bucket.

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

# Use this tag to build a customized local image

SWIFT_VERSION?=5.1.2
LAYER_VERSION?=5-1-2
SWIFT_VERSION?=5.1.3
LAYER_VERSION?=5-1-3
# SWIFT_VERSION=5.0.3
# LAYER_VERSION=5-0-3
DOCKER_TAG=nio-swift:$(SWIFT_VERSION)
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# aws-lambda-swift-sprinter

[![Swift 5](https://img.shields.io/badge/Swift-5.0-blue.svg)](https://swift.org/download/) [![Swift 5.1.2](https://img.shields.io/badge/Swift-5.1.2-blue.svg)](https://swift.org/download/) ![](https://img.shields.io/badge/version-1.0.0--alpha.3-red) ![](https://travis-ci.com/swift-sprinter/aws-lambda-swift-sprinter.svg?branch=master)
[![Swift 5](https://img.shields.io/badge/Swift-5.0-blue.svg)](https://swift.org/download/) [![Swift 5.1.3](https://img.shields.io/badge/Swift-5.1.3-blue.svg)](https://swift.org/download/) ![](https://img.shields.io/badge/version-1.0.0--alpha.3-red) ![](https://travis-ci.com/swift-sprinter/aws-lambda-swift-sprinter.svg?branch=master)

![](./images/aws-lambda-swift-sprinter.png)

Expand Down Expand Up @@ -173,8 +173,8 @@ make invoke_lambda \
| AWS_PROFILE | An AWS AIM profile you create to authenticate to your account. | default |
| IAM_ROLE_NAME | The execution role created that will be assumed by the Lambda. | lambda_sprinter_basic_execution |
| AWS_BUCKET | The AWS S3 bucket where the layer and lambdas zip files get uploaded. | aws-lambda-swift-sprinter |
| SWIFT_VERSION | Version of Swift used / Matches Dockerfile location too from `docker/` folder. | 5.1.2 |
| LAYER_VERSION | Version of the Swift layer that will be created and uploaded for the Lambda to run on. | 5-1-2 |
| SWIFT_VERSION | Version of Swift used / Matches Dockerfile location too from `docker/` folder. | 5.1.3 |
| LAYER_VERSION | Version of the Swift layer that will be created and uploaded for the Lambda to run on. | 5-1-3 |
| SWIFT_EXECUTABLE | Name of the binary file. | HelloWorld |
| SWIFT_PROJECT_PATH | Path to your Swift project. | Examples/HelloWorld |
| LAMBDA_FUNCTION_NAME | Display name of your Lambda in AWS. | HelloWorld |
Expand Down Expand Up @@ -457,8 +457,8 @@ Stop the docker-compose test environment

### Configure:
- Go to `AWS Lambda -> Layers` in AWS Console and create a new layer from scratch
- Enter layer name "swift-lambda-runtime-5-1-2"
- Upload the zip file `build/swift-lambda-runtime-5-1-2.zip`
- Enter layer name "swift-lambda-runtime-5-1-3"
- Upload the zip file `build/swift-lambda-runtime-5-1-3.zip`
- Leave "Compatible runtimes" empty.
- Click "Create"
- Copy the `arn` from the created layer, it's required to set up the lambda.
Expand Down
2 changes: 1 addition & 1 deletion docker/5.1.2/Dockerfile → docker/5.1.3/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM swift:5.1.2 as builder
FROM swift:5.1.3 as builder

RUN apt-get -qq update && apt-get -q -y install \
libssl-dev libicu-dev