Coder Social home page Coder Social logo

ontrack-plugin's Introduction

ontrack-jenkins

This plug-in allow Jenkins to notify ontrack about events like build creation, status of running job, etc... but also allows Jenkins to require information from ontrack.

It allows to run the following actions:

  • creating a new build
  • promoting an existing build
  • validating an existing build according to the result of the build
  • execute any arbitrary DSL as a step or as a publisher
  • setup a build environment using the DSL
  • evaluating a condition based on a DSL evaluation

Setup

You can install the Ontrack Jenkins plug-in on any Jenkins version starting from 2.7.

Usage

To configure the build, go in Manage Jenkins > Configure System and enter the following data in the Ontrack configuration section:

  • Configuration name in ontrack — name of the Jenkins configuration in Ontrack ; this configuration will be used to generated back links to the Jenkins instance you are configuring. This will be used by the Build notifier.
  • URL — base URL to the Ontrack instance
  • User and Password — user used for the connection to Ontrack - this user must have enough rights for the actions it has to carry from within Jenkins. Usually, giving a Controller role should be enough.
  • Max tries - number of times a call to Ontrack must be repeated in case of failure
  • Retry delay - number of seconds between each retry attempt
  • Remote Ontrack version cache - number of seconds we consider the version from Ontrack being valid. This version is used by some plugin services which need to ensure backward compatibility
  • Security mode - defines how the security must be enforced

Five individual plug-ins are provided by the general Ontrack plug-in.

Integrations

ontrack-plugin's People

Contributors

daniel-beck-bot avatar davidcadanneels avatar dcoraboeuf avatar flesire avatar sansguidon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ontrack-plugin's Issues

Validation step in a parallel stage in a scripted build returns a wrong result

Given such a pipeline:

node ("docker") {
    stage("Build") {
        sleep time: 1, unit: 'SECONDS'
        ontrackBuild project: 'test', branch: 'master', build: "$BUILD_NUMBER"
    }
    stage("Tests") {
        parallel([
            "Test 1": {
                stage("Test 1") {
                    node("docker") {
                        try {
                            sleep time: 5, unit: 'SECONDS'
                            sh 'exit 1'
                        } finally {
                            ontrackValidate project: 'test', branch: 'master', build: "$BUILD_NUMBER", validationStamp: 'VS1', buildResult: currentBuild.currentResult
                        }
                    }
                }
            },
            "Test 2": {
                stage("Test 2") {
                    node("docker") {
                        sleep time: 15, unit: 'SECONDS'
                        ontrackValidate project: 'test', branch: 'master', build: "$BUILD_NUMBER", validationStamp: 'VS2', buildResult: currentBuild.currentResult
                    }
                }
            }
        ])
    }
}

The "VS1" validation stamp for stage "Test 1" will report "Passed" when "Failed" is expected.

The current build result cannot be used, only the current stage's status can be used.

Cannot configure properties when using GString templates

A call like:

ontrack.project('project') {
   config {
      svn CONFIG, "${PATH}/trunk"
   }
}

will fail because the svn() method on the ProjectProperties expects exactly String, String as arguments. Therefore, any other parameter like GString will make the call fail.

Using:

ontrack.project('project') {
   config {
      svn CONFIG as String, "${PATH}/trunk" as String
   }
}

will fix the problem, but better have a svn() method which accept any kind of parameter, and converts them to a String. This must of course be applied to all property configuration methods.

Ontrack 2.32.x upgrade

The Ontrack DSL brings some Kotlin dependencies, which is incorrect. This requires a fix in Ontrack itself.

Can not save global configuration with 2.33.0

Hi,

we can not change & save ontrack global configuration after upgrade 2.32.5 to 2.33.0

here is the error log

