Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 05:37
    timja commented #1056
  • 02:44

    casz on developer-guide-javadoc

    (compare)

  • 02:41
    casz synchronize #1070
  • Sep 18 22:08
    stale[bot] closed #924
  • Sep 18 18:38
    casz commented #1070
  • Sep 18 18:38
    casz commented #1070
  • Sep 18 18:36
    casz synchronize #1070
  • Sep 18 18:35
    casz opened #1070
  • Sep 18 16:22
    sladyn98 commented #1056
  • Sep 18 16:18
    sladyn98 synchronize #1060
  • Sep 18 15:58
    timja reopened #1069
  • Sep 18 15:58
    timja closed #1069
  • Sep 18 15:57
  • Sep 18 15:56
    Rahaman148 commented #1067
  • Sep 18 15:21
    sladyn98 commented #1069
  • Sep 18 15:13
    sladyn98 synchronize #1060
  • Sep 18 14:45
    sladyn98 commented #1069
  • Sep 17 22:09
    v1v synchronize #1055
  • Sep 17 22:08
    v1v synchronize #1055
Eric Peters
@er1c
            `throttle(class: 'jenkins.branch.RateLimitBranchProperty$Throttle') { count: .., ... ,.. } `or something like that maybe
the error message is usually helpful for tweaking things that work or don't work, luckily
Markus Amshove
@MarkusAmshove
I'll try it out, thanks!
forhire
@forhire
@nbutkowski Yes, that is the section I'm looking at. It seems like if I use the stable/jenkins Helm chart, it fails to process the JCasC settings, since it doesn't even output item #4 in the NOTES.TXT. If I git clone from github and helm install jenkins --upgrade -f values.txt . then it outputs item #4 in the notes, indicating that it processed the JCasC enabled: true . It seems like there's a difference between the git stable/jenkins repo master branch and the Helm stable/jenkins repo that is resulting in the issue I'm seeing.
Ullrich Hafner
@uhafner
I successfully set up a large part of my Jenkins environment with JCasC (and our Jenkins docker image). However, since JCasC is work in progress and does only support a subset of the Jenkins features I wonder how is JCasC expected to work once the instance has been configured? Do I remove the plugin so my new manually added elements are not removed on the next startup? Or is there an option like -DdisableJCasC when starting Jenkins? I don't find this use case described somewhere in the docs...
nbutkowski
@nbutkowski
Are you using a rocker volume?
Docker* for Jenkins_home
My team is following a similar pattern. Each time you start a new container casc will load the things you have configured. If you have some persistence for Jenkins home, then old config loaded or thing set manually should still be around.
nbutkowski
@nbutkowski
Also, I think some docs mention the default location for casc.yaml in Jenkins_home. If you use docker volumes for persistence, you’ll want to change location of the casc.yaml since the mount after building the image.
@uhafner
forhire
@forhire
I found the issue with JCasC, Helm chart version 0.28.11 was being deployed. After a helm repo update, 0.34.0 is deploying. Now, it's not connecting the Nginx ingress controller to Jenkins like it was before, but at least JCasC is working.
Ullrich Hafner
@uhafner
@nbutkowski yes, JENKINS_HOME is a volume. But each time I restart Jenkins JCasC the contents of JENKINS_HOME get replaced with the values from JCasC. This is something I want to avoid. (Ideally, JCasC would only alter things that are configured in jenkins.yaml and let the rested be intact. Currently it deletes the rest.)
Ewelina Wilkosz
@ewelinawilkosz
@uhafner this is weird, JCasC should not remove anything that is not configured with yaml - maybe some bug in on of the latest versions :confused: can you please share JCasC version and example of what disappears on the next startup?
Ullrich Hafner
@uhafner
If I add a new view then restart Jenkins, then the new view is gone. Or is this because there is a view node in the yaml?
  views:
  - all:
      name: "all"
Views are not supported by JCasC yet.
Tim Jacomb
@timja
views work just fine
Ullrich Hafner
@uhafner
@timja See #671 and #222
I can’t add jobs, I can’t add dashboard portlets, the views are just empty with JCasC
Tim Jacomb
@timja
those issues don't say it doesn't work
  1. says restarting it causes non managed views to have issues
  2. says exporting isn't correct for some cases
