-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/3.7.0' into support/3.x
- Loading branch information
Showing
5 changed files
with
618 additions
and
650 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,68 +1,103 @@ | ||
pipeline { | ||
agent { | ||
dockerfile { | ||
label 'CAE-Jenkins2-DH-Agents-Linux' | ||
// image 'openjdk:8-jdk-alpine' | ||
args '-u root' | ||
docker{ | ||
image 'circleci/openjdk:8' | ||
} | ||
} | ||
environment { | ||
GRADLE_USER_HOME = "$WORKSPACE/.gradle" | ||
ARTIFACTORY_CREDENTIALS = credentials('mdk-artifactory-credentials') | ||
TESTRAIL_CREDENTIALS = credentials('mdk-testrail-credentials') | ||
BUILD_ACCESS = credentials('mdk-build-access') | ||
|
||
TESTRAIL_HOST = credentials('mdk-testrail-host') | ||
TESTRAIL_CREDENTIALS = credentials('mdk-testrail-credentials') | ||
TESTRAIL_SUITE_ID = credentials('mdk-testrail-suite-id') | ||
|
||
ARTIFACTORY_URL = credentials('mdk-artifactory-url') | ||
ARTIFACTORY_CREDENTIALS = credentials('mdk-artifactory-credentials') | ||
|
||
ADDITIONAL_TEST_ARGUMENTS = credentials('mdk-additional-test-arguments') | ||
DISPLAY = ':1' | ||
ADDITIONAL_TEST_ARGUMENTS = credentials('mdk-additional-test-args-19') | ||
} | ||
|
||
stages { | ||
stage('Dependencies') { | ||
steps { | ||
sh ''' | ||
GIT_TAG=$(git describe --tags --exact-match `git rev-parse HEAD 2> /dev/null` 2> /dev/null) || true | ||
export GRADLE_USER_HOME=$(pwd)/.gradle | ||
./gradlew -PbuildNumber=$BUILD_NUMBER -PbuildAccess=$BUILD_ACCESS -PbuildTag=$GIT_TAG -PartifactoryUrl=$ARTIFACTORY_URL -PartifactoryUsername=$ARTIFACTORY_CREDENTIALS_USR -PartifactoryPassword=$ARTIFACTORY_CREDENTIALS_PSW dependencies --gradle-user-home $GRADLE_USER_HOME --info --stacktrace --refresh-dependencies | ||
''' | ||
echo 'TAG_NAME = $TAG_NAME' | ||
sh './gradlew \ | ||
-PbuildNumber=$BUILD_NUMBER \ | ||
-PbuildAccess=$BUILD_ACCESS \ | ||
-PbuildTag=$TAG_NAME \ | ||
-PartifactoryUrl=$ARTIFACTORY_URL \ | ||
-PartifactoryUsername=$ARTIFACTORY_CREDENTIALS_USR \ | ||
-PartifactoryPassword=$ARTIFACTORY_CREDENTIALS_PSW \ | ||
--gradle-user-home $GRADLE_USER_HOME \ | ||
--info --stacktrace --refresh-dependencies \ | ||
dependencies' | ||
} | ||
} | ||
stage('Compile') { | ||
steps { | ||
sh ''' | ||
GIT_TAG=$(git describe --tags --exact-match `git rev-parse HEAD 2> /dev/null` 2> /dev/null) || true | ||
export GRADLE_USER_HOME=$(pwd)/.gradle | ||
./gradlew -PbuildNumber=$BUILD_NUMBER -PbuildAccess=$BUILD_ACCESS -PbuildTag=$GIT_TAG -PartifactoryUrl=$ARTIFACTORY_URL -PartifactoryUsername=$ARTIFACTORY_CREDENTIALS_USR -PartifactoryPassword=$ARTIFACTORY_CREDENTIALS_PSW --gradle-user-home $GRADLE_USER_HOME --continue --info --stacktrace clean assemble | ||
''' | ||
sh './gradlew \ | ||
-PbuildNumber=$BUILD_NUMBER \ | ||
-PbuildAccess=$BUILD_ACCESS \ | ||
-PbuildTag=$TAG_NAME \ | ||
-PartifactoryUrl=$ARTIFACTORY_URL \ | ||
-PartifactoryUsername=$ARTIFACTORY_CREDENTIALS_USR \ | ||
-PartifactoryPassword=$ARTIFACTORY_CREDENTIALS_PSW \ | ||
--gradle-user-home $GRADLE_USER_HOME \ | ||
--continue --info --stacktrace \ | ||
clean assemble' | ||
} | ||
} | ||
stage('Test') { | ||
steps { | ||
sh ''' | ||
GIT_TAG=$(git describe --tags --exact-match `git rev-parse HEAD 2> /dev/null` 2> /dev/null) || true | ||
export GRADLE_USER_HOME=$(pwd)/.gradle | ||
Xvfb $DISPLAY & | ||
./gradlew -PbuildNumber=$BUILD_NUMBER -PbuildAccess=$BUILD_ACCESS -PbuildTag=$GIT_TAG -PartifactoryUrl=$ARTIFACTORY_URL -PartifactoryUsername=$ARTIFACTORY_CREDENTIALS_USR -PartifactoryPassword=$ARTIFACTORY_CREDENTIALS_PSW -PtestrailHost=$TESTRAIL_HOST -PtestrailUser=$TESTRAIL_CREDENTIALS_USR -PtestrailPassword=$TESTRAIL_CREDENTIALS_PSW -PtestrailSuiteId=$TESTRAIL_SUITE_ID -PadditionalTestArguments=$ADDITIONAL_TEST_ARGUMENTS --gradle-user-home $GRADLE_USER_HOME --continue --info --stacktrace check testrailPublish | ||
''' | ||
sh 'xvfb-run ./gradlew \ | ||
-PbuildNumber=$BUILD_NUMBER \ | ||
-PbuildAccess=$BUILD_ACCESS \ | ||
-PbuildTag=$TAG_NAME \ | ||
-PartifactoryUrl=$ARTIFACTORY_URL \ | ||
-PartifactoryUsername=$ARTIFACTORY_CREDENTIALS_USR \ | ||
-PartifactoryPassword=$ARTIFACTORY_CREDENTIALS_PSW \ | ||
-PtestrailHost=$TESTRAIL_HOST \ | ||
-PtestrailUser=$TESTRAIL_CREDENTIALS_USR \ | ||
-PtestrailPassword=$TESTRAIL_CREDENTIALS_PSW \ | ||
-PtestrailSuiteId=$TESTRAIL_SUITE_ID \ | ||
-PadditionalTestArguments=$ADDITIONAL_TEST_ARGUMENTS \ | ||
--gradle-user-home $GRADLE_USER_HOME \ | ||
--continue --info --stacktrace \ | ||
check testrailPublish' | ||
} | ||
post { | ||
always { | ||
junit 'build/test-results/**/*.xml' | ||
archiveArtifacts 'build/reports/**' | ||
} | ||
} | ||
stage('Publish Snapshot') { | ||
when { branch 'develop' } | ||
steps { | ||
sh './gradlew \ | ||
-PbuildNumber=$BUILD_NUMBER \ | ||
-PbuildAccess=$BUILD_ACCESS \ | ||
-PbuildTag=$TAG_NAME \ | ||
-PartifactoryUrl=$ARTIFACTORY_URL \ | ||
-PartifactoryUsername=$ARTIFACTORY_CREDENTIALS_USR \ | ||
-PartifactoryPassword=$ARTIFACTORY_CREDENTIALS_PSW \ | ||
-PartifactoryRepository=maven-libs-snapshot-local \ | ||
--gradle-user-home $GRADLE_USER_HOME \ | ||
--continue --info --stacktrace \ | ||
artifactoryPublish' | ||
} | ||
} | ||
stage('Publish') { | ||
|
||
stage('Publish Release') { | ||
when { tag "*" } | ||
steps { | ||
sh ''' | ||
GIT_TAG=$(git describe --tags --exact-match `git rev-parse HEAD 2> /dev/null` 2> /dev/null) || true | ||
export GRADLE_USER_HOME=$(pwd)/.gradle | ||
if [ -z $GIT_TAG ]; then ARTIFACTORY_REPOSITORY="maven-libs-snapshot-local"; else ARTIFACTORY_REPOSITORY="maven-libs-release-local"; fi | ||
./gradlew -PbuildNumber=$BUILD_NUMBER -PbuildAccess=$BUILD_ACCESS -PbuildTag=$GIT_TAG -PartifactoryUrl=$ARTIFACTORY_URL -PartifactoryUsername=$ARTIFACTORY_CREDENTIALS_USR -PartifactoryPassword=$ARTIFACTORY_CREDENTIALS_PSW -PartifactoryRepository=$ARTIFACTORY_REPOSITORY --gradle-user-home $GRADLE_USER_HOME --continue --info --stacktrace artifactoryPublish | ||
''' | ||
sh './gradlew \ | ||
-PbuildNumber=$BUILD_NUMBER \ | ||
-PbuildAccess=$BUILD_ACCESS \ | ||
-PbuildTag=$TAG_NAME \ | ||
-PartifactoryUrl=$ARTIFACTORY_URL \ | ||
-PartifactoryUsername=$ARTIFACTORY_CREDENTIALS_USR \ | ||
-PartifactoryPassword=$ARTIFACTORY_CREDENTIALS_PSW \ | ||
-PartifactoryRepository=maven-libs-release-local \ | ||
--gradle-user-home $GRADLE_USER_HOME \ | ||
--continue --info --stacktrace \ | ||
artifactoryPublish' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
|
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.