Skip to content

Commit

Permalink
Merge branch 'release/3.7.0' into support/3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-gomes committed Jul 31, 2019
2 parents 84b7603 + 7701ef5 commit a32a60d
Show file tree
Hide file tree
Showing 5 changed files with 618 additions and 650 deletions.
62 changes: 0 additions & 62 deletions Dockerfile

This file was deleted.

115 changes: 75 additions & 40 deletions Jenkinsfile
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'
}
}
}
}
}


2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ dependencies {
// Other dependencies we're unable to resolve via standard repositories

if (buildAccess == 'internal') {
preCompile group: 'gov.nasa.jpl.cae.magicdraw', name: 'cae-magicdraw-core', version: '3.6.4', ext: 'zip'
preCompile group: 'gov.nasa.jpl.cae.magicdraw', name: 'cae-cameo-systems-modeler-core', version: '3.7.0', ext: 'zip'
}
else {
preCompile group: 'com.nomagic', name: 'magicdraw', version: '185sp3', classifier: 'MagicDraw_185_sp3_no_install', ext: 'zip'
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=3.6.4
version=3.7.0
group=org.openmbee.magicdraw.mdk
descriptorFile=MDR_Plugin_Model_Development_Kit_91110_descriptor.xml
magicdDrawGroupName=gov.nasa.jpl.cae.magicdraw.mdk
Expand Down
Loading

0 comments on commit a32a60d

Please sign in to comment.