From 1831134f2d0216b73b8fd9be8e8c62c955ca7f22 Mon Sep 17 00:00:00 2001 From: Son Nguyen Date: Thu, 12 Jan 2023 13:53:02 +0700 Subject: [PATCH] [framework] build: add Jenkinsfile for PR automation --- Jenkinsfile | 39 +++++++++++++++++++++++++++ libraries/contracts/Jenkinsfile | 32 ++++++++++++++++++++++ libraries/ui-components/Jenkinsfile | 32 ++++++++++++++++++++++ runtime/backend/Jenkinsfile | 32 ++++++++++++++++++++++ runtime/dapp-frontend-vue/Jenkinsfile | 32 ++++++++++++++++++++++ 5 files changed, 167 insertions(+) create mode 100644 Jenkinsfile create mode 100644 libraries/contracts/Jenkinsfile create mode 100644 libraries/ui-components/Jenkinsfile create mode 100644 runtime/backend/Jenkinsfile create mode 100644 runtime/dapp-frontend-vue/Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 00000000..5d12d0b2 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,39 @@ +pipeline { + agent any + stages { + stage('Download dependencies') { + steps { + echo 'Downloading dependencies...' + sh 'npm install' + } + } + + stage('Lerna bootstrap') { + steps { + echo 'Bootstrapping lerna...' + sh './node_modules/.bin/lerna bootstrap' + } + } + + stage('Run linter checks') { + steps { + echo 'Running linter checks...' + sh 'npm run lint' + } + } + + stage('Build software') { + steps { + echo 'Running compiler...' + sh 'npm run build' + } + } + + stage('Run unit tests') { + steps { + echo 'Running unit tests...' + sh 'npm run test' + } + } + } +} \ No newline at end of file diff --git a/libraries/contracts/Jenkinsfile b/libraries/contracts/Jenkinsfile new file mode 100644 index 00000000..aef46575 --- /dev/null +++ b/libraries/contracts/Jenkinsfile @@ -0,0 +1,32 @@ +pipeline { + agent any + stages { + stage('Download dependencies') { + steps { + echo 'Downloading dependencies...' + sh 'npm install' + } + } + + stage('Run linter checks') { + steps { + echo 'Running linter checks...' + sh 'npm run lint' + } + } + + stage('Build software') { + steps { + echo 'Running compiler...' + sh 'npm run build' + } + } + + stage('Run unit tests') { + steps { + echo 'Running unit tests...' + sh 'npm run test' + } + } + } +} \ No newline at end of file diff --git a/libraries/ui-components/Jenkinsfile b/libraries/ui-components/Jenkinsfile new file mode 100644 index 00000000..aef46575 --- /dev/null +++ b/libraries/ui-components/Jenkinsfile @@ -0,0 +1,32 @@ +pipeline { + agent any + stages { + stage('Download dependencies') { + steps { + echo 'Downloading dependencies...' + sh 'npm install' + } + } + + stage('Run linter checks') { + steps { + echo 'Running linter checks...' + sh 'npm run lint' + } + } + + stage('Build software') { + steps { + echo 'Running compiler...' + sh 'npm run build' + } + } + + stage('Run unit tests') { + steps { + echo 'Running unit tests...' + sh 'npm run test' + } + } + } +} \ No newline at end of file diff --git a/runtime/backend/Jenkinsfile b/runtime/backend/Jenkinsfile new file mode 100644 index 00000000..aef46575 --- /dev/null +++ b/runtime/backend/Jenkinsfile @@ -0,0 +1,32 @@ +pipeline { + agent any + stages { + stage('Download dependencies') { + steps { + echo 'Downloading dependencies...' + sh 'npm install' + } + } + + stage('Run linter checks') { + steps { + echo 'Running linter checks...' + sh 'npm run lint' + } + } + + stage('Build software') { + steps { + echo 'Running compiler...' + sh 'npm run build' + } + } + + stage('Run unit tests') { + steps { + echo 'Running unit tests...' + sh 'npm run test' + } + } + } +} \ No newline at end of file diff --git a/runtime/dapp-frontend-vue/Jenkinsfile b/runtime/dapp-frontend-vue/Jenkinsfile new file mode 100644 index 00000000..aef46575 --- /dev/null +++ b/runtime/dapp-frontend-vue/Jenkinsfile @@ -0,0 +1,32 @@ +pipeline { + agent any + stages { + stage('Download dependencies') { + steps { + echo 'Downloading dependencies...' + sh 'npm install' + } + } + + stage('Run linter checks') { + steps { + echo 'Running linter checks...' + sh 'npm run lint' + } + } + + stage('Build software') { + steps { + echo 'Running compiler...' + sh 'npm run build' + } + } + + stage('Run unit tests') { + steps { + echo 'Running unit tests...' + sh 'npm run test' + } + } + } +} \ No newline at end of file