From 328d734e24b9c76a441cd9cd50f5b2f830d6f634 Mon Sep 17 00:00:00 2001 From: Timo Hocker Date: Mon, 4 May 2020 12:20:14 +0200 Subject: [PATCH] add jenkinsfile --- asset_jenkinsfile.js | 26 ++++++++++++++++++++++++++ index.js | 3 ++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 asset_jenkinsfile.js diff --git a/asset_jenkinsfile.js b/asset_jenkinsfile.js new file mode 100644 index 0000000..e1bc1ae --- /dev/null +++ b/asset_jenkinsfile.js @@ -0,0 +1,26 @@ +'use strict'; + +module.exports = `pipeline { + agent any + + environment { + VERSION = VersionNumber([ + versionNumberString: + '\${BUILDS_ALL_TIME}', + versionPrefix: '1.0.', + worstResultForIncrement: 'SUCCESS' + ]) + } + + stages { + stage('Building') { + steps { + script { + currentBuild.displayName = env.VERSION + } + sh 'yarn ci \${VERSION}' + } + } + } +} +`; diff --git a/index.js b/index.js index e16cdb1..072dfb7 100644 --- a/index.js +++ b/index.js @@ -1,8 +1,9 @@ 'use strict'; const jenkins = require ('./asset_jenkins'); +const jenkinsfile = require ('./asset_jenkinsfile'); -const files = { jenkins }; +const files = { jenkins, jenkinsfile }; const scripts = { lint: 'eslint . --ext .js,.jsx,.ts,.tsx,.vue,.mjs',