Merge branch 'master' of bitbucket.org:jsadvance20201/jenkins
This commit is contained in:
commit
85f01f43d5
4
build/dev/Jenkinsfile
vendored
4
build/dev/Jenkinsfile
vendored
@ -1,3 +1,7 @@
|
|||||||
stage ('build') {
|
stage ('build') {
|
||||||
|
try {
|
||||||
sh 'npm run build'
|
sh 'npm run build'
|
||||||
|
} catch (error) {
|
||||||
|
echo error
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
3
build/prod/Jenkinsfile
vendored
3
build/prod/Jenkinsfile
vendored
@ -1,3 +1,4 @@
|
|||||||
stage ('production build') {
|
stage ('production build') {
|
||||||
sh 'npm run build:prod'
|
sh 'npm run build:prod';
|
||||||
|
sh 'ls dist';
|
||||||
}
|
}
|
||||||
|
17
install/no-cy/Jenkinsfile
vendored
Normal file
17
install/no-cy/Jenkinsfile
vendored
Normal file
@ -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"
|
||||||
|
}
|
||||||
|
}
|
17
install/no-electron/Jenkinsfile
vendored
Normal file
17
install/no-electron/Jenkinsfile
vendored
Normal file
@ -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"
|
||||||
|
}
|
||||||
|
}
|
8
predeploy/Jenkinsfile
vendored
8
predeploy/Jenkinsfile
vendored
@ -6,11 +6,17 @@ stage ('predeploy') {
|
|||||||
|
|
||||||
if (tag) {
|
if (tag) {
|
||||||
echo 'found tag ' + tag
|
echo 'found tag ' + tag
|
||||||
|
addBadge(
|
||||||
|
icon: 'star-gold.png',
|
||||||
|
text: "Release ${tag}")
|
||||||
def tagNoV = tag.substring(1)
|
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}"
|
// sh "cd ${TARGET_FOLDER} ; echo 'mkdir ${tagNoV}; mv ./${branchName}/* ./${tagNoV}; rm -r -d ./${branchName}; rm ${DEPLOY_VERSION_VAR}' > ${DEPLOY_VERSION_VAR}"
|
||||||
} else {
|
} else {
|
||||||
echo 'tag not found'
|
echo 'tag not found'
|
||||||
|
addBadge(
|
||||||
|
icon: 'info.gif',
|
||||||
|
text: "Сборка в master")
|
||||||
sh "cd ${TARGET_FOLDER}; echo '${branchName}' > ${DEPLOY_VERSION_VAR}"
|
sh "cd ${TARGET_FOLDER}; echo '${branchName}' > ${DEPLOY_VERSION_VAR}"
|
||||||
// sh "cd ${TARGET_FOLDER} ; echo 'rm ${DEPLOY_VERSION_VAR}' > ${DEPLOY_VERSION_VAR}"
|
// sh "cd ${TARGET_FOLDER} ; echo 'rm ${DEPLOY_VERSION_VAR}' > ${DEPLOY_VERSION_VAR}"
|
||||||
}
|
}
|
||||||
|
6
stats/Jenkinsfile
vendored
6
stats/Jenkinsfile
vendored
@ -2,8 +2,8 @@ stage('stats') {
|
|||||||
echo 'checking node and npm versions'
|
echo 'checking node and npm versions'
|
||||||
sh 'node -v'
|
sh 'node -v'
|
||||||
sh 'npm -v'
|
sh 'npm -v'
|
||||||
// sh 'ls -a'
|
sh 'ls -a'
|
||||||
// sh 'df -h'
|
sh 'df -h'
|
||||||
// sh 'free -m'
|
sh 'free -m'
|
||||||
// sh 'vmstat -s'
|
// sh 'vmstat -s'
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user