Ullrich Hafner
@uhafner
So how do I configure a dashboard view with a given set of jobs and portlets, is there an example around?
Tim Jacomb
@timja
there doesn't seem to be a demo unfortunately :(
what we have setup is what is exported
Ullrich Hafner
@uhafner
Hmm, my export is almost empty, it just contains:
  views:
  - dashboard:
      name: "Dashboard"
  - all:
      name: "all"
@ewelinawilkosz I can confirm that the views are not deleted anymore if I remove the whole view node.
Ewelina Wilkosz
@ewelinawilkosz
ok, that makes more sense I guess - if you configure element you should configure it completely with JCasC or completely manually
Graeme Wilson
@techlunacy
@ewelinawilkosz my view looks like
views:
  - all:
      name: "all"
  - list:
      includeRegex: ".*-build"
      name: "builds"
      recurse: true
  - list:
      includeRegex: "[\\d\\w]+/[\\d\\w]+-build"
      name: "project-build"
      recurse: true
  - buildMonitor:
      name: "my-jenkins"
      recurse: true
      title: "my-jenkins"
Ullrich Hafner
@uhafner
I see, so it is possible to select the builds by regexp and just the export does not work yet.
David Spez
@spezd
From what I've found - Dashboard views are missing portlets and "description" attributes.
Ullrich Hafner
@uhafner
Is this a bug in JCasC or in the Dashboard view? (BTW: it is cumbersome for users that issues of JCasC are in Jira and GitHub)
David Spez
@spezd
No idea. I configure the dashboard description property in YAML, JCasC ignores the setting and doesn't configure. As for dashboard portlets, I can't see where to configure them via the documentation or the schema - examples would be great.
Ewelina Wilkosz
@ewelinawilkosz
@uhafner yes it is a little bit messy, we couldn’t agree on one - we have both jira and github supporters, I can see it is not perfect. Most of the issues are on github though, jira mainly for security issues and compatibility (those end up on actual plugins, not jcasc).
Sad thing is that we don’t have enough manpower to fix them anyway, so it is taking ages to get answer - I am not complaining, a lot of people is doing AWESOME job, but I feel responsible for not reacting fast. I simply can’t…
Ewelina Wilkosz
@ewelinawilkosz
@techlunacy maybe I have lost a piece of conversation but I need to ask - the views configuration you shared, is it something that works well for you? or is there something wrong?
Ewelina Wilkosz
@ewelinawilkosz
@/all I’d like to check who’s planning to join the office hours meeting tomorrow - just to make sure it makes sense to organize it (I am on a tight schedule but if at least one person is planning to join we’re running it!)
Oliver Gondža
@olivergondza
@ewelinawilkosz, cant make it, sorry.
nbutkowski
@nbutkowski
@ewelinawilkosz I am going to try to wakeup to listen in.
but I have nothing to contribute yet :)
Ewelina Wilkosz
@ewelinawilkosz
let’s see tomorrow how it looks :)
Ullrich Hafner
@uhafner
@ewelinawilkosz I created an issue in Jira for the dashboard view plugin. It makes sense that a plugin is responsible to be compatible with JCasC.
Ewelina Wilkosz
@ewelinawilkosz
thanks!
Enrique Valenzuela
@enriquemanuel

hi folks! thanks for sharing an amazing plugin! i have a few questions and was wondering if someone can provide some light, I was working out of the pre RC and now the 1.0 and the credentials section doesn't work and its failing out, did that root element changed?
I had this root element

  system:
    domainCredentials:
      - credentials:
        - usernamePassword:
            scope: GLOBAL
            id: "va-bot"
            username: "va-bot"
            password: "<va-bot-password>"
            description: "va-bot username/password"
        - string:
            scope: GLOBAL
            id: "SLACK_TOKEN"
            secret: "<slack_token>"
            description: "Slack token"
        - string:
            scope: GLOBAL
            id: "DEPLOY_SLACK_TOKEN"
            secret: "<deploy_slack_token>"
            description: "Deploy Slack token"
        - string:
            scope: GLOBAL
            id: "ALERT_SLACK_TOKEN"
            secret: "<alert_slack_token>"
            description: "Alert Slack Token"

