Skip to content
Permalink
Browse files

Release preparations

  • Loading branch information...
Alex Stockinger
Alex Stockinger committed Jul 26, 2017
1 parent 3514969 commit d8f7c85dca55829deeb3063592db8915764f8340
Showing with 58 additions and 25 deletions.
  1. +17 −12 Jenkinsfile
  2. +9 −6 build.gradle
  3. +14 −0 scripts/prepareRelease.sh
  4. +5 −1 usageTests/maven/build.sh
  5. +12 −6 usageTests/maven/pom.xml
  6. +1 −0 version.txt
@@ -1,4 +1,5 @@
node() {

stage("Checkout source code") {
git url: "https://github.com/dajudge/testee.fi.git"
}
@@ -28,21 +29,25 @@ node() {
docker.build("testeefi-usage-$imageVersion")
}

def versionToTest = readFile("version.txt")
dir("usageTests/maven/") {
dockerImage.inside {
try {
withCredentials([
usernamePassword(
credentialsId: 'maven',
usernameVariable: 'MAVEN_USER',
passwordVariable: 'MAVEN_PASSWORD'
)
]) {
sh "chmod 755 build.sh && ./build.sh"
withCredentials([
usernamePassword(
credentialsId: 'maven',
usernameVariable: 'MAVEN_USER',
passwordVariable: 'MAVEN_PASSWORD'
)]) {
sh "chmod 755 build.sh"
def status = sh(
script: "./build.sh $versionToTest",
returnStatus: true
)
println status
if(status != 0) {
println "Script returned nonzero status, build is unstable"
currentBuild.result == 'UNSTABLE'
}
} catch(Throwable t) {
currentBuild.result == 'UNSTABLE'
println t.message
}
}
}
@@ -25,7 +25,7 @@ allprojects {
repositories.addAll(rootProject.buildscript.repositories)

group "fi.testee"
version "0.0.1-SNAPSHOT"
version file("${rootProject.projectDir}/version.txt").text

apply plugin: 'jacoco'
}
@@ -76,7 +76,8 @@ subprojects {
uploadArchives {
repositories {
mavenDeployer {
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2") {
// "https://oss.sonatype.org/service/local/staging/deploy/maven2"
repository(url: "https://maven.it-stockinger.de/nexus/content/repositories/releases/") {
authentication(userName: System.getenv("MAVEN_USER"), password: System.getenv("MAVEN_PASSWORD"))
}

@@ -88,12 +89,12 @@ subprojects {
artifactId "testeefi-${project.name}"
packaging 'jar'
description 'Functional testing for Java-EE.'
url 'https://github.com/dajudge/testee.fi'
url 'http://testee.fi'

scm {
connection 'scm:git:https://github.com/dajudge/testee.fi.git'
developerConnection 'scm:git:https://github.com/dajudge/testee.fi.git'
url 'https://github.com/dajudge/testee.fi.git'
url 'https://github.com/dajudge/testee.fi'
}

licenses {
@@ -106,8 +107,10 @@ subprojects {
developers {
developer {
id 'alexs'
name 'Alex Stockinger'
email 'alex@it-stockinger.de'
name = 'Alex Stockinger'
email = 'alex@it-stockinger.de'
organization = 'IT Stockinger'
organizationUrl = 'http://www.it-stockinger.de'
}
}
}
@@ -0,0 +1,14 @@
#! /bin/sh

BRANCH=$1
RELEASE_VERSION=$2
NEXT_VERSION=$3

git checkout $BRANCH
git checkout -b release_$RELEASE_VERSION
echo -n $RELEASE_VERSION > version.txt
git add . && git commit -m "Version bump to $RELEASE_VERSION" && git push --set-upstream origin release_$RELEASE_VERSION

git checkout $BRANCH
echo -n $NEXT_VERSION > version.txt
git add . && git commit -m "Version bump to $NEXT_VERSION" && git push
@@ -1,5 +1,7 @@
#! /bin/sh

TESTEEFI_VERSION=$1

USER_HOME_DIR="/root"
MAVEN_VERSION=3.5.0
BASE_URL=https://apache.osuosl.org/maven/maven-3/${MAVEN_VERSION}/binaries
@@ -13,5 +15,7 @@ rm -f /tmp/apache-maven.tar.gz
MAVEN_HOME=$BASE_DIR
MAVEN_CONFIG="$USER_HOME_DIR/.m2"

$BASE_DIR/bin/mvn clean install
echo "Building with $TESTEEFI_VERSION"

$BASE_DIR/bin/mvn clean install -Dtesteefi.version=$TESTEEFI_VERSION
exit $?
@@ -7,13 +7,9 @@

<groupId>fi.testee</groupId>
<artifactId>maven-usage-test</artifactId>
<version>${testeefi.version}</version>
<version>42.42.42-SNAPSHOT</version>
<name>Maven usage test</name>

<properties>
<testeefi.version>0.0.1-SNAPSHOT</testeefi.version>
</properties>

<repositories>
<repository>
<id>nexus-snapshots</id>
@@ -25,13 +21,23 @@
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>nexus-releases</id>
<url>https://maven.it-stockinger.de/nexus/content/repositories/releases/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>fi.testee</groupId>
<artifactId>testeefi-junit4-all</artifactId>
<version>${project.version}</version>
<version>${testeefi.version}</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -0,0 +1 @@
0.0.1-SNAPSHOT

0 comments on commit d8f7c85

Please sign in to comment.
You can’t perform that action at this time.