我正在尝试使用官方 ArgoCD docker 映像(https://hub.docker.com/r/argoproj/argocd/dockerfile)自动部署
我使用 kubernetes 插件为代理创建了一个声明性 jenkins 管道,并使用 yaml 定义了 pod,容器定义如下所示:
pipeline {
agent {
kubernetes {
yaml """
kind: Pod
metadata:
name: agent
spec:
containers:
- name: maven
image: maven:slim
command:
- cat
tty: true
volumeMounts:
- name: jenkins-maven-cache
mountPath: /root/.m2/repository
- name: argocd
image: argoproj/argocd:latest
command:
- cat
tty: true
...
Run Code Online (Sandbox Code Playgroud)
我正在尝试在该容器内运行命令,管道中的该步骤如下所示:
stage('Build') {
steps {
container('maven') {
sh 'echo testing' // this works just fine
}
}
}
stage('Deploy') {
steps {
container('argocd') { …Run Code Online (Sandbox Code Playgroud)