You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am getting below error while trying to configure pipeline jobs using the plugin.
Failed ConfigurationAsCode.init
io.jenkins.plugins.casc.ConfiguratorException: Found incompatible configuration elements YamlSource: /var/jenkins_home/casc_configs/jobs.yaml
Below is the snippet i added to my Jenkins values.yaml file. Please note that the installation is using Helm.
JCasC:
defaultConfig: false
configScripts:
welcome-message: |
jenkins:
systemMessage: Welcome to our CI\CD server. This Jenkins is configured and managed 'as code'.
pipeline-job: |
jobs:
- script: >
folder('TEST')
- script: >
pipelineJob('TEST/Hello-world') {
description('Master job for CI pipeline')
parameters {
string(name: 'PULL_REQUEST_FROM_REPO_ID', defaultValue: '', description: 'Pull request parameters')
string(name: 'PULL_REQUEST_FROM_BRANCH', defaultValue: '', description: 'Pull request parameters')
}
properties {
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '80'))
disableConcurrentBuilds()
}
definition {
cpsScm {
scm {
git {
remote {
url("https://mybitbucket.com/scm/sandbox/repo.git")
credentials('my-cred')
}
branches('*/master') // Configure the branch you want to build
scriptPath('Jenkinsfile') // Path to your Jenkinsfile in the repository
}
}
}
}
}
jenkins-credentials: |
credentials:
system:
domainCredentials:
- credentials:
- usernamePassword:
Could you please help to understand what is missing in above snippet?
The text was updated successfully, but these errors were encountered:
Hello,
I am getting below error while trying to configure pipeline jobs using the plugin.
Failed ConfigurationAsCode.init
io.jenkins.plugins.casc.ConfiguratorException: Found incompatible configuration elements YamlSource: /var/jenkins_home/casc_configs/jobs.yaml
Below is the snippet i added to my Jenkins values.yaml file. Please note that the installation is using Helm.
JCasC:
defaultConfig: false
configScripts:
welcome-message: |
jenkins:
systemMessage: Welcome to our CI\CD server. This Jenkins is configured and managed 'as code'.
pipeline-job: |
jobs:
- script: >
folder('TEST')
- script: >
pipelineJob('TEST/Hello-world') {
description('Master job for CI pipeline')
parameters {
string(name: 'PULL_REQUEST_FROM_REPO_ID', defaultValue: '', description: 'Pull request parameters')
string(name: 'PULL_REQUEST_FROM_BRANCH', defaultValue: '', description: 'Pull request parameters')
Could you please help to understand what is missing in above snippet?
The text was updated successfully, but these errors were encountered: