
ملحق Jenkins يوفر واجهة برمجة تطبيقات مشتركة لإدارة بيانات اعتماد Docker ومصادقة السجل وتكوين الخفي وبصمات الصور عبر ملحقات CI/CD المتعلقة بـ Docker.
ملحق API يوفر الوظائف المشتركة للعديد من الملحقات المتعلقة بـ Docker.
ToolInstallation لعملاء Docker CLIDockerImageExtractor للحصول على علاقات صور Docker من الوظائفيتيح هذا للمستخدمين تكوين مجموعة واحدة من نقاط النهاية/بيانات الاعتماد واستخدامها عبر جميع الملحقات المتعلقة بـ Docker، مما يحافظ على تكوين أكثر DRY.
انظر Docker Pipeline Plugin للاستخدام النموذجي.
مثال حول كيفية ربط بيانات اعتماد مضيف/خادم Docker في خط أنابيب تعريفي:
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 والأقدم