Skip to content

Commit

Permalink
Upgrade to NodeJS 16, Change version to 1.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
cjkent committed Jul 20, 2023
1 parent 39e1d74 commit 38b485d
Show file tree
Hide file tree
Showing 15 changed files with 42 additions and 44 deletions.
2 changes: 1 addition & 1 deletion archetype/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>ws.osiris</groupId>
<artifactId>osiris-archetype</artifactId>
<version>1.7.0-SNAPSHOT</version>
<version>1.6.1</version>
<packaging>maven-archetype</packaging>

<name>Osiris Archetype</name>
Expand Down
4 changes: 2 additions & 2 deletions aws-deploy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>osiris</artifactId>
<groupId>ws.osiris</groupId>
<version>1.7.0-SNAPSHOT</version>
<artifactId>osiris</artifactId>
<version>1.6.1</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1329,32 +1329,30 @@ internal class PublishLambdaTemplate(private val codeHash: String) : Template {
val statementId = UUID.randomUUID().toString()
@Language("ES6")
val script = """
const AWS = require('aws-sdk');
const { send, SUCCESS, FAILED } = require('cfn-response');
exports.handler = async (event, context) => {
try {
if (event.RequestType === 'Delete') {
send(event, context, SUCCESS);
return;
}
const lambda = new AWS.Lambda();
const data = await lambda.publishVersion({ FunctionName: event.ResourceProperties.FunctionName }).promise();
const permissionsParams = {
Action: 'lambda:InvokeFunction',
var AWS = require('aws-sdk');
var response = require('cfn-response');
exports.handler = (event, context, callback) => {
if (event.RequestType == 'Delete') {
response.send(event, context, response.SUCCESS);
}
var lambda = new AWS.Lambda();
lambda.publishVersion({FunctionName: event.ResourceProperties.FunctionName}).promise().then((data) => {
var permissionsParams = {
Action: "lambda:InvokeFunction",
FunctionName: data.FunctionArn,
Principal: 'apigateway.amazonaws.com',
SourceArn: '$arn',
StatementId: '$statementId'
};
const resp = await lambda.addPermission(permissionsParams).promise();
send(event, context, SUCCESS, { FunctionArn: data.FunctionArn }, data.FunctionArn);
} catch (e) {
send(event, context, FAILED, e);
Principal: "apigateway.amazonaws.com",
SourceArn: "$arn",
StatementId: "$statementId"
}
};
lambda.addPermission(permissionsParams).promise().then((resp) => {
return response.send(event, context, response.SUCCESS, {FunctionArn: data.FunctionArn}, data.FunctionArn);
}).catch((e) => {
return response.send(event, context, response.FAILED, e);
});
}).catch((e) => {
return response.send(event, context, response.FAILED, e);
});
};
"""

@Language("yaml")
Expand All @@ -1375,7 +1373,7 @@ internal class PublishLambdaTemplate(private val codeHash: String) : Template {
| Code:
| ZipFile: !Sub |
| $script
| Runtime: nodejs18.x
| Runtime: nodejs16.x
|
| LambdaVersionExecutionRole:
| Type: AWS::IAM::Role
Expand Down
2 changes: 1 addition & 1 deletion aws/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>ws.osiris</groupId>
<artifactId>osiris</artifactId>
<version>1.7.0-SNAPSHOT</version>
<version>1.6.1</version>
<relativePath>..</relativePath>
</parent>
<artifactId>osiris-aws</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>ws.osiris</groupId>
<artifactId>osiris</artifactId>
<version>1.7.0-SNAPSHOT</version>
<version>1.6.1</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>ws.osiris</groupId>
<artifactId>osiris</artifactId>
<version>1.7.0-SNAPSHOT</version>
<version>1.6.1</version>
<relativePath>..</relativePath>
</parent>

Expand Down
8 changes: 4 additions & 4 deletions gradle-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ plugins {
apply plugin: 'maven'

group = 'ws.osiris'
version = '1.7.0-SNAPSHOT'
version = '1.6.1'

ext {
kotlinVersion = '1.3.31'
osirisVersion = '1.7.0-SNAPSHOT'
osirisVersion = '1.6.1'
}

repositories {
Expand Down Expand Up @@ -70,7 +70,7 @@ pluginBundle {
// mavenLocal()
// }
// dependencies {
// classpath 'ws.osiris:osiris-gradle-plugin:1.7.0-SNAPSHOT'
// classpath 'ws.osiris:osiris-gradle-plugin:1.6.1'
// }
// }
//
Expand All @@ -83,7 +83,7 @@ publishing {
maven(MavenPublication) {
groupId = 'ws.osiris'
artifactId = 'osiris-gradle-plugin'
version = '1.7.0-SNAPSHOT'
version = '1.6.1'
from components.java
}
}
Expand Down
4 changes: 2 additions & 2 deletions gradle-plugin/src/main/gradle/generateProject.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'ws.osiris.project' version '1.7.0-SNAPSHOT'
id 'ws.osiris.project' version '1.6.1'
}
// For local testing the plugins block needs to be replaced with
//
Expand All @@ -9,7 +9,7 @@ plugins {
// mavenLocal()
// }
// dependencies {
// classpath 'ws.osiris:osiris-gradle-plugin:1.7.0-SNAPSHOT'
// classpath 'ws.osiris:osiris-gradle-plugin:1.6.1'
// }
// }
// apply plugin: 'ws.osiris.project'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ subprojects {
}

ext {
osirisVersion = '1.7.0-SNAPSHOT'
osirisVersion = '1.6.1'
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'ws.osiris.deploy' version '1.7.0-SNAPSHOT'
id 'ws.osiris.deploy' version '1.6.1'
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion integration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>osiris</artifactId>
<groupId>ws.osiris</groupId>
<version>1.7.0-SNAPSHOT</version>
<version>1.6.1</version>
<relativePath>..</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion local-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>ws.osiris</groupId>
<artifactId>osiris</artifactId>
<version>1.7.0-SNAPSHOT</version>
<version>1.6.1</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>ws.osiris</groupId>
<artifactId>osiris</artifactId>
<version>1.7.0-SNAPSHOT</version>
<version>1.6.1</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>ws.osiris</groupId>
<artifactId>osiris</artifactId>
<version>1.7.0-SNAPSHOT</version>
<version>1.6.1</version>
<packaging>pom</packaging>
<name>Osiris</name>
<description>Simple Serverless Web Apps using Kotlin, AWS Lambda, AWS API Gateway</description>
Expand Down
2 changes: 1 addition & 1 deletion server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>ws.osiris</groupId>
<artifactId>osiris</artifactId>
<version>1.7.0-SNAPSHOT</version>
<version>1.6.1</version>
<relativePath>..</relativePath>
</parent>
<artifactId>osiris-server</artifactId>
Expand Down

0 comments on commit 38b485d

Please sign in to comment.