mibexsoftware / bamboo-plan-dsl-plugin

Configuration as code with a Groovy-based DSL or YAML for Atlassian Bamboo.
https://marketplace.atlassian.com/plugins/ch.mibex.bamboo.plandsl/
Other
40 stars 16 forks source link

scptask fails to be deployed #75

Closed aabeling closed 6 years ago

aabeling commented 6 years ago

Hi,

I started with a manually written deployment plan and then I copied the generated plan dsl into my plan project to be used with the plan dsl seed task. The deployment plan consisted of an artifact download and a scp task

                    custom(pluginKey: 'com.atlassian.bamboo.plugins.bamboo-artifact-downloader-plugin:artifactdownloadertask') {
                        description 'Download release contents'
                        enabled true
                        isFinal false
                        configure(
                             'sourcePlanKey': 'AP-RLP',
                             'artifactId_0': '-1',
                             'localPath_0': '',
                        )
                    } 
                    custom(pluginKey: 'com.atlassian.bamboo.plugins.bamboo-scp-plugin:scptask') {
                        description 'copy to target'
                        enabled true
                        isFinal false
                        configure(
                             'useAntPattern': 'true',
                             'verifyFingerprint': 'false',
                             'remotePath': '/tmp',
                             'artifactToScp': '-2:-1:-1:LOCAL_FILES',
                             'host': 'apigw-d1',
                             'localPath': '*',
                             'private_key': '''blabla''',
                             'passphrase': 'foobar=',
                             'authType': 'KEY',
                             'username': 'oms',
                        )
                    } 

This is how it was generated.

When deployed with the plan dsl seed task it resulted in an error:

simple  09-Apr-2018 15:52:57    Plan DSL: found sourcePlanKey 'AP-RLP'
simple  09-Apr-2018 15:52:57    Plan DSL: found shared artifact 'md-rolelevels-proxy'
simple  09-Apr-2018 15:52:57    Plan DSL: found shared artifact with name 'md-rolelevels-proxy' and ID '187301890'
error   09-Apr-2018 15:52:57    Plan DSL: task failed: Could not find referenced artifact for artifactId_0. Have you shared this in your plan configuration?

Since the error message contains "artifact_0" which is a configuration for the artifactdownloadertask I thought the problem would be with this part. But the seed task works when the dsl only contains the artifactdownloadertask and misses the scptask.

Any idea?

Best regards Achim

aabeling commented 6 years ago

Perhaps related to #54 and #33? I replaced my custom tasks with native task syntax as proposed in #33 and now it works. I should have read the closed issues before.