From a9d42484cc202d5a025290b36d3a50694f573d5a Mon Sep 17 00:00:00 2001 From: Peter Bastiani Date: Wed, 26 Jul 2023 17:52:01 +0200 Subject: [PATCH] jenkins --- Jenkinsfile | 53 +++++++++++----------------------------------------- package.json | 2 +- 2 files changed, 12 insertions(+), 43 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 706d595..3f03a79 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,54 +1,23 @@ +@Library('farmmaps-shared-library') _ + pipeline { - agent any - environment { - PACKAGE_VERSION_PREFIX=sh(script: 'jq .version package.json |sed "s/\\"//g"', returnStdout: true).trim() - PACKAGE_VERSION="${PACKAGE_VERSION_PREFIX}" + agent any; + options { + copyArtifactPermission projectNames: env.allProjectsArtifactPermission; } stages { - stage('npm install'){ + stage('FarmmapsLibBuildAll') { steps { - sh '''rm -rf node_modules/ - npm install --legacy-peer-deps - cd projects/common - npm install --legacy-peer-deps - cd ../common-map - npm install --legacy-peer-deps - cd ../common-map3d - npm install --legacy-peer-deps - ''' + stepFarmmapsLibBuildAll(); } } - stage('build'){ - steps { - sh '''ng build common --configuration production - ng build common-map --configuration production - ng build common-map3d --configuration production''' - } - } - stage('npm publish'){ - steps { - sh '''cd dist/common - npm version ${PACKAGE_VERSION} --allow-same-version - npm publish - cd ../common-map - npm version ${PACKAGE_VERSION} --allow-same-version - npm publish - cd ../common-map3d - npm version ${PACKAGE_VERSION} --allow-same-version - npm publish''' - } - } - } post { + success { + postSuccess(); + } always { - emailext ( - body: '${DEFAULT_CONTENT}', - mimeType: 'text/html', - replyTo: '${DEFAULT_REPLYTO}', - subject: '${DEFAULT_SUBJECT}', - to: emailextrecipients([[$class: 'CulpritsRecipientProvider'], [$class: 'RequesterRecipientProvider']]) - ) + postAlways(); } } } \ No newline at end of file diff --git a/package.json b/package.json index 7b3883c..3cc8c97 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "farmmaps-lib-app", - "version": "3.2.1", + "version": "3.2.99", "scripts": { "ng": "ng", "start": "ng serve",