Closed sohrab- closed 7 years ago
Could you please share me the DSL of both the polling trigger and the Bitbucket Server trigger so that I can try to reproduce it? Because I wasn't able to do so yet. Thanks!
I am actually migrating plans from a remote Git repo (defined in the plan) and a polling trigger to a Bitbucket Server (as a Linked Repository) and Bitbucket Server trigger.
So from this syntax:
plan {
scm {
git(name: repoName) {
url "${gitBaseSshUrl}/${repoName}.git"
branch branchName
sshSharedCredentials 'someCredentials'
}
}
triggers {
repositories repoName
periodically {
pollingFrequencyInSecs 1800
}
}
}
to:
plan {
scm {
linkedRepository repoName
}
triggers {
bitbucketServerRepositoryTriggered {}
}
}
This change results in the screenshot and stacktrace I already posted.
PS. Actually the old repos don't seem to go away neither but I assume that's because there is no way to disable old repos defined.
You are right, this is because repositories cannot be disabled but only be removed.
Is it possible that you have a syntax error in your polling trigger example? Actually, I think the syntax would need to look like this:
triggers {
polling() {
repositories repoName
periodically {
pollingFrequencyInSecs 1800
}
}
}
Ah sorry that was a copy-paste mistake on my part. My syntax does matche yours in my source code. I just had a few re-usable methods I had to expand for the above snippet and missed a line.
I can also confirm both old and new DSLs work fine when there is no existing plan. But if there is an existing plan with a working polling trigger, changing it to Bitbucket Server trigger causes the above issue.
@sohrab- You are right, I was now able to reproduce and also fix it. The bug fix will be part of the next plug-in release.
Bug fix shipped with release 1.9.1. Thanks again for reporting this!
I have existing plans with a polling repository trigger. I change the DSL to change it a Bitbucket Server trigger. Bamboo Seed plan runs successfully but the repository polling is not removed and cannot be configured any more (returns HTTP 500).
I have replicated this with both Disable and Delete actions in Seed Task. The stacktrace is rather long so I have attached it.
We are running Bamboo 6.0.1 and Plan DSL 1.8.2.