
Plugin Jenkins che fornisce un'API condivisa per la gestione delle credenziali Docker, l'autenticazione al registro, la configurazione del demone e l'impronta digitale delle immagini tra i plugin CI/CD correlati a Docker.
Plugin API che fornisce le funzionalità comuni condivise per vari plugin relativi a Docker.
ToolInstallation per client CLI DockerDockerImageExtractor per ottenere le relazioni delle immagini Docker dai jobCiò consente agli utenti di configurare un set di endpoint/credenziali e utilizzarlo su tutti i plugin correlati a Docker, mantenendo così la configurazione più DRY.
Vedi Docker Pipeline Plugin per l'uso tipico.
Un esempio su come associare le credenziali dell'host/daemon Docker in una pipeline dichiarativa:
pipeline {
agent any
tools {
// a bit ugly because there is no `@Symbol` annotation for the DockerTool
// see the discussion about this in PR 77 and PR 52:
// https://github.com/jenkinsci/docker-commons-plugin/pull/77#discussion_r280910822
// https://github.com/jenkinsci/docker-commons-plugin/pull/52
'org.jenkinsci.plugins.docker.commons.tools.DockerTool' '18.09'
}
environment {
DOCKER_CERT_PATH = credentials('id-for-a-docker-cred')
}
stages {
stage('foo') {
steps {
sh "docker version" // DOCKER_CERT_PATH is automatically picked up by the Docker client
}
}
}
}
1.15 e precedenti