[英]How to build a deployment Pipeline Using Bitbucket, Jenkins and ElasticBeanstalk
[英]Jenkins pipeline to build image
我正在编写一个 Jenkins 管道 groovy 脚本来构建映像。我想构建一个映像并使用此 Z233E543384EDFAE35 管道在 EC2 中运行一些 docker 命令。 我在管道下面写了
pipeline {
agent none
stages {
stage ('image-build')
steps{
withAWS(region: 'us-east-1', roleAccount: 9441982XX , role:
'Jenkins')
{
sh """
mkdir jenkins
ls -a
"""
}
}
}
}
但我得到以下错误
WorkflowScript: 4: Expected a stage @ line 4, column 5.
stage ('image-build')
^
WorkflowScript: 5: Expected a stage @ line 5, column 8.
steps{
^
WorkflowScript: 3: No stages specified @ line 3, column 5.
stages {
^
3 errors
at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310)
at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1085)
a
在 stage('image-build') 放置大括号 { 后出现语法错误
pipeline {
agent none
stages {
stage('image-build') {
steps {
withAWS(region: 'us-east-1', roleAccount: 9441982 XX, role:
'Jenkins') {
sh ""
"
mkdir jenkins
ls - a
""
"
}
}
}
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.