but that doesn't seem to work anymore, the error is this

SEVERE: Failed ConfigurationAsCode.init
java.lang.Error: java.lang.reflect.InvocationTargetException
    at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:110)
    at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175)
    at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
    at jenkins.model.Jenkins$5.runTask(Jenkins.java:1096)
    at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)
    ... 8 more
Caused by: io.jenkins.plugins.casc.ConfiguratorException: No configurator for root element <credentials>
    at io.jenkins.plugins.casc.ConfigurationAsCode.invokeWith(ConfigurationAsCode.java:634)
    at io.jenkins.plugins.casc.ConfigurationAsCode.checkWith(ConfigurationAsCode.java:657)
    at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:642)
    at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:545)
    at io.jenkins.plugins.casc.ConfigurationAsCode.configure(ConfigurationAsCode.java:275)
    at io.jenkins.plugins.casc.ConfigurationAsCode.init(ConfigurationAsCode.java:267)
    ... 13 more
but looking at the demos, it still shown as as root element, maybe that needs to be updated? and maybe there is a new plugin?
Joseph Petersen
@casz
@enriquemanuel don't target 1.0 it is flawed :smile: Please target the latest and yes from pre RC to 1.0 the credentials block was reworked
Enrique Valenzuela
@enriquemanuel
@casz thanks for the quick reply! do you know where i can find the latest documentation on the credentials block?
re version: i will target latest from my installation then! thanks!
Joseph Petersen
@casz
Enrique Valenzuela
@enriquemanuel
perfect! i think the missing part for me was installing the plugin then.. thanks for the guidance!
and again, for the amazing work!
Joseph Petersen
@casz
A full example from our yaml file, we are using vault for secrets :)
credentials:
  system:
    domainCredentials:
      # global credentials
      - credentials:
          - usernamePassword:
              scope: GLOBAL
              id: artifactory
              username: "${ARTIFACTORY_USERNAME}"
              password: "${ARTIFACTORY_PASSWORD}"
          - usernamePassword:
              scope: GLOBAL
              id: vsphere
              username: "${VSPHERE_USERNAME}"
              password: "${VSPHERE_PASSWORD}"
          - usernamePassword:
              scope: GLOBAL
              id: jenkins_devops
              username: "${JENKINS_DEVOPS_USERNAME}"
              password: "${JENKINS_DEVOPS_APITOKEN}"
              description: Automated administrative tasks in Jenkins
          - basicSSHUserPrivateKey:
              scope: GLOBAL
              id: gitlab_ssh_key
              username: git
              description: SSH key for GitLab
              privateKeySource:
                directEntry:
                  privateKey: "${SSH_PRIVATE_KEY}"
          - GitLabApiTokenImpl:
              scope: GLOBAL
              id: gitlab_token
              apiToken: "${GITLAB_TOKEN}"
              description: Gitlab Token
          - string:
              scope: GLOBAL
              id: slack-token
              secret: "${SLACK_TOKEN}"
              description: Slack token
          - usernamePassword:
              scope: GLOBAL
              id: "gitlabrunner"
              description: "gitlab runner"
              username: "gitlab-runner"
              password: "${GITLABRUNNER_PASSWORD}"
          - vaultAppRoleCredential:
              scope: GLOBAL
              id: "jenkins-build-approle-secret"
              description: "jenkins-build-approle-secret"
              roleId: "<snip>"
              secretId: "${BUILD_APPROLE_SECRET_ID}"
Enrique Valenzuela
@enriquemanuel
@casz perfect, it does make sense! thanks
another question, is the installation of the plugins available in the JCaC or we need to install it using the bash script? i was reading some PR's in regard of that, but wasnt clear if I need to only install JCaC and then the rest can be installed via the yaml file?