Home > database >  Gatling Archive inside Job DSL
Gatling Archive inside Job DSL

Time:01-18

I'm trying to include gatlingArchive() on my pipelines (already in prod). I tried to use the usual way of:

stages {
    stage("Run Gatling") {
        steps {
            ...
        }
        post {
            always {
                gatlingArchive()
            }
        }
    }
}

But our jobs do not contain the 'pipeline' step. See below:

job("job-my-job") {
    label(...)
    parameters {...}
    wrappers {...}
    scm {...}
    steps {...}
    publishers {...}
    logRotator(-1, 90)
    configure {...}
}

I tried to include the post inside the steps section and wrap the steps inside a stage block, but the syntax failed. Is it possible to issue a post command for gatlingArchive() in this case, without a pipeline step?

CodePudding user response:

You need to use publishers. Here is the documentation

 publishers {
        archiveGatling()
    }
  • Related