You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by ol...@apache.org on 2017/04/25 11:43:41 UTC
[1/4] archiva-redback-core git commit: exclude Jenkinsfile from rat
Repository: archiva-redback-core
Updated Branches:
refs/heads/master 53d0ccaaf -> c46c26948
exclude Jenkinsfile from rat
Signed-off-by: olivier lamy <ol...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/archiva-redback-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva-redback-core/commit/91cc4675
Tree: http://git-wip-us.apache.org/repos/asf/archiva-redback-core/tree/91cc4675
Diff: http://git-wip-us.apache.org/repos/asf/archiva-redback-core/diff/91cc4675
Branch: refs/heads/master
Commit: 91cc4675a10bcdf1fbca27def738044d5b52997f
Parents: 28234b5
Author: olivier lamy <ol...@apache.org>
Authored: Tue Mar 7 21:44:53 2017 +1100
Committer: olivier lamy <ol...@apache.org>
Committed: Tue Apr 25 09:53:33 2017 +1000
----------------------------------------------------------------------
pom.xml | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/archiva-redback-core/blob/91cc4675/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 39f1024..f2e3869 100644
--- a/pom.xml
+++ b/pom.xml
@@ -815,6 +815,7 @@
<exclude>.travis.yml</exclude>
<!-- Netbeans files -->
<exclude>nb-configuration.xml</exclude>
+ <exclude>Jenkinsfile</exclude>
</excludes>
</configuration>
<executions>
[2/4] archiva-redback-core git commit: display maven error
Posted by ol...@apache.org.
display maven error
Signed-off-by: olivier lamy <ol...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/archiva-redback-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva-redback-core/commit/28234b5e
Tree: http://git-wip-us.apache.org/repos/asf/archiva-redback-core/tree/28234b5e
Diff: http://git-wip-us.apache.org/repos/asf/archiva-redback-core/diff/28234b5e
Branch: refs/heads/master
Commit: 28234b5ef82ec6497d87162f15c7c4c9b7d04f6f
Parents: 2505690
Author: olivier lamy <ol...@apache.org>
Authored: Tue Mar 7 21:39:09 2017 +1100
Committer: olivier lamy <ol...@apache.org>
Committed: Tue Apr 25 09:53:33 2017 +1000
----------------------------------------------------------------------
Jenkinsfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/archiva-redback-core/blob/28234b5e/Jenkinsfile
----------------------------------------------------------------------
diff --git a/Jenkinsfile b/Jenkinsfile
index a585b51..167488c 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -22,7 +22,7 @@ node {
withEnv(mvnEnv) {
timeout(60) {
// Run test phase / ignore test failures
- sh "mvn -B clean install -Dmaven.test.failure.ignore=true"
+ sh "mvn -B clean install -Dmaven.test.failure.ignore=true -e"
// Report failures in the jenkins UI
step([$class: 'JUnitResultArchiver', testResults: '**/target/surefire-reports/TEST-*.xml'])
}
[4/4] archiva-redback-core git commit: a bit more details for debug
Posted by ol...@apache.org.
a bit more details for debug
Signed-off-by: olivier lamy <ol...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/archiva-redback-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva-redback-core/commit/c46c2694
Tree: http://git-wip-us.apache.org/repos/asf/archiva-redback-core/tree/c46c2694
Diff: http://git-wip-us.apache.org/repos/asf/archiva-redback-core/diff/c46c2694
Branch: refs/heads/master
Commit: c46c26948dffcba709c5106e4a7cb744e54d558a
Parents: 91cc467
Author: olivier lamy <ol...@apache.org>
Authored: Tue Apr 25 21:43:37 2017 +1000
Committer: olivier lamy <ol...@apache.org>
Committed: Tue Apr 25 21:43:37 2017 +1000
----------------------------------------------------------------------
.../RequestValidationInterceptor.java | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/archiva-redback-core/blob/c46c2694/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/interceptors/RequestValidationInterceptor.java
----------------------------------------------------------------------
diff --git a/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/interceptors/RequestValidationInterceptor.java b/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/interceptors/RequestValidationInterceptor.java
index 45ad713..68c27dd 100644
--- a/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/interceptors/RequestValidationInterceptor.java
+++ b/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/interceptors/RequestValidationInterceptor.java
@@ -239,16 +239,22 @@ public class RequestValidationInterceptor extends AbstractInterceptor implements
headerFound=true;
log.debug("Origin Header URL found: {}", originUrl);
if (!targetUrl.getProtocol().equals(originUrl.getProtocol())) {
- log.warn("Origin Header Protocol does not match originUrl={}, targetUrl={}", originUrl, targetUrl);
+ log.warn("Origin Header Protocol does not match originUrl={}, targetUrl={}", //
+ originUrl.getProtocol(), //
+ targetUrl.getProtocol());
return false;
}
if (!targetUrl.getHost().equals(originUrl.getHost())) {
- log.warn("Origin Header Host does not match originUrl={}, targetUrl={}",originUrl,targetUrl);
+ log.warn("Origin Header Host does not match originUrl='{}', targetUrl='{}'",
+ originUrl.getProtocol(), //
+ targetUrl.getProtocol());
return false;
}
int originPort = getPort(originUrl);
if (targetPort != originPort) {
- log.warn("Origin Header Port does not match originUrl={}, targetUrl={}",originUrl,targetUrl);
+ log.warn("Origin Header Port does not match originUrl={}, targetUrl={}",
+ originUrl.getPort(),
+ targetUrl.getPort());
return false;
}
} catch (MalformedURLException ex) {
@@ -263,12 +269,16 @@ public class RequestValidationInterceptor extends AbstractInterceptor implements
headerFound=true;
log.debug("Referer Header URL found: {}",refererUrl);
if (!targetUrl.getHost().equals(refererUrl.getHost())) {
- log.warn("Referer Header Host does not match refererUrl={}, targetUrl={}",refererUrl,targetUrl);
+ log.warn("Referer Header Host does not match refererUrl='{}', targetUrl='{}'", //
+ refererUrl.getHost(), //
+ targetUrl.getHost());
return false;
}
int refererPort = getPort(refererUrl);
if (targetPort != refererPort) {
- log.warn("Referer Header Port does not match refererUrl={}, targetUrl={}",refererUrl,targetUrl);
+ log.warn("Referer Header Port does not match refererUrl={}, targetUrl={}", //
+ refererUrl.getPort(),
+ targetUrl.getPort());
return false;
}
} catch (MalformedURLException ex) {
[3/4] archiva-redback-core git commit: add simple Jenkinsfile
Posted by ol...@apache.org.
add simple Jenkinsfile
Signed-off-by: olivier lamy <ol...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/archiva-redback-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva-redback-core/commit/25056909
Tree: http://git-wip-us.apache.org/repos/asf/archiva-redback-core/tree/25056909
Diff: http://git-wip-us.apache.org/repos/asf/archiva-redback-core/diff/25056909
Branch: refs/heads/master
Commit: 25056909d69b4e53ae2afb258f890f9a6fff98d1
Parents: 53d0cca
Author: olivier lamy <ol...@apache.org>
Authored: Tue Mar 7 21:18:15 2017 +1100
Committer: olivier lamy <ol...@apache.org>
Committed: Tue Apr 25 09:53:33 2017 +1000
----------------------------------------------------------------------
Jenkinsfile | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 71 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/archiva-redback-core/blob/25056909/Jenkinsfile
----------------------------------------------------------------------
diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644
index 0000000..a585b51
--- /dev/null
+++ b/Jenkinsfile
@@ -0,0 +1,71 @@
+node {
+ // System Dependent Locations
+ def mvntool = tool name: 'maven3', type: 'hudson.tasks.Maven$MavenInstallation'
+ def jdktool = tool name: 'jdk8', type: 'hudson.model.JDK'
+
+ // Environment
+ List mvnEnv = ["PATH+MVN=${mvntool}/bin", "PATH+JDK=${jdktool}/bin", "JAVA_HOME=${jdktool}/", "MAVEN_HOME=${mvntool}"]
+ mvnEnv.add("MAVEN_OPTS=-Xms256m -Xmx1024m -Djava.awt.headless=true")
+
+ try
+ {
+ stage 'Checkout'
+ checkout scm
+ } catch (Exception e) {
+ //notifyBuild("Checkout Failure")
+ throw e
+ }
+
+ try
+ {
+ stage 'Build'
+ withEnv(mvnEnv) {
+ timeout(60) {
+ // Run test phase / ignore test failures
+ sh "mvn -B clean install -Dmaven.test.failure.ignore=true"
+ // Report failures in the jenkins UI
+ step([$class: 'JUnitResultArchiver', testResults: '**/target/surefire-reports/TEST-*.xml'])
+ }
+ if(isUnstable())
+ {
+ //notifyBuild("Unstable / Test Errors")
+ }
+ }
+ } catch(Exception e) {
+ notifyBuild("Test Failure")
+ throw e
+ }
+}
+
+// Test if the Jenkins Pipeline or Step has marked the
+// current build as unstable
+def isUnstable()
+{
+ return currentBuild.result == "UNSTABLE"
+}
+
+// Send a notification about the build status
+def notifyBuild(String buildStatus)
+{
+ // default the value
+ buildStatus = buildStatus ?: "UNKNOWN"
+
+ def email = "${env.EMAILADDRESS}"
+ def summary = "${env.JOB_NAME}#${env.BUILD_NUMBER} - ${buildStatus}"
+ def detail = """<h4>Job: <a href='${env.JOB_URL}'>${env.JOB_NAME}</a> [#${env.BUILD_NUMBER}]</h4>
+ <p><b>${buildStatus}</b></p>
+ <table>
+ <tr><td>Build</td><td><a href='${env.BUILD_URL}'>${env.BUILD_URL}</a></td><tr>
+ <tr><td>Console</td><td><a href='${env.BUILD_URL}console'>${env.BUILD_URL}console</a></td><tr>
+ <tr><td>Test Report</td><td><a href='${env.BUILD_URL}testReport/'>${env.BUILD_URL}testReport/</a></td><tr>
+ </table>
+ """
+
+ emailext (
+ to: email,
+ subject: summary,
+ body: detail
+ )
+}
+
+// vim: et:ts=2:sw=2:ft=groovy