WARNING: Failed to save /var/lib/jenkins/net.nemerosa.ontrack.jenkins.OntrackConfiguration.xml
java.io.IOException: java.lang.RuntimeException: Failed to serialize net.nemerosa.ontrack.jenkins.OntrackConfiguration#version for class net.nemerosa.ontrack.jenkins.OntrackConfiguration
	at hudson.XmlFile.write(XmlFile.java:200)
	at hudson.model.Descriptor.save(Descriptor.java:872)
	at net.nemerosa.ontrack.jenkins.OntrackConfiguration.configure(OntrackConfiguration.java:59)
	at jenkins.model.Jenkins.configureDescriptor(Jenkins.java:3733)
	at jenkins.model.Jenkins.doConfigSubmit(Jenkins.java:3697)
	at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
	at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)
	at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:77)
	at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(PreInvokeInterceptedFunction.java:26)
	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:184)
	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:117)
	at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:129)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
	at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:860)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)
	at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:225)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
	at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
	at io.jenkins.blueocean.auth.jwt.impl.JwtAuthenticationFilter.doFilter(JwtAuthenticationFilter.java:61)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
	at com.smartcodeltd.jenkinsci.plugin.assetbundler.filters.LessCSS.doFilter(LessCSS.java:47)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
	at hudson.plugins.audit_trail.AuditTrailFilter.doFilter(AuditTrailFilter.java:92)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
	at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:59)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:237)
	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:214)
	at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:88)
	at org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:114)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
	at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:99)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
	at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
	at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
	at org.eclipse.jetty.server.Server.handle(Server.java:530)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:347)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:256)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)
	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:382)
	at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: Failed to serialize net.nemerosa.ontrack.jenkins.OntrackConfiguration#version for class net.nemerosa.ontrack.jenkins.OntrackConfiguration
	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:256)
	at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
	at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82)
	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)
	at com.thoughtworks.xstream.XStream.marshal(XStream.java:1026)
	at com.thoughtworks.xstream.XStream.marshal(XStream.java:1015)
	at com.thoughtworks.xstream.XStream.toXML(XStream.java:988)
	at hudson.XmlFile.write(XmlFile.java:193)
	... 97 more
Caused by: java.lang.UnsupportedOperationException: Refusing to marshal java.util.concurrent.atomic.AtomicReference for security reasons; see https://jenkins.io/redirect/class-filter/
	at hudson.util.XStream2$BlacklistedTypesConverter.marshal(XStream2.java:543)
	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
	at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
	... 110 more

and content of /var/lib/jenkins/net.nemerosa.ontrack.jenkins.OntrackConfiguration.xml

<?xml version='1.1' encoding='UTF-8'?>
<net.nemerosa.ontrack.jenkins.OntrackConfiguration plugin="[email protected]">
  <ontrackConfigurationName>cnyes</ontrackConfigurationName>
  <ontrackUrl>https://ontrack.cnyes.cool</ontrackUrl>
  <ontrackUser>ci</ontrackUser>
  <ontrackPassword>ci</ontrackPassword>
  <ontrackMaxTries>1</ontrackMaxTries>
  <ontrackRetryDelaySeconds>10000</ontrackRetryDelaySeconds>
  <securityMode>DEFAULT</securityMode>
</net.nemerosa.ontrack.jenkins.OntrackConfiguration>

Ontrack parameters as extensions of the Job DSL

Create extensions for the Job DSL plugin for:

  • multiple parameters
  • choice parameter
  • single parameter

Plus some predefined scripts:

  • last build parameter(s)
  • last promoted build parameter(s)

This will require jenkinsci/job-dsl-plugin#713 to be accepted.

Done. Available only in DSL 1.42. As of today, the Ontrack plugin, for compatibility reasons, supports only 1.35.

Feeding run info for builds and validation runs

