Add a feature build
This commit is contained in:
parent
8b67562c67
commit
fc79631a1c
2 changed files with 16 additions and 4 deletions
|
@ -8,12 +8,12 @@ node() {
|
||||||
|
|
||||||
def config = occd.parseConfig(readFile("deployment/config.yaml"))
|
def config = occd.parseConfig(readFile("deployment/config.yaml"))
|
||||||
|
|
||||||
def buildVersion = occd.getBuildVersion()
|
|
||||||
def releaseVersion = occd.getReleaseVersion()
|
|
||||||
|
|
||||||
stage("Build") {
|
stage("Build") {
|
||||||
echo "versions: build=${buildVersion}, next-release=${releaseVersion}"
|
def buildVersion = occd.getDeliveryBuildVersion()
|
||||||
|
echo "buildVersion=${buildVersion}"
|
||||||
|
|
||||||
sh "sed -e 's/{{BUILD_VERSION}}/${buildVersion}/g' -i config.ru"
|
sh "sed -e 's/{{BUILD_VERSION}}/${buildVersion}/g' -i config.ru"
|
||||||
|
|
||||||
occd.build("rubex-dev", "frontend-master", "deployment/manifests/build.yaml", "master")
|
occd.build("rubex-dev", "frontend-master", "deployment/manifests/build.yaml", "master")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,6 +29,9 @@ node() {
|
||||||
|
|
||||||
if (isPromoteToTest) {
|
if (isPromoteToTest) {
|
||||||
stage("Deploy to TEST") {
|
stage("Deploy to TEST") {
|
||||||
|
def releaseVersion = occd.getReleaseVersion()
|
||||||
|
echo "releaseVersion=${releaseVersion}"
|
||||||
|
|
||||||
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'github-omallo', usernameVariable: 'GIT_USERNAME', passwordVariable: 'GIT_PASSWORD']]) {
|
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'github-omallo', usernameVariable: 'GIT_USERNAME', passwordVariable: 'GIT_PASSWORD']]) {
|
||||||
sh "git tag ${releaseVersion}"
|
sh "git tag ${releaseVersion}"
|
||||||
sh "git push --tags https://${GIT_USERNAME}:${GIT_PASSWORD}@github.com/omallo/ruby-ex.git"
|
sh "git push --tags https://${GIT_USERNAME}:${GIT_PASSWORD}@github.com/omallo/ruby-ex.git"
|
||||||
|
|
|
@ -5,4 +5,13 @@ node() {
|
||||||
deleteDir()
|
deleteDir()
|
||||||
git(url: "https://github.com/omallo/ruby-ex.git", branch: "${FEATURE_BRANCH}", credentialsId: "github-omallo")
|
git(url: "https://github.com/omallo/ruby-ex.git", branch: "${FEATURE_BRANCH}", credentialsId: "github-omallo")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stage("Build") {
|
||||||
|
def buildVersion = occd.getFeatureBuildVersion("${FEATURE_BRANCH}")
|
||||||
|
echo "versions: build=${buildVersion}"
|
||||||
|
|
||||||
|
sh "sed -e 's/{{BUILD_VERSION}}/${buildVersion}/g' -i config.ru"
|
||||||
|
|
||||||
|
occd.build("rubex-dev", "frontend-${FEATURE_BRANCH}", "deployment/manifests/build.yaml", "${FEATURE_BRANCH}")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue