Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Gavin Mogan
@halkeye
is your jenkins.yaml invalid then?
like remove that one and restart it
or are you saying something still has the value of jenkins.yaml?
Vincent Gillet
@lvincel
I am new to JCasC and configured the helm to play with. It's really nice to get a full blown jenkins configured with artifactory - gitlab - vault all managed with Git. I am just struggling with one issue at the moment: using build trigger with a secret token for a build and configure a webhook in gitlab, it works fine one time and then the token is erased in the job configuration. Did anyone experienced this ?
Vincent Gillet
@lvincel
nevermind I found the issue: jenkinsci/gitlab-plugin#925 This is a real show stopper for me :/
1 reply
victtsl
@victtsl
Hi, I'm new to JCasC. I'm able to setup Jenkins using Helm. Trying to understand what this setting master.JCasC.defaultConfig does. Which default Jenkins configuration does it enable? Does it overwrite any configuration that is set elsewhere? Any help would be appreciated.
lsllopez
@lsllopez

Hello Folks, I am getting started with Jenkins as code, and running into an issue when trying it to connect it to a private repo: Cannot validate default version.
hudson.plugins.git.GitException: Command "git ls-remote -h -- git@github.com:company/Reponame.git" returned status code 128:
stdout:
stderr: Host key verification failed.

fatal: Could not read from remote repository.

Is there a way to get around this issue. I got this error while trying to configure Global Pipeline Libraries on Jenkins 2.249.1

I know what the error is and how to solve it if Jenkins was running on a VM, but since this one is running on Docker, not sure what is the best/proper way to solve it. Thanks in advance folks
Mark Waite
@MarkEWaite
@lsllopez that usually means you attempted to access a repository that is secured with an ssh private key but provided a private key that is not authorized to access the repository
jyanga
@jyanga
hi...i am new to this...please be patient with me....can anyone point me to a sample code where the job triggers when a merged commit is performed on a git repo?
toddmorgan
@toddmorgan
howdy folks ... I have aspirations of setting up a jenkins instance from a "single click" using CASC .. Ansible and other things
I'm stuck with the configuration of (JNLP) agents using CASC.
I can define the agents AOK within CASC but I can't seem to connect them in an automated fashion due to JNLP containing a secret to connect to the master .. the secret requires CSRF Crumb to harvest ... to get crumb you need API token ... to get API token you need CSRF :-|
Which seems to be a cycle? or have I missed something
1 reply
Oleg Nenashev
@oleg-nenashev
Are we doing a meeting today @timja @jetersen?
Tim Jacomb
@timja
only if needed
Oleg Nenashev
@oleg-nenashev
Then nope
lsllopez
@lsllopez

@MarkEWaite Thanks Mark, my question is how do I configured the ssh key into Jenkins yaml file?

credentials:
system:
domainCredentials:

  - credentials:
      - basicSSHUserPrivateKey:
          scope: SYSTEM
          id: ssh_with_passphrase_provided
          username: ssh_root
          passphrase: ${SSH_KEY_PASSWORD}
          description: "SSH passphrase with private key file. Private key provided"
          privateKeySource:
            directEntry:
              privateKey: ${SSH_PRIVATE_KEY}

Will this do the trick?

victtsl
@victtsl

Is this the right forum to answer the below? If not, where should this be posted?

Hi, I'm new to JCasC. I'm able to setup Jenkins using Helm. Trying to understand what this setting master.JCasC.defaultConfig does. Which default Jenkins configuration does it enable? Does it overwrite any configuration that is set elsewhere? Any help would be appreciated.

Tim Jacomb
@timja
Have a look in the values.yaml file
Torsten Walter
@torstenwalter
Buamod
@Ibuamod_twitter
i know this is configuration as code .. is there something like pipeline as code .. where you go an convert all the pipelines in your jenkins as code and dump them into a new jenkins
krishnavenisuresh
@krishnavenisuresh
hi guys ... anyone tried clamav plugin configuration in jcasc? i want to configure clamav in jcasc but there is no sample configure found . anyone help me out
Domagoj Smoljanovic
@dsmoljanovic
Hi all again. Anyone knows the syntax for CASC to implement nested views? I Can't manage to make it work, nor do they appear in the export of the configuration.
Thanx :)
Oleg Nenashev
@oleg-nenashev
Meeting today?
Tim Jacomb
@timja
only if you want one :)
Oleg Nenashev
@oleg-nenashev
looks like nope then
I hope to have something for the next meeting. I made some progress with Jenkinsfile Runner ecosystem, and there are many bits for Plugin Installation Manager - related things I would like to spend time on
Tim Jacomb
@timja
ah cool :)
jibbajabber
@jibbajabber

