Skip to content

Commit

Permalink
Update lerna and minimum node versio
Browse files Browse the repository at this point in the history
- Update to lerna 6 and set node 14 as minimum engine version 
eclipse-glsp/glsp#676
eclipse-glsp/glsp#676
- Update jenkins file to 
 - ensure that we don't exhaust resource limits
 - enable error reporting when master builds fails
  eclipse-glsp/glsp#794
  • Loading branch information
tortmayr committed Dec 5, 2022
1 parent e0d359d commit 6a50cdb
Show file tree
Hide file tree
Showing 4 changed files with 1,891 additions and 1,700 deletions.
43 changes: 37 additions & 6 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ kind: Pod
spec:
containers:
- name: node
image: node:12.22.9
image: node:14
tty: true
resources:
limits:
memory: "4Gi"
cpu: "2"
memory: "2Gi"
cpu: "1"
requests:
memory: "4Gi"
cpu: "2"
memory: "2Gi"
cpu: "1"
command:
- cat
volumeMounts:
Expand Down Expand Up @@ -43,6 +43,7 @@ pipeline {
environment {
YARN_CACHE_FOLDER = "${env.WORKSPACE}/yarn-cache"
SPAWN_WRAP_SHIM_ROOT = "${env.WORKSPACE}"
EMAIL_TO= "[email protected]"
}

stages {
Expand Down Expand Up @@ -93,7 +94,7 @@ pipeline {
}
}
steps {
build job: 'deploy-npm-glsp-server-node', wait: false
build job: 'deploy-npm-glsp-server-node', wait: true
}
}
}
Expand All @@ -109,5 +110,35 @@ pipeline {
junit 'node_modules/**/report.xml'
}
}
failure {
script {
if (env.BRANCH_NAME == 'master') {
echo "Build result FAILURE: Send email notification to ${EMAIL_TO}"
emailext attachLog: true,
body: 'Job: ${JOB_NAME}<br>Build Number: ${BUILD_NUMBER}<br>Build URL: ${BUILD_URL}',
mimeType: 'text/html', subject: 'Build ${JOB_NAME} (#${BUILD_NUMBER}) FAILURE', to: "${EMAIL_TO}"
}
}
}
unstable {
script {
if (env.BRANCH_NAME == 'master') {
echo "Build result UNSTABLE: Send email notification to ${EMAIL_TO}"
emailext attachLog: true,
body: 'Job: ${JOB_NAME}<br>Build Number: ${BUILD_NUMBER}<br>Build URL: ${BUILD_URL}',
mimeType: 'text/html', subject: 'Build ${JOB_NAME} (#${BUILD_NUMBER}) UNSTABLE', to: "${EMAIL_TO}"
}
}
}
fixed {
script {
if (env.BRANCH_NAME == 'master') {
echo "Build back to normal: Send email notification to ${EMAIL_TO}"
emailext attachLog: false,
body: 'Job: ${JOB_NAME}<br>Build Number: ${BUILD_NUMBER}<br>Build URL: ${BUILD_URL}',
mimeType: 'text/html', subject: 'Build ${JOB_NAME} back to normal (#${BUILD_NUMBER})', to: "${EMAIL_TO}"
}
}
}
}
}
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"name": "parent",
"version": "1.0.0",
"engines": {
"yarn": ">=1.7.0 <2.x.x"
"yarn": ">=1.7.0 <2.x.x",
"node": ">=14.18.0"
},
"scripts": {
"prepare": "lerna run prepare",
Expand All @@ -19,11 +20,11 @@
"start": "yarn --cwd examples/workflow-server start:server"
},
"devDependencies": {
"@eclipse-glsp/config": "^1.0.0",
"@types/node": "12.x",
"lerna": "^4.0.0",
"@eclipse-glsp/config": "1.1.0-next.d03ad9f.112",
"@types/node": "14.x",
"lerna": "^6.1.0",
"reflect-metadata": "^0.1.13",
"typescript": "~4.5.5"
"typescript": "^4.9.3"
},
"workspaces": [
"packages/*",
Expand Down
2 changes: 1 addition & 1 deletion packages/server-node/src/launch/cli-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export function createCliParser<O extends LaunchOptions = LaunchOptions>(options
return { command, parse: argv => parse<O>(command, options as Partial<O>, argv) };
}

export function parse<T>(command: cmd.Command, defaultOptions: Partial<T>, argv?: string[]): T {
export function parse<T extends cmd.OptionValues>(command: cmd.Command, defaultOptions: Partial<T>, argv?: string[]): T {
command.parse(argv);
return { ...defaultOptions, ...command.opts<T>() };
}
Expand Down
Loading

0 comments on commit 6a50cdb

Please sign in to comment.