Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 03:35
    casz commented #1218
  • 01:30
    LinuxSuRen commented #1218
  • Dec 10 22:27
  • Dec 10 21:42
    timja closed #1161
  • Dec 10 19:22
    stale[bot] closed #1035
  • Dec 10 19:22
    stale[bot] closed #1032
  • Dec 10 17:17
    sladyn98 synchronize #1121
  • Dec 10 17:09
    sladyn98 synchronize #1121
  • Dec 10 10:49
    casz commented #1218
  • Dec 10 10:49
    casz commented #1218
  • Dec 10 10:47
    casz commented #1218
  • Dec 10 10:40
    casz edited #1027
  • Dec 10 09:54
    LinuxSuRen synchronize #1218
  • Dec 10 09:47
    timja synchronize #1027
  • Dec 10 09:46
    timja labeled #1027
  • Dec 10 09:44
    timja commented #1027
  • Dec 10 09:44
    timja review_requested #1027
  • Dec 10 09:43
    timja synchronize #1027
  • Dec 10 09:42
    oleg-nenashev commented #917
  • Dec 10 09:41
    oleg-nenashev commented #917
Wadeck Follonier
@Wadeck
Hey there, perhaps you could be interested in the Jenkins PR about API Token: jenkinsci/jenkins#4027
that could potentially help you with the crumbIssuer problem
Joseph Petersen
@casz
@Wadeck perhaps a downstream test in JCasC would be nice :)
KreativeKrise
@KreativeKrise

Hi there :) I need some help with the file credentials. My configuration looks like this:

credentials:
  system:
    domainCredentials:
      - credentials:
          - file:
                  description: "google-service-account"
                  fileName: "jenkins_google-service-account.json"
                  id: "google-service-account"
                  secretBytes: ${GOOGLE-SERVICE-ACCOUNT_JSON}
                  scope: GLOBAL

After I startet Jenkins, the credential was created successfully. But it seems, that the value of the secret isn't correct, because my build fails. If I upload the json file through the web interface of Jenkins, the build works. ${GOOGLE-SERVICE-ACCOUNT_JSON} is a base64 encoded json file. Anyone has an idea how I can fix it?

Joseph Petersen
@casz
@KreativeKrise what does the log say? JCasC will log a warning if secret is not resolved ⚠️
KreativeKrise
@KreativeKrise
@casz which log exactly?
Tim Jacomb
@timja
system log
KreativeKrise
@KreativeKrise
Sep 11, 2019 1:26:08 PM WARNING io.jenkins.plugins.casc.BaseConfigurator createAttribute

Can't handle class org.jenkinsci.plugins.plaincredentials.impl.FileCredentialsImpl#file: type is abstract but not Describable.

Sep 11, 2019 1:26:08 PM WARNING io.jenkins.plugins.casc.Attribute describe

Failed to export
java.lang.NullPointerException
    at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.describe(DataBoundConfigurator.java:283)
    at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$convertToNode$de0cd4f8$1(HeteroDescribableConfigurator.java:283)
    at io.vavr.CheckedFunction0.lambda$unchecked$52349c75$1(CheckedFunction0.java:247)
    at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.convertToNode(HeteroDescribableConfigurator.java:283)
    at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$describe$5(HeteroDescribableConfigurator.java:107)
    at io.vavr.control.Option.map(Option.java:392)
    at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.describe(HeteroDescribableConfigurator.java:107)
    at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.describe(HeteroDescribableConfigurator.java:55)
    at io.jenkins.plugins.casc.Attribute._describe(Attribute.java:264)
    at io.jenkins.plugins.casc.Attribute.describe(Attribute.java:239)
    at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.describe(DataBoundConfigurator.java:308)
    at io.jenkins.plugins.casc.Attribute._describe(Attribute.java:264)
    at io.jenkins.plugins.casc.Attribute.describe(Attribute.java:239)
    at com.cloudbees.plugins.credentials.casc.SystemCredentialsProviderConfigurator.describe(SystemCredentialsProviderConfigurator.java:76)
    at com.cloudbees.plugins.credentials.casc.SystemCredentialsProviderConfigurator.describe(SystemCredentialsProviderConfigurator.java:48)
    at io.jenkins.plugins.casc.Attribute._describe(Attribute.java:264)
    at io.jenkins.plugins.casc.Attribute.describe(Attribute.java:243)
    at com.cloudbees.plugins.credentials.casc.CredentialsRootConfigurator.describe(CredentialsRootConfigurator.java:90)
    at com.cloudbees.plugins.credentials.casc.CredentialsRootConfigurator.describe(CredentialsRootConfigurator.java:52)
    at io.jenkins.plugins.casc.ConfigurationAsCode.export(ConfigurationAsCode.java:442)
    at io.jenkins.plugins.casc.ConfigurationAsCode.doViewExport(ConfigurationAsCode.java:411)
    at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
    at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396)
    at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408)
    at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:77)
    at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(PreInvokeInterceptedFunction.java:26)
    at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:212)
    at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:145)
    at org.kohsuke.stapler.MetaClass$11.doDispatch(MetaClass.java:535)
    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:878)
    at org.kohsuke.stapler.MetaClass$9.dispatch(MetaClass.java:456)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:878)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:676)
    at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:873)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1623)
    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)
    at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:246)
    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
    at io.jenkins.blueocean.Resource
KreativeKrise
@KreativeKrise

I started a new installation of Jenkins and now I just get this warning:

Sep 12, 2019 8:00:10 AM WARNING io.jenkins.plugins.casc.BaseConfigurator createAttribute

Can't handle class org.jenkinsci.plugins.plaincredentials.impl.FileCredentialsImpl#file: type is abstract but not Describable.

But the credential is still not working.

