Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
129 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
properties properties: [ | ||
[$class: 'BuildDiscarderProperty', strategy: [$class: 'LogRotator', artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '30', numToKeepStr: '10']], | ||
[$class: 'GithubProjectProperty', displayName: '', projectUrlStr: 'https://github.com/hypery2k/galenframework-cli'], | ||
] | ||
|
||
node { | ||
def buildNumber = env.BUILD_NUMBER | ||
def workspace = env.WORKSPACE | ||
def buildUrl = env.BUILD_URL | ||
|
||
// PRINT ENVIRONMENT TO JOB | ||
echo "workspace directory is $workspace" | ||
echo "build URL is $buildUrl" | ||
echo "build Number is $buildNumber" | ||
echo "PATH is $env.PATH" | ||
|
||
try { | ||
stage('Checkout') { | ||
checkout scm | ||
} | ||
|
||
stage('Build') { | ||
sh "cd core && npm install" | ||
sh "cd cli && npm install" | ||
} | ||
|
||
stage('Test') { | ||
sh "cd core && npm run test" | ||
sh "cd cli && npm run test" | ||
junit '*/target/tests.js.xml' | ||
} | ||
|
||
stage('Publish NPM snapshot') { | ||
def currentVersionCore = sh(returnStdout: true, script: "cd core && npm version | grep \"{\" | tr -s ':' | cut -d \"'\" -f 2").trim() | ||
def newVersionCore = "${currentVersionCore}-${buildNumber}" | ||
sh "cd core && npm version ${newVersionCore} --no-git-tag-version && npm publish --tag next" | ||
def currentVersionCli = sh(returnStdout: true, script: "cd cli && npm version | grep \"{\" | tr -s ':' | cut -d \"'\" -f 4").trim() | ||
def newVersionCli = "${currentVersionCli}-${buildNumber}" | ||
sh "cd cli && npm version ${newVersionCli} --no-git-tag-version && npm publish --tag next" | ||
} | ||
|
||
} catch (e) { | ||
mail subject: "${env.JOB_NAME} (${env.BUILD_NUMBER}): Error on build", to: 'github@martinreinhardt-online.de', body: "Please go to ${env.BUILD_URL}." | ||
throw e | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.