Update Jenkinsfile, deliver.sh, and 2 more files...
This commit is contained in:
parent
b0dfdc9a17
commit
e27daa5f6d
49
Jenkinsfile
vendored
Normal file
49
Jenkinsfile
vendored
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
#!/usr/bin/env groovy
|
||||||
|
// see https://jenkins.io/doc/book/pipeline/syntax/
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
environment {
|
||||||
|
MVN_SET = credentials('maven_settings')
|
||||||
|
}
|
||||||
|
agent { docker { image 'maven:3.6.3' } }
|
||||||
|
triggers {
|
||||||
|
pollSCM "* * * * *"
|
||||||
|
}
|
||||||
|
options {
|
||||||
|
timestamps()
|
||||||
|
ansiColor("xterm")
|
||||||
|
}
|
||||||
|
parameters {
|
||||||
|
booleanParam(name: "RELEASE",
|
||||||
|
description: "Build a release from current commit.",
|
||||||
|
defaultValue: false)
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
|
||||||
|
stage("Build & Deploy SNAPSHOT") {
|
||||||
|
steps {
|
||||||
|
sh "mvn -s $MVN_SET -B deploy"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage("Release") {
|
||||||
|
when {
|
||||||
|
expression { params.RELEASE }
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
sh "mvn -s $MVN_SET -B release:prepare"
|
||||||
|
sh "mvn -s $MVN_SET -B release:perform"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Deliver') {
|
||||||
|
steps {
|
||||||
|
sh './jenkins/scripts/deliver.sh'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
deleteDir()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
3
jenkins/scripts/deliver.sh
Executable file
3
jenkins/scripts/deliver.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash -e
|
||||||
|
echo "Delivered."
|
||||||
|
|
47
pom.xml
47
pom.xml
@ -2,38 +2,31 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>it.tdlight</groupId>
|
<groupId>it.tdlight</groupId>
|
||||||
<artifactId>tdlight-natives-osx-amd64</artifactId>
|
<artifactId>tdlight-natives-osx-amd64</artifactId>
|
||||||
<version>1.1.12</version>
|
<version>2.0.1-SNAPSHOT</version>
|
||||||
<name>TDLight Natives for OSX (amd64)</name>
|
<name>TDLight Natives for OSX (amd64)</name>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<profiles>
|
|
||||||
<profile>
|
|
||||||
<id>publish-to-mchv</id>
|
|
||||||
<properties/>
|
|
||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
<repository>
|
<repository>
|
||||||
<id>mchv</id>
|
<id>mchv</id>
|
||||||
<name>MCHV Apache Maven Packages</name>
|
<name>MCHV Apache Maven Packages</name>
|
||||||
<url>https://mvn.mchv.eu/repository/mchv/</url>
|
<url>https://mvn.mchv.eu/repository/mchv/</url>
|
||||||
</repository>
|
</repository>
|
||||||
|
<snapshotRepository>
|
||||||
|
<id>mchv</id>
|
||||||
|
<name>MCHV Apache Maven Packages</name>
|
||||||
|
<url>https://mvn.mchv.eu/repository/mchv-snapshot/</url>
|
||||||
|
</snapshotRepository>
|
||||||
</distributionManagement>
|
</distributionManagement>
|
||||||
</profile>
|
<scm>
|
||||||
<profile>
|
<connection>scm:git:git@ssh.git.ignuranza.net:tdlight-team/tdlight-java-natives-osx-amd64.git</connection>
|
||||||
<id>publish-to-github</id>
|
<url>scm:git:git@github.com:user/project.git</url>
|
||||||
<properties/>
|
<developerConnection>scm:git:git@ssh.git.ignuranza.net:tdlight-team/tdlight-java-natives-osx-amd64.git</developerConnection>
|
||||||
<distributionManagement>
|
<tag>master</tag>
|
||||||
<repository>
|
</scm>
|
||||||
<id>github</id>
|
|
||||||
<name>GitHub TDLight Team Apache Maven Packages</name>
|
|
||||||
<url>https://maven.pkg.github.com/tdlight-team/tdlight-java</url>
|
|
||||||
</repository>
|
|
||||||
</distributionManagement>
|
|
||||||
</profile>
|
|
||||||
</profiles>
|
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
@ -53,6 +46,22 @@
|
|||||||
<target>1.8</target>
|
<target>1.8</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-release-plugin</artifactId>
|
||||||
|
<version>3.0.0-M1</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>default</id>
|
||||||
|
<goals>
|
||||||
|
<goal>perform</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<pomFileName>${project.name}/pom.xml</pomFileName>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
<version>3.0.2</version>
|
<version>3.0.2</version>
|
||||||
|
22
seedjob.groovy
Normal file
22
seedjob.groovy
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/env groovy
|
||||||
|
// see https://jenkinsci.github.io/job-dsl-plugin/ and https://jenkinsci.github.io/job-dsl-plugin/#path/pipelineJob
|
||||||
|
|
||||||
|
pipelineJob("my-maven-lib") {
|
||||||
|
displayName("My Maven Lib")
|
||||||
|
definition {
|
||||||
|
cpsScm {
|
||||||
|
scm {
|
||||||
|
git {
|
||||||
|
remote {
|
||||||
|
url("...")
|
||||||
|
branch("*/master")
|
||||||
|
}
|
||||||
|
extensions {
|
||||||
|
localBranch("master")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
scriptPath("Jenkinsfile")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user