Skip to content

Commit

Permalink
Feature: Support latest runtimes for AWS Lambda (#1298)
Browse files Browse the repository at this point in the history
* Bump junit from 4.12 to 4.13.1 in /templates/api-template-java (#1296)

Bumps [junit](https://github.com/junit-team/junit4) from 4.12 to 4.13.1.
- [Release notes](https://github.com/junit-team/junit4/releases)
- [Changelog](https://github.com/junit-team/junit4/blob/main/doc/ReleaseNotes4.12.md)
- [Commits](junit-team/junit4@r4.12...r4.13.1)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: Satish Malireddi <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Feature: Support latest runtimes for AWS Lambda (#1297)

Co-authored-by: Satish Malireddi <[email protected]>

* changes (#1299)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: SauravD <[email protected]>
  • Loading branch information
3 people authored Nov 9, 2020
1 parent 34ba544 commit ff02d0b
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 15 deletions.
12 changes: 9 additions & 3 deletions builds/delete-serverless-service-build-pack/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,9 @@ node {
events.sendStartedEvent('DELETE_ENVIRONMENT', "Environment cleanup for " + _envId + " started", null, _envId)
echo 'undeploying service for environment: ' + _envId

vaultUtilityModule.setEnvironmentLogicalId(_envId)
if (configLoader.TVAULT && configLoader.TVAULT.IS_ENABLED instanceof Boolean && configLoader.TVAULT.IS_ENABLED) {
vaultUtilityModule.setEnvironmentLogicalId(_envId)
}

switch(apiPlatform) {
case 'aws_apigateway':
Expand Down Expand Up @@ -270,7 +272,9 @@ node {
events.setEnvironment(_envId)
events.sendStartedEvent('DELETE_ENVIRONMENT', "Environment cleanup for " + _envId + " started", null, _envId)

vaultUtilityModule.setEnvironmentLogicalId(_envId)
if (configLoader.TVAULT && configLoader.TVAULT.IS_ENABLED instanceof Boolean && configLoader.TVAULT.IS_ENABLED) {
vaultUtilityModule.setEnvironmentLogicalId(_envId)
}

if (service_config['event_source_s3']) { // check service for S3 Bucket and make empty if not. //
checkBucket(current_environment_id);
Expand Down Expand Up @@ -347,7 +351,9 @@ node {
events.sendStartedEvent('DELETE_ENVIRONMENT', "Environment cleanup for " + _envId + " started", null, _envId)
echo 'undeploying sls service for environment: ' + _envId

vaultUtilityModule.setEnvironmentLogicalId(_envId)
if (configLoader.TVAULT && configLoader.TVAULT.IS_ENABLED instanceof Boolean && configLoader.TVAULT.IS_ENABLED) {
vaultUtilityModule.setEnvironmentLogicalId(_envId)
}

cleanupEventSourceMapping(_envId)
if (has_serverless_yml) {
Expand Down
6 changes: 6 additions & 0 deletions builds/jazz-build-module/sls-app/serverless-build-rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,11 @@ provider:
sbr-constraint:
sbr-enum:
- nodejs10.x
- nodejs12.x
- java8
- java11
- python3.6
- python3.8
- go1.x
sbr-value:
sbr-formula: ${config.providerRuntime}
Expand Down Expand Up @@ -581,8 +584,11 @@ function:
sbr-constraint:
sbr-enum:
- nodejs10.x
- nodejs12.x
- java8
- java11
- python3.6
- python3.8
- go1.x
sbr-value:
sbr-formula: ${config.providerRuntime}
Expand Down
4 changes: 2 additions & 2 deletions builds/jenkins-build-pack-api/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ def buildLambda(String runtime, String repo_name) {
sh "rm -rf library"
sh "mkdir library"
sh "touch library/__init__.py"
if (runtime == 'python3.6') {
if (runtime == 'python3.6' || runtime == 'python3.8') {
//Installing dependencies
sh "pip3 install -r requirements.txt -t library"
// create virtual environment and install pytest
Expand Down Expand Up @@ -909,7 +909,7 @@ def validateDeploymentConfigurations(def prop) {
error "Wrong configuration. Value for Key 'providerRuntime' is missing in the configuration"

} else {
def validRuntimes = ["nodejs10.x", "python3.6", "java8", "go1.x"]
def validRuntimes = ["nodejs10.x", "nodejs12.x", "python3.6", "python3.8", "java8", "java11", "go1.x"]
def flag = false
for (int i = 0; i < validRuntimes.size(); i++) {
if (_runtime == validRuntimes[i]) {
Expand Down
4 changes: 2 additions & 2 deletions builds/jenkins-build-pack-function/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ def buildFunction(String runtime, String repo_name) {
sh "mkdir library"
sh "touch library/__init__.py"

if (runtime == 'python3.6'){
if (runtime == 'python3.6' || runtime == 'python3.8'){
// Installing dependencies
sh "pip3 install -r requirements.txt -t library"
// create virtual environment and install pytest
Expand Down Expand Up @@ -761,7 +761,7 @@ def validateDeploymentConfigurations(def prop) {
if (_runtime == "") {
error "Wrong configuration. Value for Key 'providerRuntime' is missing in the configuration"
} else {
def validRuntimes = ["nodejs10.x", "python3.6", "java8", "go1.x", "c#"]
def validRuntimes = ["nodejs10.x", "nodejs12.x", "python3.6", "python3.8", "java8", "java11", "go1.x", "c#"]
def flag = false

for (int i = 0; i < validRuntimes.size(); i++) {
Expand Down
4 changes: 2 additions & 2 deletions builds/jenkins-build-pack-sls-app/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ def buildSlsApp(String runtime, String repo_name) {
//Installing dependencies
sh "pip install -r requirements.txt -t library"
sh "touch library/__init__.py"
if (runtime == 'python3.6') {
if (runtime == 'python3.6' || runtime == 'python3.8') {
// create virtual environment and install pytest
sh """
python3 -m venv virtualenv
Expand Down Expand Up @@ -655,7 +655,7 @@ def validateDeploymentConfigurations(def prop) {
if (_runtime == "") {
error "Wrong configuration. Value for Key 'providerRuntime' is missing in the configuration"
} else {
def validRuntimes = ["nodejs10.x", "python3.6", "java8", "go1.x"]
def validRuntimes = ["nodejs10.x", "nodejs12.x", "python3.6", "python3.8", "java8", "java11", "go1.x"]
def flag = false

for (int i = 0; i < validRuntimes.size(); i++) {
Expand Down
3 changes: 3 additions & 0 deletions core/jazz_create-serverless-service/swagger/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,11 @@
"description": "The runtime framework for executing your code",
"enum": [
"nodejs10.x",
"nodejs12.x",
"java8",
"java11",
"python3.6",
"python3.8",
"go1.x"
]
},
Expand Down
3 changes: 3 additions & 0 deletions core/jazz_services/config/global-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,11 @@
],
"SERVICE_RUNTIMES": [
"nodejs10.x",
"nodejs12.x",
"python3.6",
"python3.8",
"java8",
"java11",
"go1.x",
"c#"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -466,10 +466,13 @@ export class CreateServiceComponent implements OnInit {
if(!this.startNew){
switch(this.runtime){

case 'java8' : this.deploymentDescriptorText = this.deploymentDescriptorTextJava; break;
case 'nodejs10.x' : this.deploymentDescriptorText = this.deploymentDescriptorTextNodejs; break;
case 'java8' :
case 'java11': this.deploymentDescriptorText = this.deploymentDescriptorTextJava; break;
case 'nodejs10.x' :
case 'nodejs12.x' : this.deploymentDescriptorText = this.deploymentDescriptorTextNodejs; break;
case 'go1.x' : this.deploymentDescriptorText = this.deploymentDescriptorTextgo; break;
case 'python3.6' : this.deploymentDescriptorText = this.deploymentDescriptorTextpython; break;
case 'python3.6' :
case 'python3.8' : this.deploymentDescriptorText = this.deploymentDescriptorTextpython; break;
case 'c#' : this.deploymentDescriptorText = this.deploymentDescriptorTextpython; break;
}
}
Expand Down
5 changes: 3 additions & 2 deletions core/jazz_ui/src/environments/environment.oss.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ export const environment = {
multi_env: {multi_env},
slack_support: {slack_support},
webLists: { "html": "Static", "angular": "Angular", "react": "ReactJS" },
envLists: { "nodejs10.x": "Nodejs 10.x", "python3.6": "Python 3.6", "java8": "Java 8", "go1.x": "Go 1.x", "c#": "C#" },
envLists: {"nodejs12.x": "Nodejs 12.x", "python3.8": "Python 3.8", "java11": "Java 11", "go1.x": "Go 1.x", "c#": "C#" },
runtimeLists: {"nodejs": ["Nodejs 10.x", "Nodejs 12.x"], "python": ["Python 3.6", "Python 3.8"], "java": ["Java 8", "Java 11"], "go": ["Go 1.x"], "c": ["C#"]},
serviceTabs: ["{overview}", "{access control}", "{metrics}", "{logs}", "{cost}"],
environmentTabs: ["{env_overview}", "{deployments}", "{code quality}", "{metrics}", "{assets}", "{env_logs}"],
assetTypeList: [
Expand Down Expand Up @@ -55,7 +56,7 @@ export const environment = {
aws: {
account_number: '{account_number}',
region: '{region}',
envLists: {"nodejs10.x": "Nodejs 10.x", "python3.6": "Python 3.6", "java8": "Java 8", "go1.x": "Go 1.x"},
envLists: {"nodejs12.x": "Nodejs 12.x", "python3.8": "Python 3.8", "java11": "Java 11", "go1.x": "Go 1.x", "c#": "C#"},
accountMap: {accountMap},
default_region: '{default_region}',
default_account: '{default_account}'
Expand Down
2 changes: 1 addition & 1 deletion templates/api-template-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down

0 comments on commit ff02d0b

Please sign in to comment.