You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by ma...@apache.org on 2020/07/18 00:20:09 UTC

[logging-log4j-scala] branch master updated: Update deploy settings

This is an automated email from the ASF dual-hosted git repository.

mattsicker pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j-scala.git


The following commit(s) were added to refs/heads/master by this push:
     new 32958a6  Update deploy settings
32958a6 is described below

commit 32958a6abd53c2cb29b4cfd4b4f5a92d82cdae79
Author: Matt Sicker <bo...@gmail.com>
AuthorDate: Fri Jul 17 19:19:54 2020 -0500

    Update deploy settings
---
 Jenkinsfile | 38 ++++++++++++++++++++++----------------
 build.sbt   |  4 ++--
 2 files changed, 24 insertions(+), 18 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 9876a38..1d277f6 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -23,42 +23,48 @@ pipeline {
     tools {
         jdk 'JDK 1.8 (latest)'
     }
+    options {
+        ansiColor 'xterm'
+        buildDiscarder logRotator(numToKeepStr: '25')
+        timeout time: 1, unit: 'HOURS'
+    }
     stages {
         stage('Build') {
             steps {
-                ansiColor('xterm') {
-                    sh './sbt -batch auditCheck'
-                    sh './sbt -batch "+ compile"'
-                }
+                sh './sbt -batch auditCheck'
+                sh './sbt -batch "+ compile"'
             }
         }
         stage('Test') {
             steps {
-                ansiColor('xterm') {
-                    sh './sbt -batch Test/auditCheck'
-                    sh './sbt -batch "+ test"'
-                }
+                sh './sbt -batch Test/auditCheck'
+                sh './sbt -batch "+ test"'
             }
         }
         stage('Deploy') {
             when {
                 anyOf {
                     branch 'master'
-                    branch 'sbt'
                 }
             }
+            environment {
+                NEXUS = credentials('logging-snapshots')
+            }
             steps {
-                ansiColor('xterm') {
-                    sh './sbt -batch "+ publish"'
-                }
+                sh './sbt -batch "+ publish"'
             }
             post {
+                fixed {
+                    emailext to: 'notifications@logging.apache.org',
+                        from: 'Mr. Jenkins <je...@ci-builds.apache.org>',
+                        subject: "[CI][SUCCESS] ${env.JOB_NAME}#${env.BUILD_NUMBER} back to normal",
+                        body: '${SCRIPT, template="groovy-text.template"}'
+                }
                 failure {
-                    emailext body: '${SCRIPT, template="groovy-html.template"}',
-                        replyTo: 'dev@logging.apache.org',
-                        subject: "[Scala] Jenkins build failure (#${env.BUILD_NUMBER})",
+                    emailext to: 'notifications@logging.apache.org',
                         from: 'Mr. Jenkins <je...@ci-builds.apache.org>',
-                        to: 'notifications@logging.apache.org'
+                        subject: "[CI][FAILURE] ${env.JOB_NAME}#${env.BUILD_NUMBER} has potential issues",
+                        body: '${SCRIPT, template="groovy-text.template"}'
                 }
             }
         }
diff --git a/build.sbt b/build.sbt
index 34616ee..685828e 100644
--- a/build.sbt
+++ b/build.sbt
@@ -66,8 +66,8 @@ lazy val publishSettings = Seq(
   },
   credentials ++= {
     for {
-      username <- sys.env.get("NEXUS_USERNAME")
-      password <- sys.env.get("NEXUS_PASSWORD")
+      username <- sys.env.get("NEXUS_USR")
+      password <- sys.env.get("NEXUS_PWD")
     } yield Credentials("Sonatype Nexus Repository Manager", "repository.apache.org", username, password)
   }.toList,
   // FIXME: https://github.com/sbt/sbt/issues/3519