Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Commit

Permalink
Fixed build to generate the build number into FRAMEWORK_VERSION
Browse files Browse the repository at this point in the history
Change-Id: Ifbeb09228dd3bcfefbc7256fc73a07af75191487
Signed-off-by: Jochen Hiller <j.hiller@telekom.de>
  • Loading branch information
Jochen Hiller committed Oct 25, 2015
1 parent d4bbef5 commit 92b9168
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -2,3 +2,4 @@
/.metadata/
/.gradle/
/tmp/
/build/
5 changes: 4 additions & 1 deletion distribution/publish/publish.sh
Expand Up @@ -4,7 +4,8 @@
# chmod u+x ./distribution/publish/publish.sh
# ./distribution/publish/publish.sh

set -x
# enable for "debugging" of script
# set -x

version=`cat version.txt`
echo "VERSION=$version"
Expand All @@ -20,9 +21,11 @@ PUBLISH_LOG=$UPLOAD_BASE/publish.log
echo "UPLOAD_LOCATION=$UPLOAD_LOCATION"
echo "PUBLISH_LOG=$PUBLISH_LOG"

# current time in UTC with Timezone information
now=`date -u '+%Y-%m-%d %H:%M:%S %Z'`
echo "$now: publishing last successful build for $version" >>$PUBLISH_LOG

# copy latest build artifacts (tar.gz, zip)
echo -n "$BUILD_TYPE/" >>$PUBLISH_LOG
echo `(cd ./distribution/build/distributions/ ; ls *.tar.gz)` >>$PUBLISH_LOG
cp ./distribution/build/distributions/*.tar.gz $UPLOAD_LOCATION
Expand Down
17 changes: 17 additions & 0 deletions org.eclipse.concierge.tests.integration/README.md
@@ -0,0 +1,17 @@
# Eclipse Concierge Integration Tests

This Java project contains integration tests with bundles from different projects to run on Concierge OSGi framework.


Actually there a lot of tests using a proprietary way to download and install bundle in Concierge. It is not yet integrated in regular build as it requires manual changes to get all these tests running against latest versions.

We filed a bug to check if pax-exam is another option to write such kind of integration tests.

## References

* "Use pax-exam for Concierge integration tests? ": https://bugs.eclipse.org/bugs/show_bug.cgi?id=480566
* Pax-exam documentation: https://ops4j1.jira.com/wiki/display/PAXEXAM4/Documentation
* Maven repo with pax-exam: http://mvnrepository.com/artifact/org.ops4j.pax.exam
* more information about pax-exam
* http://veithen.github.io/alta/examples/pax-exam.html
* http://stackoverflow.com/questions/28109434/pax-exam-4-and-multiple-maven-repositories-not-working
24 changes: 24 additions & 0 deletions org.eclipse.concierge/build.gradle
@@ -1,3 +1,27 @@
import org.apache.tools.ant.filters.ReplaceTokens

// we change the version "5.0.0.qualifier" by the current build version
// note: if this will change also update the configuration here
def versionFile = 'src/org/eclipse/concierge/Concierge.java'
def versionFileName = 'Concierge.java'
def versionTempDir = 'build/tmp/sourcesCache'
def versionPattern = '5.0.0.qualifier'

compileJava.doFirst {
copy {
from(versionFile)
into(versionTempDir)
}
ant.replace(file: versionFile, token: versionPattern, value: version)
}

compileJava.doLast {
copy {
from(versionTempDir + '/' + versionFileName)
into(project.file(versionFile).parent)
}
}

// add . folder to test classpath, to lookup META-INF/micro-services
sourceSets {
test {
Expand Down
Expand Up @@ -146,7 +146,7 @@ public final class Concierge extends AbstractBundle implements Framework,
/**
* Version displayed upon startup and returned by System Bundle
*/
private static final String FRAMEWORK_VERSION = "5.0.0.RC1";
private static final String FRAMEWORK_VERSION = "5.0.0.qualifier";

@SuppressWarnings("deprecation")
private static Class<?> SERVICE_EVENT_HOOK_CLASS = org.osgi.framework.hooks.service.EventHook.class;
Expand Down

0 comments on commit 92b9168

Please sign in to comment.