Skip to content

Commit

Permalink
moving away from versions:set
Browse files Browse the repository at this point in the history
  • Loading branch information
jflamy committed May 26, 2020
1 parent f8c856e commit 59e1c47
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
20 changes: 10 additions & 10 deletions .jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ pipeline {
}
steps {
dir('owlcms4/owlcms') {
bat 'mvn -s %M2%/settings.xml -B clean package -P production,signing'
bat 'mvn -s %M2%/settings.xml -B clean package -P production,signing -Drevision=%VERSION%'
}
}
}
Expand All @@ -80,7 +80,7 @@ pipeline {
}
steps {
dir('owlcms4/publicresults') {
bat 'mvn -s %M2%/settings.xml -B clean package -P production,signing'
bat 'mvn -s %M2%/settings.xml -B clean package -P production,signing -Drevision=%VERSION%'
}
}
}
Expand All @@ -96,7 +96,7 @@ pipeline {
dir('owlcms4') {
bat 'git pull'
// create release files
bat 'mvn -s c:/dev/.m2/settings.xml -B package --non-recursive'
bat 'mvn -s c:/dev/.m2/settings.xml -B package -Drevision=%VERSION% --non-recursive'
bat 'git add -A && git commit -m "%VERSION%" --allow-empty'
// create a local tag with the current version number
bat 'git tag %VERSION% -f -a -m "%VERSION% owlcms4"'
Expand All @@ -117,7 +117,7 @@ pipeline {
steps {
dir('owlcms4') {
// github.owner is the repo owning organization or user; the github-oauth gives us repo write access using the API
bat 'mvn -s c:/dev/.m2/settings.xml -B github-release:github-release -Dgithub.owner=%REPO_OWNER% -Dgithub.repository=%O_REPO_NAME% -Dgithub.token=github-oauth -Dgithub.prerelease=%PRERELEASE% --non-recursive'
bat 'mvn -s c:/dev/.m2/settings.xml -B github-release:github-release -Dgithub.owner=%REPO_OWNER% -Dgithub.repository=%O_REPO_NAME% -Dgithub.token=github-oauth -Dgithub.prerelease=%PRERELEASE% -Drevision=%VERSION% --non-recursive'
}
}
}
Expand All @@ -133,12 +133,12 @@ pipeline {
steps {
dir('owlcms4/owlcms') {
// release uber-jar to bintray
bat 'mvn -P production -s %M2%/settings.xml -B deploy:deploy-file@deploy-file'
bat 'mvn -P production -s %M2%/settings.xml -B deploy:deploy-file@deploy-file -Drevision=%VERSION%'
}
dir('owlcms4/owlcms-heroku') {
bat 'git checkout %BRANCH%'
bat 'git pull'
bat 'mvn -s %M2%/settings.xml -B clean package'
bat 'mvn -s %M2%/settings.xml -B clean package -Drevision=%VERSION%'
bat 'git add -A && git commit -m "%VERSION% heroku" --allow-empty'

// create a tag with the current version number
Expand All @@ -164,7 +164,7 @@ pipeline {
dir('owlcms4/owlcms-heroku') {
// The heroku deploy button pointing to the proper tagged version is part of the release notes.
// github.owner is the repo owning organization or user; the github-oauth gives us repo write access.
bat 'mvn -s c:/dev/.m2/settings.xml -B github-release:github-release@release-cli -Dgithub.owner=%REPO_OWNER% -Dgithub.repository=%H_REPO_NAME% -Dgithub.token=github-oauth -Dgithub.prerelease=%PRERELEASE%'
bat 'mvn -s c:/dev/.m2/settings.xml -B github-release:github-release@release-cli -Dgithub.owner=%REPO_OWNER% -Dgithub.repository=%H_REPO_NAME% -Dgithub.token=github-oauth -Dgithub.prerelease=%PRERELEASE% -Drevision=%VERSION%'
}
}
}
Expand All @@ -177,11 +177,11 @@ pipeline {
}
steps {
dir('owlcms4/publicresults') {
bat 'mvn -P production -s %M2%/settings.xml -B deploy:deploy-file@deploy-file'
bat 'mvn -P production -s %M2%/settings.xml -B deploy:deploy-file@deploy-file -Drevision=%VERSION%'
}
dir('owlcms4/publicresults-heroku') {
bat 'git checkout %BRANCH%'
bat 'mvn -s %M2%/settings.xml -B clean package'
bat 'mvn -s %M2%/settings.xml -B clean package -Drevision=%VERSION%'
bat 'git add -A && git commit -m "%VERSION% heroku" --allow-empty'

// create a tag with the current version number
Expand All @@ -207,7 +207,7 @@ pipeline {
dir('owlcms4/publicresults-heroku') {
// The heroku deploy button pointing to the proper tagged version is part of the release notes.
// github.owner is the repo owning organization or user; the github-oauth gives us repo write access.
bat 'mvn -s c:/dev/.m2/settings.xml -B github-release:github-release@release-cli -Dgithub.owner=%REPO_OWNER% -Dgithub.repository=%P_REPO_NAME% -Dgithub.token=github-oauth -Dgithub.prerelease=%PRERELEASE%'
bat 'mvn -s c:/dev/.m2/settings.xml -B github-release:github-release@release-cli -Dgithub.owner=%REPO_OWNER% -Dgithub.repository=%P_REPO_NAME% -Dgithub.token=github-oauth -Dgithub.prerelease=%PRERELEASE% -Drevision=%VERSION%'
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/java

# we use comments on pull requests to trigger the build
trigger:
- master
- "*"

pool:
vmImage: 'ubuntu-latest'
Expand Down Expand Up @@ -34,3 +35,4 @@ steps:
publishJUnitResults: true
testResultsFiles: '**/surefire-reports/TEST-*.xml'
goals: 'package'

2 changes: 1 addition & 1 deletion launch/newDevVersion.cmd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
call mvn "versions:set" "versions:commit" "-DnewVersion=%1" "-DoldVersion=4.**" "-DgroupId=*" "-DartifactId=*"
rem call mvn "versions:set" "versions:commit" "-DnewVersion=%1" "-DoldVersion=4.**" "-DgroupId=*" "-DartifactId=*"
cd publicresults-heroku
git commit -a -m "%1"
git pull
Expand Down
1 change: 0 additions & 1 deletion launch/newRelease.cmd
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
set LOCAL_TOKEN=11327eb05a19fd0384b6e3a71e9e05c375
call mvn "versions:set" "versions:commit" "-DnewVersion=%1" "-DoldVersion=4.*" "-DgroupId=*" "-DartifactId=*"
cd publicresults-heroku
git commit -a -m "%1"
git pull
Expand Down

0 comments on commit 59e1c47

Please sign in to comment.