See nemerosa/ontrack#600.

  • Use feature/600-run-info temporary version for development - feature-600-run-info-ccbdb45
  • Build publisher
  • Validation run publisher
  • Step integration for build creation (stage duration)
  • Step integration for validation run creation (stage duration)
  • Make the run info available for the Ontrack DSL
  • Check compatibility (2.35 / 3.35) - for steps, Ontrack DSL and legacy notifiers (needs tmp version feature-600-run-info-04ab67b)
  • Use Ontrack 2.35.0
  • Version check must be cached
  • Gets the commit for a SCM trigger cause
  • Testing with a beta version
  • Documentation / when it is done / examples of custom script
  • Pipeline starting from 2.33
  • Backport run info for build/validation notifier to LTS 2.30.3

Navigation between Jenkins and Ontrack

I'm not able to easily navigate from specific Jenkins build/job to any ontrack dashboards. For my perspective ideally user should have navigated button on side-panel in Jenkins

Change log - gets the list of committers in an environment variable

  • add an extra configuration parameter to the change log step, to hold the list of committer emails
  • add an extra configuration parameter to the change log step to define the mail suffix to add to the list of committer IDs (optional - not needed for Git - but needed for SVN)
  • collect the list of committers from the change log, adjust for email addresses and inject as environment variable

Calling ontrack from Jenkins using OntrackDSLStep

Using below snippet we are not able to generate Use the provided DSL script in Jenkins
image
image

How can i make usingText to true by using ontrackDSLStep?
Plugin version: [email protected]
image

