From 80768ed617cc265b8f4a8104cf302aba8af9ec17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=80=20?= =?UTF-8?q?=D0=9F=D1=80=D0=B8=D0=BC=D0=B0=D0=BA=D0=BE=D0=B2?= Date: Mon, 21 Sep 2020 19:36:30 +0300 Subject: [PATCH 1/3] no-cy --- install/no-cy/Jenkinsfile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 install/no-cy/Jenkinsfile diff --git a/install/no-cy/Jenkinsfile b/install/no-cy/Jenkinsfile new file mode 100644 index 0000000..515123b --- /dev/null +++ b/install/no-cy/Jenkinsfile @@ -0,0 +1,17 @@ +import groovy.json.JsonBuilder +import groovy.json.JsonSlurper +import groovy.json.JsonOutput +import java.util.HashMap +import groovy.json.* + +stage('install:no:cy') { + echo 'Пробуем убрать cypress из зависимостей)' + def cyString = sh(returnStdout: true, script: "cat ./package.json | grep cypress\\\" || echo 'empty'") + echo cyString + + if (cyString.contains(',')) { + sh "mv ./package.json ./tmp-package.json" + echo "Cypress найден. Удаляем..." + sh "cat ./tmp-package.json | grep -v cypress\\\" > ./package.json" + } +} From a95d65df285f1f161c6ac00e735d9becb99ab260 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=80=20?= =?UTF-8?q?=D0=9F=D1=80=D0=B8=D0=BC=D0=B0=D0=BA=D0=BE=D0=B2?= Date: Wed, 23 Sep 2020 23:00:31 +0300 Subject: [PATCH 2/3] star-gold bage --- build/prod/Jenkinsfile | 3 ++- predeploy/Jenkinsfile | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/build/prod/Jenkinsfile b/build/prod/Jenkinsfile index 1982507..29e1eb9 100644 --- a/build/prod/Jenkinsfile +++ b/build/prod/Jenkinsfile @@ -1,3 +1,4 @@ stage ('production build') { - sh 'npm run build:prod' + sh 'npm run build:prod'; + sh 'ls dist'; } diff --git a/predeploy/Jenkinsfile b/predeploy/Jenkinsfile index a6bcc75..8d31453 100644 --- a/predeploy/Jenkinsfile +++ b/predeploy/Jenkinsfile @@ -6,11 +6,17 @@ stage ('predeploy') { if (tag) { echo 'found tag ' + tag + addBadge( + icon: 'star-gold.png', + text: "Release ${tag}") def tagNoV = tag.substring(1) - sh "cd ${TARGET_FOLDER}; echo '${tagNoV}' > ${DEPLOY_VERSION_VAR}" + sh "cd ${TARGET_FOLDER}; echo '${tagNoV}' > ${DEPLOY_VERSION_VAR}"; // sh "cd ${TARGET_FOLDER} ; echo 'mkdir ${tagNoV}; mv ./${branchName}/* ./${tagNoV}; rm -r -d ./${branchName}; rm ${DEPLOY_VERSION_VAR}' > ${DEPLOY_VERSION_VAR}" } else { echo 'tag not found' + addBadge( + icon: 'info.gif', + text: "Сборка в master") sh "cd ${TARGET_FOLDER}; echo '${branchName}' > ${DEPLOY_VERSION_VAR}" // sh "cd ${TARGET_FOLDER} ; echo 'rm ${DEPLOY_VERSION_VAR}' > ${DEPLOY_VERSION_VAR}" } From 1f078138c968ced1e1d1fc196d9a79571cd31da6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=80=20?= =?UTF-8?q?=D0=9F=D1=80=D0=B8=D0=BC=D0=B0=D0=BA=D0=BE=D0=B2?= Date: Sat, 26 Sep 2020 14:28:11 +0300 Subject: [PATCH 3/3] no electron --- build/dev/Jenkinsfile | 6 +++++- install/no-electron/Jenkinsfile | 17 +++++++++++++++++ stats/Jenkinsfile | 6 +++--- 3 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 install/no-electron/Jenkinsfile diff --git a/build/dev/Jenkinsfile b/build/dev/Jenkinsfile index 33a5235..8428aac 100644 --- a/build/dev/Jenkinsfile +++ b/build/dev/Jenkinsfile @@ -1,3 +1,7 @@ stage ('build') { - sh 'npm run build' + try { + sh 'npm run build' + } catch (error) { + echo error + } } diff --git a/install/no-electron/Jenkinsfile b/install/no-electron/Jenkinsfile new file mode 100644 index 0000000..6f3042e --- /dev/null +++ b/install/no-electron/Jenkinsfile @@ -0,0 +1,17 @@ +import groovy.json.JsonBuilder +import groovy.json.JsonSlurper +import groovy.json.JsonOutput +import java.util.HashMap +import groovy.json.* + +stage('install:no:electron') { + echo 'Пробуем убрать electron из зависимостей)' + def elString = sh(returnStdout: true, script: "cat ./package.json | grep electron\\\" || echo 'empty'") + echo elString + + if (elString.contains(',')) { + sh "mv ./package.json ./tmp-package.json" + echo "Electron найден. Удаляем..." + sh "cat ./tmp-package.json | grep -v electron\\\" > ./package.json" + } +} diff --git a/stats/Jenkinsfile b/stats/Jenkinsfile index 890d8d9..6f1ea66 100644 --- a/stats/Jenkinsfile +++ b/stats/Jenkinsfile @@ -2,8 +2,8 @@ stage('stats') { echo 'checking node and npm versions' sh 'node -v' sh 'npm -v' - // sh 'ls -a' - // sh 'df -h' - // sh 'free -m' + sh 'ls -a' + sh 'df -h' + sh 'free -m' // sh 'vmstat -s' }