Firstly, great plugin (thanks, looking forward to integration into core). I've configured our entire Jenkins successfully with it in combination with ansible.
Apologies if this is covered elsewhere, however I'm struggling to find out how to see if a plugin is supported, if no example exists in demos, I have read the section that I presume relates to this but I'm still unsure:

The Initial Configuration doc section for JCasC states:
"When configuring the first Jenkins instance, browse the examples shown in the demos directory of this repository. If you have a plugin that does not have an example, consult the reference help document. Click the Documentation link at the bottom of the Configuration as Code page."

Could you clarify what is meant by 'reference help document'?

Also the next sentence states 'Click the Documentation link at the bottom of the Configuration as Code page', I don't see this link when I'm browsing from https://github.com/jenkinsci/configuration-as-code-plugin

FYI: I would like to add splunk plugin https://plugins.jenkins.io/splunk-devops/ could someone share how we determine/identify the root element and associated attributes to configure this plugin (without an example present in the demos section) please, or point me to a relevant documentation that describes this in more detail? I've looked at a number of the source files within the plugin source, but it's still not clear to me, I've also read most of the md in the JCasC docs directory.

I'd favour a more general procedure in general, so that in future, should I come across any other plugins without examples, I'll be able to add without additional help. I'm happy to update the examples via a pull request if helpful after (if I find plugins that are supported).
Sorry for the long post :-)

Tim Jacomb
@timja
@jibbajabber the document link is 'Reference' and it's after you've installed it on the <jenkins-url>/configuration-as-code page
the general way to do it is to configure manually and then use the export button
jibbajabber
@jibbajabber
@timja Thanks! Much clearer, appreciate the pointer :-)
Tim Jacomb
@timja
feel free to send a PR to make any docs clearer, would be appreciated :)
it's not quite as simple as adding an md file, but they are tested so we know that they work, which gives a lot of value :)
Mark
@MarkRx
Hello. Is it possible to manage the Jenkins master.key with JCasC? Even better, can that secret be obtained from vault?
Tim Jacomb
@timja
no it's not currently
Ope Omotayo
@opeomotayo_gitlab
Hi
I'm trying to install snky with Jcasc
Does anyone know snyk install name?
i.e for Maven: maven:
installations:
  - name: "Maven 3"
    properties:
      - installSource:
          installers:
            - maven:
                id: "latest"
for jdk jdk:
installations:
  - name: "open-jdk8"
    properties:
      - installSource:
          installers:
            - adoptOpenJdkInstaller:
                id: "jdk8u232-b09"
for snyk, I tried snyk:
installations:
  - name: "snyk-latest"
    home: ""
    properties:
      - installSource:
          installers:
            - snykInstaller:
                id: "latest"
It stopped Jenkins
Ope Omotayo
@opeomotayo_gitlab
Is snykInstaller wrong?
Konrad Windszus
@kwin
I want to prevent clearing credentials during the config loading which are not listed in the YAML. Currently all credentials which are not in my YAML but have been in my Jenkins are cleared. How can I achieve a merge behaviour (i.e. only the ones with a given id are set/overwritten and other credential ids are left untouched)?
Mark
@MarkRx

Is there logging that I can turn on to figure out why JCasC takes so long to boot? It's taking 9 minutes on an empty Jenkins instance (with plugins) -

2020-10-28 22:42:56.916+0000 [id=48] INFO jenkins.model.Jenkins$5#runTask: Took 512763ms for ConfigurationAsCode.init by pool-10-thread-4

1 reply
Gavin Mogan
@halkeye
@kwin From my experience thats the default, how sure are you that jcasc is the one deleting the other credentials?
2 replies
actually i'm not sure, cause i think i was using a different credential provider before
Konrad Windszus
@kwin
I am gonna open an issue then for making that possible
3 replies
Gavin Mogan
@halkeye
i guess its setting the array of credentials, so replacing the entire list
Jose Vasquez
@joseenriquevasquez
Hi Everybody, wonder if you have a sample about adding nerwork(docker settings) to docker template
clouds:
- docker:
    name: "docker"
    dockerApi:
      dockerHost:
        uri: "tcp://proxy1:2375"
    templates:
      - labelString: "slave"
        name: "docker"
        dockerTemplateBase:
         // ---->>>. need to add   network=abc.  at this level <<<-----