Skip to content

Commit

Permalink
Repo housekeeping
Browse files Browse the repository at this point in the history
Update lerna and minimum node version
- eclipse-glsp/glsp#676: 
Update to lerna 6 and set node 14 as minimum engine version

- eclipse-glsp/glsp#812:
 Improve yarn scripts
    - Remove linting from prepare step
    - Add dedicated :ci scrips for testing and linting
    - Add 'all' script on root level
    - Consistently sort scripts ascending

- eclipse-glsp/glsp#680: 
Update to latest `@eclipse-glsp/config` version

- eclipse-glsp/glsp#794: Update Jenkinsfile to
    - directly include deploy step instead of spawning a new dedicated job
    - enable error reporting when master builds fail
  • Loading branch information
tortmayr committed Dec 13, 2022
1 parent 151c3c1 commit ee5e753
Show file tree
Hide file tree
Showing 10 changed files with 1,835 additions and 1,593 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -54,7 +54,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -68,4 +68,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ lib
*.log
pack
*.jar
tsconfig.tsbuildinfo
tsconfig.tsbuildinfo
eslint.xml
66 changes: 58 additions & 8 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,22 @@ pipeline {
environment {
YARN_CACHE_FOLDER = "${env.WORKSPACE}/yarn-cache"
SPAWN_WRAP_SHIM_ROOT = "${env.WORKSPACE}"
EMAIL_TO= "[email protected]"
}

stages {
stage('Build') {
steps {
timeout(30) {
container('node') {
sh "yarn build"
container('node') {
timeout(30){
sh "yarn install"
script {
// Fail the step if there are uncommited changes to the yarn.lock file
if (sh(returnStatus: true, script: 'git diff --name-only | grep -q "^yarn.lock"') == 0) {
echo 'The yarn.lock file has uncommited changes!'
error 'The yarn.lock file has uncommited changes!'
}
}
}
}
}
Expand All @@ -60,7 +68,7 @@ pipeline {
steps {
container('node') {
timeout(30){
sh "yarn lint -o eslint.xml -f checkstyle"
sh "yarn lint:ci"
}
}
}
Expand All @@ -73,22 +81,64 @@ pipeline {
expression {
/* Only trigger the deployment job if the changeset contains changes in
the `packages` or `example` directory */
sh(returnStatus: true, script: 'git diff --name-only HEAD^ | grep --quiet "^packages\\|example"') == 0
sh(returnStatus: true, script: 'git diff --name-only HEAD^ | grep -q "^packages\\|example"') == 0
}
}
}
steps {
build job: 'deploy-npm-glsp-vscode-integration', wait: false
steps {
container('node') {
timeout(30) {
withCredentials([string(credentialsId: 'npmjs-token', variable: 'NPM_AUTH_TOKEN')]) {
sh 'printf "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}\n" >> $WORKSPACE/.npmrc'
}
sh 'git config user.email "[email protected]"'
sh 'git config user.name "eclipse-glsp-bot"'
sh 'yarn publish:next'
}
}
}
}
}

post {
always {
success {
// Record & publish ESLint issues
recordIssues enabledForFailure: true, publishAllIssues: true, aggregatingResults: true,
tools: [esLint(pattern: 'node_modules/**/*/eslint.xml')],
qualityGates: [[threshold: 1, type: 'TOTAL', unstable: true]]
}
failure {
script {
if (env.BRANCH_NAME == 'master') {
echo "Build result FAILURE: Send email notification to ${EMAIL_TO}"
emailext attachLog: true,
from: '[email protected]',
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,
from: '[email protected]',
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,
from: '[email protected]',
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}"
}
}
}
}
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Eclipse GLSP VSCode Integration [![build-status](https://img.shields.io/jenkins/build?jobUrl=https%3A%2F%2Fci.eclipse.org%2Fglsp%2Fjob%2Feclipse-glsp%2Fjob%2Fglsp-vscode-integration%2Fjob%2Fmaster%2F)](https://ci.eclipse.org/glsp/job/eclipse-glsp/job/glsp-vscode-integration/job/master) [![build-status-server](https://img.shields.io/jenkins/build?jobUrl=https://ci.eclipse.org/glsp/job/deploy-npm-glsp-vscode-integration/&label=publish)](https://ci.eclipse.org/glsp/job/deploy-npm-glsp-vscode-integration/)
# Eclipse GLSP VSCode Integration [![build-status](https://img.shields.io/jenkins/build?jobUrl=https%3A%2F%2Fci.eclipse.org%2Fglsp%2Fjob%2Feclipse-glsp%2Fjob%2Fglsp-vscode-integration%2Fjob%2Fmaster%2F)](https://ci.eclipse.org/glsp/job/eclipse-glsp/job/glsp-vscode-integration/job/master)

This project contains the glue code necessary to diagram editors built with the [graphical language server platform (GLSP)](https://github.com/eclipse-glsp/glsp) with VSCode, as well as an example VSCode extension for the workflow diagram example for testing purposes.

Expand Down
13 changes: 6 additions & 7 deletions example/workflow/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,13 @@
"workflow-glsp-webview": "1.1.0-next"
},
"scripts": {
"prepare": "yarn clean && yarn build && yarn lint",
"clean": "rimraf lib tsconfig.tsbuildinfo",
"watch": "tsc -w",
"build": "tsc -b",
"clean": "rimraf lib tsconfig.tsbuildinfo ",
"download:Server": "ts-node scripts/download.ts",
"lint": "eslint --ext .ts,.tsx ./src",
"lint:fix": "eslint --fix --ext .ts,.tsx ./src",
"build": "tsc && yarn download:Server",
"publish": "vsce publish",
"download:Server": "ts-node scripts/download.ts"
"lint:ci": "yarn lint -o eslint.xml -f checkstyle",
"prepare": "yarn clean && yarn build",
"watch": "tsc -w"
},
"workspaces": {
"nohoist": [
Expand Down
8 changes: 4 additions & 4 deletions example/workflow/webview/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@
"yargs": "^12.0.5"
},
"scripts": {
"prepare": "yarn clean && yarn build && yarn lint",
"clean": "rimraf lib ../extension/pack tsconfig.tsbuildinfo",
"build": "tsc && webpack --mode=development",
"build": "tsc -b",
"clean": "rimraf lib tsconfig.tsbuildinfo ",
"lint": "eslint --ext .ts,.tsx ./src",
"lint:fix": "eslint --fix --ext .ts,.tsx ./src",
"lint:ci": "yarn lint -o eslint.xml -f checkstyle",
"prepare": "yarn clean && yarn build",
"watch": "tsc -w"
}
}
23 changes: 13 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
{
"private": true,
"engines": {
"yarn": ">=1.7.0 <2.x.x"
"yarn": ">=1.7.0 <2.x.x",
"node": ">=14.18.0"
},
"scripts": {
"all": "yarn install && yarn lint",
"build": "lerna run build",
"clean": "lerna run clean",
"lint": "lerna run lint",
"lint:ci": "lerna run lint:ci",
"prepare": "lerna run prepare",
"watch": "lerna run --parallel watch",
"build": "yarn install --ignore-scripts && lerna run build",
"test": "lerna run test",
"lint": "lerna run lint --",
"publish:prepare": "lerna version --ignore-scripts --yes --no-push",
"publish:latest": "lerna publish from-git --no-git-reset --no-git-tag-version --no-verify-access --no-push",
"publish:next": "SHA=$(git rev-parse --short HEAD) && lerna publish preminor --exact --canary --preid next.${SHA} --dist-tag next --no-git-reset --no-git-tag-version --no-push --ignore-scripts --yes --no-verify-access",
"upgrade:next": "yarn upgrade -p \"@eclipse-glsp.*|sprotty\" --next",
"build:ci": "lerna run build:ci"
"upgrade:next": "yarn upgrade -p \"@eclipse-glsp.*|sprotty.*\" --next ",
"watch": "lerna run --parallel watch"
},
"devDependencies": {
"@eclipse-glsp/config": "^1.0.0",
"@eclipse-glsp/config": "1.1.0-next.d03ad9f.112",
"@types/vscode": "^1.54.0",
"lerna": "^4.0.0",
"@types/node": "14",
"lerna": "^6.1.0",
"mvn-artifact-download": "5.1.0",
"rimraf": "^2.6.3",
"typescript": "^4.4.5"
"typescript": "^4.9.3"
},
"resolutions": {
"**/sprotty": "0.13.0-next.1c4343c.328"
Expand Down
10 changes: 5 additions & 5 deletions packages/vscode-integration-webview/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@
"reflect-metadata": "^0.1.13"
},
"scripts": {
"prepare": "yarn clean && yarn build && yarn lint",
"clean": "rimraf lib tsconfig.tsbuildinfo",
"build": "tsc",
"watch": "tsc -w",
"build": "tsc -b",
"clean": "rimraf lib tsconfig.tsbuildinfo ",
"lint": "eslint --ext .ts,.tsx ./src",
"lint:fix": "eslint --fix --ext .ts,.tsx ./src"
"lint:ci": "yarn lint -o eslint.xml -f checkstyle",
"prepare": "yarn clean && yarn build",
"watch": "tsc -w"
},
"publishConfig": {
"access": "public"
Expand Down
10 changes: 5 additions & 5 deletions packages/vscode-integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@
"@types/vscode": "^1.54.0"
},
"scripts": {
"prepare": "yarn clean && yarn build && yarn lint",
"clean": "rimraf lib tsconfig.tsbuildinfo",
"build": "tsc",
"watch": "tsc -w",
"build": "tsc -b",
"clean": "rimraf lib tsconfig.tsbuildinfo ",
"lint": "eslint --ext .ts,.tsx ./src",
"lint:fix": "eslint --fix --ext .ts,.tsx ./src"
"lint:ci": "yarn lint -o eslint.xml -f checkstyle",
"prepare": "yarn clean && yarn build",
"watch": "tsc -w"
},
"publishConfig": {
"access": "public"
Expand Down
Loading

0 comments on commit ee5e753

Please sign in to comment.