{
"name": "talk-cicd-javascript",
"version": "0.1.0",
"description": "talk about CICD with JS",
"dependencies": {
"express": "4.15.2",
"socket.io": "1.7.3"
},
"license": "MIT"
}
<dependency>
<groupId>ch.basler.cicd</groupId>
<artifactId>demo-java</artifactId>
<version>0.1.3</version>
</dependency>
$ npm info @cicd/demo
options {
disableConcurrentBuilds()
}
stage('Example Build') {
node() {
checkout scm
mavenbuild()
}
}
options {
disableConcurrentBuilds()
}
parameters {
choice(
choices: 'Major\nMinor\nPatch',
description: 'Which version?',
name: 'version'
)
}
stage('Example Build') {
node() {
checkout scm
npmInit()
npmRelease version: "${params.version}"
}
}
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<executions>
<execution>
<id>install node</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<phase>generate-resources</phase>
</execution>
</executions>
<configuration>
<nodeVersion>v8.11.2</nodeVersion>
<nodeDownloadRoot>${nexusNodeJS}</nodeDownloadRoot>
</configuration>
</plugin>
node {
stage('git checkout') {
checkout scm
}
stage('standard') {
mavenbuild()
}
stage('custom') {
mavenbuild
cmd: "clean install",
mavenArgs: "-DskipTest=true"
}
}
node {
stage('git checkout') {
checkout scm
}
stage('standard') {
npmInit()
npmBuild()
npmRelease()
}
stage('custom') {
npmInit()
npmRun scriptName: "lint-ci"
npmRun scriptName: "test-ci"
npmRun scriptName: "build-prod"
npmRelease version: "major"
}
}