Mark Waite
@MarkEWaite
There had been suggestions that the configuration as code plugin efforts might want to move from working within the Cloud Native special interest group to working within the platform special interest group. The platform special interest group meets every two weeks for platform related projects and topics.
Meeting starts in about 20 minutes at https://zoom.us/j/848212302
Meeting agenda is at https://docs.google.com/document/d/1bDfUdtjpwoX0HO2PRnfqns_TROBOK8tmP6SgVhubr2Y/edit?usp=sharing
I'm not aware of any hot topics that configuration as code would need to discuss, just sharing notice...
Oleg Nenashev
@oleg-nenashev
@casz starting without you
Oleg Nenashev
@oleg-nenashev
Better late than never. Recording of the next yesterday;s meeting will be here: https://youtu.be/cTZuMOCbkPQ
Rodolfo Boer
@move-z
hi, i have some problems while trying to configure jenkins via this plugin, is this the right place to ask for help?
Daniel Estermann
@d.esterman_gitlab
@oleg-nenashev I'll attend to this
Joseph Petersen
@casz
@move-z yup
Oleg Nenashev
@oleg-nenashev
@d.esterman_gitlab cool. Unfortunately I will be in Bordeaux at https://orconf.org/
Oleg Nenashev
@oleg-nenashev
Reviewed/updated https://issues.jenkins-ci.org/secure/Dashboard.jspa?selectPageId=17346 today. Should reflect the current state, more or less
Tim Jacomb
@timja
nice!
Rodolfo Boer
@move-z
hello, i took some time to do more tests
i'm trying to replicate the configuration of an existing jenkins instance entirely with this plugin, i've just started
currently i have setup the casc plugin to load this file at startup (jenkins.yaml):
jenkins:
  labelString: master

  globalNodeProperties:
    - envVars:
        env:
          - key: PATH+LOCAL
            value: /usr/local/bin

  securityRealm:
    activeDirectory:
      startTls: true
      groupLookupStrategy: AUTO
      domains:
        - name: {{domain}}
          servers: {{dc}}:3268
          bindName: {{bind}}
          bindPassword: {{password}}
          tlsConfiguration: TRUST_ALL_CERTIFICATES

unclassified:
  location:
    url: https://{{hostname}}
sorry i'll try to improve formatting
it loads fine and all the items are set in the config except for the securityRealm (for which I already installed the active active directory plugin)
i see nothing in the logs suggesting there are problems with the entry, it just has no effect
i also tried with this simpler config instead of activeDirectory but it makes no difference:
  securityRealm:
    local:
      allowsSignup: true
an interesting detail: if I go to the configuration-as-code settings page and click "reload existing configuration", it actually gets loaded, both the local and the active directory version, so the problem seems to be only at startup
final note: i'm using jenkins 2.176.3 (current stable), active directory plugin 2.16 and configuration as code plugin 1.30
Rodolfo Boer
@move-z
i think the simplest solution would be to trigger a reload after startup using the cli or an post
any comments from the experts?
Joseph Petersen
@casz
@move-z what if you configure it in UI first and use the export feature?
@move-z I haven't used the active directory plugin. Have you considered using the ldap plugin instead?
jenkins:
  securityRealm:
    ldap:
      cache:
        size: 100
        ttl: 30
      configurations:
      - groupSearchBase: "OU=Jenkins,OU=Security Groups,OU=DevOps"
        groupSearchFilter: "(&(cn={0})(objectclass=group))"
        ignoreIfUnavailable: true
        inhibitInferRootDN: false
        managerDN: "jenkinsldap"
        managerPasswordSecret: "${LDAP_PASSWORD}"
        rootDN: "dc=company,dc=io"
        server: "ldaps://ldap.company.io:3269"
        userSearch: "sAMAccountName={0}"
      disableMailAddressResolver: false
      groupIdStrategy: "caseInsensitive"
      userIdStrategy: "caseInsensitive"
Joseph Petersen
@casz
Tim Jacomb
@timja
DevOps is a culture not a team :wink:
Joseph Petersen
@casz
@timja legacy :sob: The team is called BAT nowadays and we still try to spread DevOps :laughing:
Tim Jacomb
@timja
business acceptance testers? :wink:
batman?
Joseph Petersen
@casz
batman :laughing:
We have a whole Marvel vs DC Comics for all of our team names. And those who have adopted DevOps are called Batmen :)
The acronym for bat is Build Automate and Test :sweat_smile:
Karol Lassak
@ingwarsw
Hello guys.. din not looked at plugin development for some time.. maybe in meantime pipeline support was added?
Tim Jacomb
@timja
nope, but a webhook was added for reloading
without needing to auth
just pass a token in the url which is configured on startup
nguyenhugh
@nguyenhugh
Hello All, is it possible to have secrets lives outside of Jenkins.yaml file and a separate yaml which can have configurations for like Role Base Strategy and such?
Oleg Nenashev
@oleg-nenashev
@nguyenhugh yes to both. For secrets see https://github.com/jenkinsci/configuration-as-code-plugin#secret-sources . Regarding a separate YAML file, you can point JCasC to a directory which contains multiple YAML files. In such case all YAML files will be applied
030
@030
I would like to ask two questions: 1) How to set git-lfs using jcac? https://devops.stackexchange.com/q/9225/210 and 2) How to implement shallow clone https://devops.stackexchange.com/q/9229/210
Joseph Petersen
@casz
@030 Your seem to be using a old version of git :sweat: It should be available as traits under git.
030
@030
@casz The git-lfs command is included on the system. The issue is that GitLFSPull seems to be omitted in the Jenkins job dsl: https://jenkinsci.github.io/job-dsl-plugin/#path/job-scm-git-extensions