Explorar el Código

Added JVM_OPTS

Spencer Gardner hace 6 años
padre
commit
74aafe490f
Se han modificado 2 ficheros con 33 adiciones y 2 borrados
  1. 2 2
      Dockerfile
  2. 31 0
      Jenkinsfile

+ 2 - 2
Dockerfile

@@ -1,4 +1,4 @@
-from debian
+FROM debian
 
 ARG DEBIAN_FRONTEND=noninteractive
 
@@ -10,4 +10,4 @@ RUN apt-key adv --keyserver keyserver.ubuntu.com --recv 06E85760C0A52C50
 
 RUN apt-get update -y && apt-get install -y unifi && apt-get clean
 
-CMD java -jar /usr/lib/unifi/lib/ace.jar start
+CMD java $JVM_OPTS -jar /usr/lib/unifi/lib/ace.jar start

+ 31 - 0
Jenkinsfile

@@ -0,0 +1,31 @@
+pipeline{
+	agent any
+	triggers {
+		pollSCM('H * * * *')
+		cron('H H H * *')
+	}
+	stages{
+        stage('Build') {
+			steps {
+				script {
+					docker.withRegistry('https://docker.snppla.net', 'nexus_push'){
+						def customImage = docker.build("docker.snppla.net/snppla/unifi:${env.GIT_BRANCH}", "--pull ./")
+						customImage.push()
+					}
+				}
+			}
+        }
+	}
+	post {
+		success{
+			emailext body: "${env.BUILD_URL} was built", to: '$DEFAULT_RECIPIENTS', recipientProviders: [developers()], subject: "Built Pipeline: ${currentBuild.fullDisplayName}"
+		}
+		failure{
+			emailext body: "Something is wrong with ${env.BUILD_URL}", to: '$DEFAULT_RECIPIENTS', recipientProviders: [developers()], subject: "Failed Pipeline: ${currentBuild.fullDisplayName}"
+		}
+		fixed
+		{
+			emailext body: "The pipeline was fixed with ${env.BUILD_URL}", to: '$DEFAULT_RECIPIENTS', recipientProviders: [developers()], subject: "Pipeline fixed: ${currentBuild.fullDisplayName}"
+		}
+	}
+}