-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from ZhengXinCN/master
Travis build added.
- Loading branch information
Showing
10 changed files
with
488 additions
and
9 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
language: java | ||
dist: trusty | ||
jdk: | ||
- oraclejdk8 | ||
before_install: | ||
- chmod +x maybe-release.sh | ||
# install groovy | ||
- curl -s get.sdkman.io | bash | ||
- source "$HOME/.sdkman/bin/sdkman-init.sh" | ||
- sdk install groovy 3.0.8 | ||
- echo $(groovy --version) | ||
install: | ||
- mvn install -Dmaven.javadoc.skip=true -B -V | ||
before_script: | ||
- git config --global user.email "[email protected]" | ||
- git config --global user.name "Travis-CI" | ||
script: | ||
- git config credential.helper "store --file=.git/credentials" | ||
- echo "https://${GH_TOKEN}:@github.com" > .git/credentials | ||
- ./maybe-release.sh | ||
after_success: | ||
- bash <(curl -s https://codecov.io/bash) |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/bash | ||
set -ev | ||
if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_REPO_SLUG" == "swisspush/kobuka" ] | ||
then | ||
git reset --hard | ||
git clean -fd | ||
git checkout master | ||
echo 'Master checked out' | ||
groovy staging.groovy drop | ||
rc=$? | ||
if [ $rc -ne 0 ] | ||
then | ||
echo 'problem when trying to drop, ignored' | ||
fi | ||
echo 'starting a new nexus repository ...' | ||
OUTPUT=$(groovy staging.groovy start) | ||
echo "repository Id: $OUTPUT" | ||
mvn -B -Prelease jgitflow:release-start jgitflow:release-finish --settings settings.xml -DrepositoryId=${OUTPUT} | ||
rc=$? | ||
if [ $rc -eq 0 ] | ||
then | ||
groovy staging.groovy close ${OUTPUT} | ||
groovy staging.groovy promote ${OUTPUT} | ||
rc=$? | ||
if [ $rc -ne 0 ] | ||
then | ||
echo 'Release failed, cannot promote stage' | ||
exit rc | ||
fi | ||
echo 'Release done, will push' | ||
git tag | ||
git push --tags | ||
git checkout develop | ||
git push origin develop | ||
exit 0 | ||
fi | ||
echo 'Release failed' | ||
exit rc | ||
else | ||
echo 'Release skipped' | ||
exit 0 | ||
fi |
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 |
---|---|---|
|
@@ -7,10 +7,91 @@ | |
<groupId>org.swisspush</groupId> | ||
<artifactId>kobuka</artifactId> | ||
<packaging>pom</packaging> | ||
<version>1.0.2</version> | ||
|
||
<version>1.0.3-SNAPSHOT</version> | ||
<name>kobuka</name> | ||
<description>Config Builders for Kafka. A fluent API for configuring kafka clients.</description> | ||
<url>https://github.com/swisspush/kobuka</url> | ||
<licenses> | ||
<license> | ||
<name>The Apache Software License, Version 2.0</name> | ||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> | ||
<distribution>repo</distribution> | ||
</license> | ||
</licenses> | ||
<scm> | ||
<url>https://github.com/swisspush/kobuka.git</url> | ||
</scm> | ||
<developers> | ||
<developer> | ||
<id>laurentbovet</id> | ||
<name>Laurent Bovet</name> | ||
<email>[email protected]</email> | ||
</developer> | ||
</developers> | ||
<build> | ||
<pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-deploy-plugin</artifactId> | ||
<version>2.8.2</version> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-release-plugin</artifactId> | ||
<version>2.5.3</version> | ||
<configuration> | ||
<mavenExecutorId>forked-path</mavenExecutorId> | ||
<useReleaseProfile>false</useReleaseProfile> | ||
<arguments>${arguments} -Psonatype-oss-release | ||
</arguments> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-gpg-plugin</artifactId> | ||
<version>1.6</version> | ||
<executions> | ||
<execution> | ||
<id>sign-artifacts</id> | ||
<phase>verify</phase> | ||
<goals> | ||
<goal>sign</goal> | ||
</goals> | ||
<configuration> | ||
<homedir>${session.executionRootDirectory}</homedir> | ||
<keyname>230584D7</keyname> | ||
<!--<executable>C:\Program Files (x86)\GnuPG\bin\gpg.exe</executable>--> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<groupId>external.atlassian.jgitflow</groupId> | ||
<artifactId>jgitflow-maven-plugin</artifactId> | ||
<version>1.0-m5.1</version> | ||
<configuration> | ||
<flowInitContext> | ||
<masterBranchName>master</masterBranchName> | ||
<developBranchName>develop</developBranchName> | ||
<featureBranchPrefix>feature-</featureBranchPrefix> | ||
<releaseBranchPrefix>release-</releaseBranchPrefix> | ||
<hotfixBranchPrefix>hotfix-</hotfixBranchPrefix> | ||
<versionTagPrefix>v</versionTagPrefix> | ||
</flowInitContext> | ||
<pullDevelop>true</pullDevelop> | ||
<username>USERNAME_FOR_A_GIT_USER</username> | ||
<password>PASSWORD_FOR_A_GIT_USER</password> | ||
<!--<noDeploy>true</noDeploy>--> | ||
<allowUntracked>true</allowUntracked> | ||
<autoVersionSubmodules>true</autoVersionSubmodules> | ||
<!--<noReleaseMerge>true</noReleaseMerge>--> | ||
<!--<noReleaseBuild>true</noReleaseBuild>--> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
|
@@ -56,13 +137,106 @@ | |
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<sonatypeOssDistMgmtSnapshotsUrl> | ||
https://oss.sonatype.org/content/repositories/snapshots/ | ||
</sonatypeOssDistMgmtSnapshotsUrl> | ||
</properties> | ||
|
||
<repositories> | ||
<repository> | ||
<id>sonatype-nexus-snapshots</id> | ||
<name>Sonatype Nexus Snapshots</name> | ||
<url> | ||
https://oss.sonatype.org/content/repositories/snapshots | ||
</url> | ||
<releases> | ||
<enabled>false</enabled> | ||
</releases> | ||
<snapshots> | ||
<enabled>true</enabled> | ||
</snapshots> | ||
</repository> | ||
</repositories> | ||
<distributionManagement> | ||
<snapshotRepository> | ||
<id>sonatype-nexus-snapshots</id> | ||
<name>Sonatype Nexus Snapshots</name> | ||
<url>${sonatypeOssDistMgmtSnapshotsUrl}</url> | ||
</snapshotRepository> | ||
<repository> | ||
<id>github</id> | ||
<name>GitHub Packages</name> | ||
<url>https://maven.pkg.github.com/swisspush/kobuka</url> | ||
<id>sonatype-nexus-staging</id> | ||
<name>Nexus Release Repository</name> | ||
<url> | ||
https://oss.sonatype.org/service/local/staging/deployByRepositoryId/${repositoryId} | ||
</url> | ||
</repository> | ||
</distributionManagement> | ||
</distributionManagement> <profiles> | ||
<profile> | ||
<id>release</id> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-gpg-plugin</artifactId> | ||
<version>1.6</version> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
<profile> | ||
<id>sonatype-oss-release</id> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-source-plugin</artifactId> | ||
<version>3.0.1</version> | ||
<executions> | ||
<execution> | ||
<id>attach-sources</id> | ||
<goals> | ||
<goal>jar-no-fork</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-javadoc-plugin</artifactId> | ||
<version>3.0.0-M1</version> | ||
<executions> | ||
<execution> | ||
<id>attach-javadocs</id> | ||
<goals> | ||
<goal>jar</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<source>8</source> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-gpg-plugin</artifactId> | ||
<version>1.6</version> | ||
<executions> | ||
<execution> | ||
<id>sign-artifacts</id> | ||
<phase>verify</phase> | ||
<goals> | ||
<goal>sign</goal> | ||
</goals> | ||
<configuration> | ||
<homedir>${session.executionRootDirectory}</homedir> | ||
<keyname>230584D7</keyname> | ||
<!--<executable>C:\Program Files (x86)\GnuPG\bin\gpg.exe</executable>--> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
</profiles> | ||
</project> |
Binary file not shown.
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> | ||
<servers> | ||
<server> | ||
<id>sonatype-nexus-staging</id> | ||
<username>${env.CI_DEPLOY_USERNAME}</username> | ||
<password>${env.CI_DEPLOY_PASSWORD}</password> | ||
</server> | ||
<server> | ||
<id>gpg.passphrase</id> | ||
<passphrase>${env.CI_PGP_PASSWORD}</passphrase> | ||
</server> | ||
</servers> | ||
</settings> |
Oops, something went wrong.