But if i use below configuration, I am able to see the content as per expected.
configure { node ->
node / builders / 'net.nemerosa.ontrack.jenkins.OntrackDSLStep' {
usingText true
injectEnvironment 'BRANCH'
injectProperties ''
ontrackLog true
sandbox false
ignoreFailure false
scriptText '''println "BRANCH = ${BRANCH}"

def myBranch = "${BRANCH}"
if (myBranch.startsWith('branches/')) {
myBranch = myBranch - 'branches/'
}
myBranch = myBranch.replaceAll('/', '-')

def ontrackBranch = myBranch
if (ontrackBranch.endsWith('x')) {
ontrackBranch = ontrackBranch - 'x'
}

Non empty descriptions are generated

For a project:

image

For a validation run:

image

Somehow, the JSON serialisation on Jenkins side transforms the empty string into this "" string:

[ontrack][post] {
    "name": "test",
    "description": "\"\""
}
[ontrack][request] POST https://.../structure/projects/create HTTP/1.1
[ontrack][response] POST https://.../structure/projects/create HTTP/1.1 CODE 201 Created

Used escaped raw message for the revision change log

In the Ontrack change log (both summary & full page), do not use the formattedMessage field, but the message. The ticket references are currently displayed in raw HTML.

image

The links will remain available in the index page, in the issue change log section:

image

Allows use of the ontrack parameter type in declarative pipeline syntax

We can use ontrack parameters in declarative syntax using the following code, so we retrieve dynamic parameters, but we still need to write a lot of ugly code to achieve that (example below).

properties([
    parameters([
        [
            $class: 'OntrackChoiceParameterDefinition', 
            description: '', 
            dsl: "ontrack.branch('APS', 'release').standardFilter(count: 5)",
            name: 'RELEASE_NUMBER', 
            valueProperty: 'name',
            sandbox: false
        ]
    ])
])
pipeline {
    agent any
   /* parameters {
        // no way at this moment to have dynamic ontrack parameters here
    }*/
    stages {
        stage('Example') {
            steps {
	         echo 'deployment of config for ' + params.RELEASE_NUMBER
            }
        }
    }
}

Hopefully, a solution exists, simple to implement by taking inspiration from other plugins.
So, the aim of this issue is to improve support of declarative pipeline and allow dynamic parameters as below :

pipeline {
    agent any
    parameters {
        ontrackChoiceParam(name: 'RELEASE_NUMBER', description: '...', dsl: '...', valueProperty: '...')
    }
    stages {
        stage('Example') {
            steps {
	         echo 'deployment of config for ' + params.RELEASE_NUMBER
            }
        }
    }
}

How ?

In order to have per-plugin parameters recognised by Jenkins, it's needed to define a specific Symbol in classes that extend ParameterDefinition https://github.com/jenkinsci/ontrack-plugin/search?utf8=%E2%9C%93&q=ParameterDescriptor+&type=

Example here with the another plugin (credentials) where a Symbol annotation is defined
https://github.com/jenkinsci/credentials-plugin/blob/master/src/main/java/com/cloudbees/plugins/credentials/CredentialsParameterDefinition.java#L115

More info about this problem and solution for credentials plugin, if it's helpful :
https://issues.jenkins-ci.org/browse/JENKINS-44588
https://github.com/jenkinsci/credentials-plugin/pull/86/files

🚧 I'm currently working on a solution, and it seems to fill the needs perfectly ☕️

Cheers
Morgan

Improve navigation between Jenkins & Ontrack

Now we have navigation links from Jenkins builds ( #49 ) and it's really handy. It would also be nice to add navigation links on project & branch levels so we could even more easily navigate wherever we are in a Jenkins structure.

Allow Groovy configuration for the Ontrack plugin

The Ontrack plugin should be instantiable using Groovy, by passing its parameters directly:

def ontrack = new net.nemerosa.ontrack.jenkins.OntrackConfiguration()
ontrack.ontrackConfigurationName = 'Jenkins'
ontrack.ontrackUrl = "http://ontrack:8080"
ontrack.ontrackUser = 'jenkins'
ontrack.ontrackPassword = 'jenkins'
ontrack.save()

ontrack trigger is not available in pipeline

hello,

Thanks for this amazing project & jenkins plugin integrations.

Recently we try to setup auto trigger build with jenkins & ontrack.

But we found out that ontrack trigger is not available in pipeline configuration GUI.

2018-04-08 9 04 11

jenkins version = 2.114
ontrack plugin version = 2.32.4

Ontrack trigger on multiple sources

The existing ontrackTrigger trigger deals with only one source (one project + one branch).

Create an ontrackMultiTrigger which can take several projects/branches/promotions as a source. If one of the conditions is met, the trigger will be fired.

Conditions of execution:

  • if at least one trigger has no source (no build not promotion), the trigger is not fired
  • if all triggers have a source (build or promotion), and if all parameters are identical to their previous version, the trigger is not fired
  • if all triggers have a source (build or promotion), and if at least one parameter is different from its previous version, the trigger is fired - all parameters are then filled in

Reuse the code of ontrackTrigger as much as possible.

Ontrack actions as DSL extensions

Create extensions for the Job DSL plugin (min 1.35) for:

  • creation of a build
  • creation of a promotion run
  • creation of a validation stamp
  • DSL publisher
  • DSL step

Publisher for the change log in a build page

Have a publisher which creates an action which displays an Ontrack change log in the build page.

Parameters:

  • project name
  • branch name
  • the two build boundaries are determined by a parameter value (VERSION by default, but can be configured) on the:
    • current build
    • previous build

The change log is computed between the two builds.

If the Distinct builds option is checked, the change log is computed for each build interval.

  • Displays the build boundaries on top of the change log
  • Link to the full details: commits, issues and files
  • Case when no build difference - no change log
  • No issue section when no issue
  • Link to the issue
  • Link to the Ontrack change log page - this would need Ontrack to provide links to the pages in the resource links - see nemerosa/ontrack#275
  • Option to split the change logs per build - needs for Ontrack to provide such a query - see nemerosa/ontrack#276
  • Case where builds are not found

Ontrack environment preparation task

Have a build wrapper which allows to set the build environment by connecting to Ontrack:

  • build wrapper (same model than the "Prepare an environment for the run")
  • injection of parameters and build
  • must return a map, which in turn is injected into the build environment

Do not exclude the Groovy package

Version 2.26 of the plug-in did contain the Groovy runtime classes, whereas the 2.28 does not. This causes incompatibility issues with old versions of Jenkins.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.