Configuration as code (CaC) is the process of managing configuration and settings through machine-readable definition files, rather than using interactive configuration tools.
Questions tagged [configuration-as-code]
14 questions
16
votes
9 answers
How to fix Jenkins java.lang.IllegalStateException: An attempt to save the global configuration was made before it was loaded
I upgraded from jenkins 2.219 to 2.272 (latest version as of this writing) and now getting the stack trace below when Jenkins starts.
Jenkins docs says that this happens due to the Configuration as Code plugin and to set the jvm args as…

dukethrash
- 1,449
- 4
- 15
- 25
4
votes
1 answer
How to declaratively manage Kafka topics?
We're using Apache Kafka and have a lot of manually created topics (with custom topic config). We want to manage our topics like the rest of our infrastructure/configuration as code.
How can we programmatically and declaratively manage our topics?…

MichaelJ
- 41
- 2
2
votes
1 answer
How to approach configuration as code for Kafka topics in AWS MSK?
Does AWS MSK support creating topics via configuration, similar what Strimzi does?

clearpath
- 916
- 8
- 24
1
vote
1 answer
Jenkins: groovy.lang.MissingPropertyException: No such property: app for class: javaposse.jobdsl.dsl.helpers.workflow.CpsContext
I have an odd issue. I am working on a Jenkins CasC pipeline to auto populate jobs at startup. Everything was fine, until I started adding parameters. Running the added the below code from a job fails for the 1st time, then when I rerun subsequently…

New2Python
- 325
- 1
- 4
- 17
1
vote
4 answers
Merge a pull request if and only if a build succeeds
When doing configuration-as-code and/or infrastructure-as-code, the problem often is that something being committed in the version control does not mean it is also applied on the environment. But there is a way to ensure it (except for very untimely…

Jan Hudec
- 73,652
- 13
- 125
- 172
1
vote
2 answers
How do I remove the implict 'checkout' task from Bamboo YAML
I am using the Bamboo build system to create and deploy a docker image. I have three stages corresponding to:
Build Docker Image
Tag Image
Deploy Image
In the build stage I am pulling my Dockerfile, and any other dependencies I need to construct…

Aron
- 372
- 5
- 18
1
vote
0 answers
Job DSL plugin: Casc reload button works fine but not Groovy script?
See this Reddit post for details and example code: https://www.reddit.com/r/jenkinsci/comments/l0w4ju/job_dsl_plugin_reload_button_works_fine_on/
Basically, reloading manually via the "configuration-as-code" page works fine, but reloading using…

Random Coder
- 105
- 1
- 6
1
vote
2 answers
How to escape ${} in Jenkins configuration as code (casc) plugin?
I am using Jenkins configuration as code (CASC) plugin to create Jenkins job during server startup inside docker. I wrote a shell script as a step inside a job configuration.
- script: >
freeStyleJob('jenkins-job-sample') {
…

Arunan Sugunakumar
- 3,311
- 3
- 12
- 20
0
votes
0 answers
How to import a Kotlin script job configuration into TeamCity?
I want to use the settings.kts script in TeamCity to create jobs, instead of manually clicking trough the UI. There is a button, "View as code", which lets me see the empty script of my newly created job, but I cannot paste the content there, the…

Thomas Hirsch
- 2,102
- 3
- 19
- 39
0
votes
0 answers
Create a job dsl SeedJob without UI
i'm trying to automate the configuration of my jenkins under docker. I have a yml configuration file that works with the plugin Configuration as Code JCASC, which trigger a groovy script where i create my jobs. I want to create a seed job from here,…

Grainbox
- 31
- 3
0
votes
0 answers
Including Terraform Configuration from Another Gitlab Project
I have a couple apps that use the same GCP project. There are dev, stage, and prod projects, but they're basically the same, apart from project IDs and project numbers. I would like to have a repo in gitlab like config where I keep these IDs, in a…

1252748
- 14,597
- 32
- 109
- 229
0
votes
1 answer
Kotlin BuildType 'XYZ': id 'XYZ' is already used in BuildType(uuid='', id='XYZ', name='Deploy to envr') error
I was trying to refactor my Kotlin file that contains the configuration for a TeamCity pipeline. However, I keep getting the following error:
BuildType 'KotlinExperiments_DeployToEnvironment': id 'KotlinExperiments_DeployToEnvironment' is already…

Clyde D'Souza
- 402
- 2
- 10
0
votes
1 answer
Jenkins CasC handling tokens Configurations As Code
I've been trying to provide some tokens through CasC (BitBucket Plugin) but every time the Jenkins instance restarted then the tokens are not working.
As I see that is happening because Jenkins use different salt and the Hash is changing.
How i can…
0
votes
0 answers
ansible infrastructure as code: create, update, delete users from config files
TLDR
I want the users on our infrastructure to reflect exactly the configuration files (json) that I provide to ansible.
A fast and simple approach would then be:
delete all users
recreate all users
but that means that at each deployment, the…

Chris Maes
- 35,025
- 12
- 111
- 136