Skip to content

Commit

Permalink
Merge pull request #9 from BIBSYSDEV/NP-599-update-template
Browse files Browse the repository at this point in the history
Updated name in metadata, using java 11
  • Loading branch information
svenngjeto authored Mar 12, 2020
2 parents 483c2b8 + c5b1770 commit 9f139fc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 22 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ plugins {
group 'no.unit.nva'
version '1.0-SNAPSHOT'

sourceCompatibility = JavaVersion.VERSION_1_8 // source-code version and must be <= targetCompatibility
targetCompatibility = JavaVersion.VERSION_1_8 // bytecode target version
sourceCompatibility = JavaVersion.VERSION_11 // source-code version and must be <= targetCompatibility
targetCompatibility = JavaVersion.VERSION_11 // bytecode target version

repositories {
jcenter()
Expand Down
2 changes: 1 addition & 1 deletion buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ phases:

install:
runtime-versions:
java: openjdk8
java: openjdk11

commands:

Expand Down
3 changes: 1 addition & 2 deletions buildspec_publish_to_sar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ version: 0.2
phases:
install:
runtime-versions:
python: 3.7
java: openjdk11
commands:
- pip3 install aws-sam-cli

build:
commands:
# Use AWS SAM to build and package the application by using AWS CloudFormation
- echo "S3BUCKET=" $S3_BUCKET
- sam build --debug
- sam package --debug --template-file .aws-sam/build/template.yaml --s3-bucket $S3_BUCKET --output-template-file sampackaged.yaml --force-upload
post_build:
Expand Down
24 changes: 7 additions & 17 deletions template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Description: Backend for uploading files to Amazon S3 via Uppy / Companion.

Metadata:
AWS::ServerlessRepo::Application:
Name: NVA-Multipart-upload
Description: Backend for uploading files to Amazon S3 via Uppy / Companion.
Name: UploadMultipart
Description: Backend for uploading files to Amazon S3
Author: Unit
SemanticVersion: 1.0.0
SpdxLicenseId: MIT
Expand Down Expand Up @@ -379,7 +379,7 @@ Resources:
S3_UPLOAD_BUCKET: !Ref S3UploadBucket
ALLOWED_ORIGIN: '*'
Handler: no.unit.nva.amazon.s3.CreateUploadHandler::handleRequest
Runtime: java8
Runtime: java11
MemorySize: 512
# Layers:
# - !Ref MultipartUploadLayer
Expand All @@ -400,7 +400,7 @@ Resources:
S3_UPLOAD_BUCKET: !Ref S3UploadBucket
ALLOWED_ORIGIN: '*'
Handler: no.unit.nva.amazon.s3.ListPartsHandler::handleRequest
Runtime: java8
Runtime: java11
MemorySize: 512
# Layers:
# - !Ref MultipartUploadLayer
Expand All @@ -421,7 +421,7 @@ Resources:
S3_UPLOAD_BUCKET: !Ref S3UploadBucket
ALLOWED_ORIGIN: '*'
Handler: no.unit.nva.amazon.s3.PrepareUploadPartHandler::handleRequest
Runtime: java8
Runtime: java11
MemorySize: 512
# Layers:
# - !Ref MultipartUploadLayer
Expand All @@ -442,7 +442,7 @@ Resources:
S3_UPLOAD_BUCKET: !Ref S3UploadBucket
ALLOWED_ORIGIN: '*'
Handler: no.unit.nva.amazon.s3.AbortMultipartUploadHandler::handleRequest
Runtime: java8
Runtime: java11
MemorySize: 512
# Layers:
# - !Ref MultipartUploadLayer
Expand All @@ -463,7 +463,7 @@ Resources:
S3_UPLOAD_BUCKET: !Ref S3UploadBucket
ALLOWED_ORIGIN: '*'
Handler: no.unit.nva.amazon.s3.CompleteUploadHandler::handleRequest
Runtime: java8
Runtime: java11
MemorySize: 512
# Layers:
# - !Ref MultipartUploadLayer
Expand Down Expand Up @@ -512,13 +512,3 @@ Resources:
- arn:aws:s3:::nva-storage-develop
- arn:aws:s3:::nva-storage-develop/*

# MultipartUploadLayer:
# Type: AWS::Serverless::LayerVersion
# Properties:
# LayerName: MultipartUploadLayer
# Description: Common libs used in multpart upload
# ContentUri: './'
# CompatibleRuntimes:
# - java8
# LicenseInfo: LICENCE
# RetentionPolicy: Delete

0 comments on commit 9f139fc

Please sign in to comment.