jenkins-scripts/install/no-cy/Jenkinsfile

18 lines
590 B
Plaintext
Raw Permalink Normal View History

2020-09-21 19:36:30 +03:00
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"
}
}