switch to yarn
This commit is contained in:
parent
b92c6c4144
commit
aa542372cc
80
Jenkinsfile
vendored
80
Jenkinsfile
vendored
@ -1,40 +1,40 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
|
|
||||||
environment {
|
environment {
|
||||||
VERSION = VersionNumber([
|
VERSION = VersionNumber([
|
||||||
versionNumberString:
|
versionNumberString:
|
||||||
'${BUILDS_ALL_TIME}',
|
'${BUILDS_ALL_TIME}',
|
||||||
versionPrefix: '1.0.',
|
versionPrefix: '1.0.',
|
||||||
worstResultForIncrement: 'SUCCESS'
|
worstResultForIncrement: 'SUCCESS'
|
||||||
])
|
])
|
||||||
publish = 0
|
publish = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('Setup') {
|
stage('Setup') {
|
||||||
steps {
|
steps {
|
||||||
echo 'Setting up test environment'
|
echo 'Setting up test environment'
|
||||||
sh 'npm ci'
|
sh 'yarn --frozen-lockfile'
|
||||||
sh 'nodejs jenkins.js ${VERSION}'
|
sh 'nodejs jenkins.js ${VERSION}'
|
||||||
script {
|
script {
|
||||||
currentBuild.displayName = env.VERSION
|
currentBuild.displayName = env.VERSION
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
success {
|
success {
|
||||||
script {
|
script {
|
||||||
publish = sh script: "git log -1 | grep '\\[no publish\\]'", returnStatus: true
|
publish = sh script: "git log -1 | grep '\\[no publish\\]'", returnStatus: true
|
||||||
if (publish != 0) {
|
if (publish != 0) {
|
||||||
echo 'Deploying'
|
echo 'Deploying'
|
||||||
sh 'npm publish'
|
sh 'yarn publish'
|
||||||
} else {
|
} else {
|
||||||
echo 'Build successful, Commit not marked for deploying'
|
echo 'Build successful, Commit not marked for deploying'
|
||||||
currentBuild.result = "UNSTABLE"
|
currentBuild.result = "UNSTABLE"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
1858
package-lock.json
generated
1858
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
78
snippets/jenkins/template/general/Jenkinsfile
vendored
78
snippets/jenkins/template/general/Jenkinsfile
vendored
@ -1,39 +1,39 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
|
|
||||||
environment {
|
environment {
|
||||||
VERSION = VersionNumber([
|
VERSION = VersionNumber([
|
||||||
versionNumberString:
|
versionNumberString:
|
||||||
'${BUILDS_ALL_TIME}',
|
'${BUILDS_ALL_TIME}',
|
||||||
versionPrefix: '1.0.',
|
versionPrefix: '1.0.',
|
||||||
worstResultForIncrement: 'SUCCESS'
|
worstResultForIncrement: 'SUCCESS'
|
||||||
])
|
])
|
||||||
publish = 0
|
publish = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('Setup') {
|
stage('Setup') {
|
||||||
steps {
|
steps {
|
||||||
echo 'Setting up test environment'
|
echo 'Setting up test environment'
|
||||||
sh 'echo setup'
|
sh 'echo setup'
|
||||||
script {
|
script {
|
||||||
currentBuild.displayName = env.VERSION
|
currentBuild.displayName = env.VERSION
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
success {
|
success {
|
||||||
script {
|
script {
|
||||||
publish = sh script: "git log -1 | grep '\\[no publish\\]'", returnStatus: true
|
publish = sh script: "git log -1 | grep '\\[no publish\\]'", returnStatus: true
|
||||||
if (publish != 0) {
|
if (publish != 0) {
|
||||||
echo 'Deploying'
|
echo 'Deploying'
|
||||||
sh 'echo deploy'
|
sh 'echo deploy'
|
||||||
} else {
|
} else {
|
||||||
echo 'Build successful, Commit not marked for deploying'
|
echo 'Build successful, Commit not marked for deploying'
|
||||||
currentBuild.result = "UNSTABLE"
|
currentBuild.result = "UNSTABLE"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
80
snippets/jenkins/template/node/Jenkinsfile
vendored
80
snippets/jenkins/template/node/Jenkinsfile
vendored
@ -1,40 +1,40 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
|
|
||||||
environment {
|
environment {
|
||||||
VERSION = VersionNumber([
|
VERSION = VersionNumber([
|
||||||
versionNumberString:
|
versionNumberString:
|
||||||
'${BUILDS_ALL_TIME}',
|
'${BUILDS_ALL_TIME}',
|
||||||
versionPrefix: '1.0.',
|
versionPrefix: '1.0.',
|
||||||
worstResultForIncrement: 'SUCCESS'
|
worstResultForIncrement: 'SUCCESS'
|
||||||
])
|
])
|
||||||
publish = 0
|
publish = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('Setup') {
|
stage('Setup') {
|
||||||
steps {
|
steps {
|
||||||
echo 'Setting up test environment'
|
echo 'Setting up test environment'
|
||||||
sh 'npm ci'
|
sh 'npm ci'
|
||||||
sh 'nodejs jenkins.js ${VERSION}'
|
sh 'nodejs jenkins.js ${VERSION}'
|
||||||
script {
|
script {
|
||||||
currentBuild.displayName = env.VERSION
|
currentBuild.displayName = env.VERSION
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
success {
|
success {
|
||||||
script {
|
script {
|
||||||
publish = sh script: "git log -1 | grep '\\[no publish\\]'", returnStatus: true
|
publish = sh script: "git log -1 | grep '\\[no publish\\]'", returnStatus: true
|
||||||
if (publish != 0) {
|
if (publish != 0) {
|
||||||
echo 'Deploying'
|
echo 'Deploying'
|
||||||
sh 'npm publish'
|
sh 'npm publish'
|
||||||
} else {
|
} else {
|
||||||
echo 'Build successful, Commit not marked for deploying'
|
echo 'Build successful, Commit not marked for deploying'
|
||||||
currentBuild.result = "UNSTABLE"
|
currentBuild.result = "UNSTABLE"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user