Open karsaroth opened 6 years ago
Thanks for your feedback. To be able to reproduce this, could you please provide me a DSL example? The problem occurs in the deployment project permissions, so it will probably be enough to have that part.
Sure, I've cut down my dsl to the following, which still triggers the above error:
project(key: 'SDTST', name: 'Seed Test') {
plan(key: 'SDTP', name: 'Seed Plan') {
description "Tests Bamboo Seed"
branches {
autoBranchManagement {
createPlanBranchesForAllNewBranches()
deletePlanBranchesAfterDays 7
doNotDeleteInactivePlanBranches()
}
}
stage(name: 'Build Stage') {
job(key: 'BUILDJOB', name: 'Default Job') {
tasks {
cleanWorkingDirectory() {
description 'Clean the working directory'
}
}
artifacts {
definition(name: "Seed Artifact", copyPattern: '*.json') {
shared true
}
}
}
}
deploymentProject(name: "Test Deploy") {
releaseVersioning('${bamboo.buildResultKey}-release-1') {
autoIncrement()
}
environment(name: 'Test Seed Env') {
tasks {
cleanWorkingDirectory() {
description 'Clean the working directory'
}
}
}
}
}
}
Remove the deploymentProject element and it works.
Thanks a lot for the DSL. Unfortunately, I was not able to reproduce this error with 1.9.7 under Bamboo 6.1.
Maybe it is related to the permissions of the user running the seed task. What permissions does the user you trigger the build have? And have you configured a user in the task settings in the field "Bamboo user to run the script as"?
That was it, there was no user configured - I had assumed it would run as the triggering user, but that didn't seem to work right. Once I'd added my username as the user to run as, the issue was resolved.
You're right, configuring deployment projects and environments needs a configured user in the seed task. Actually, I run the creation of the DSL objects under the user that triggered the build in case no user is configured in the seed task, but somehow deployment projects and environments require a configured user. I haven't yet spotted the difference why this is the case. I'll therefore leave this ticket open and investigate this further.
Version: 1.9.7 Bamboo Version: 6.1.0
Getting this strange error when trying to run my previously successful seed project on a new server. It doesn't look like it's something to do with the seed code.
Previously successful on: 1.9.6 Bamboo Version: 6.1.0