Jenkins

Docker

Using the official docker image is really simple, the only thing you need to do is use it as the base image for that job.

pipeline {
    agent none 
    stages {
        stage('Test') {
            agent { docker 'getapid/apid:latest' } 
            steps {
                "apid check -c path/to/apid.yaml"
            }
        }
    }
}

CLI

Integrating the CLI is just as simple as using the docker image. Download the latest version of the CLI, make it executable and run it.

pipeline {
    agent none 
    stages {
        stage('Test') {
            steps {
                "wget https://github.com/getapid/apid-cli/releases/download/v<version>/apid-<version>-linux-amd64.tar.gz"
                "tar -xzf apid-*.tzr.gz"
                "chmod u+x apid"
                "apid check -c path/to/apid.yaml"
            }
        }
    }
}

Didn't find what you were looking for?

You can head over to our FAQ page