jenkinsci / configuration-as-code-plugin

Jenkins Configuration as Code Plugin
https://plugins.jenkins.io/configuration-as-code
MIT License
2.69k stars 720 forks source link

Compatiblity issue with docker-swarm-plugin #1393

Closed antonlindahlcevt closed 4 years ago

antonlindahlcevt commented 4 years ago

Your checklist for this issue

🚨 Please review the guidelines for contributing to this repository. 💡 To better understand plugin compatibility issues, you can read more here

Description

Hello!

We are using the docker-swarm-plugin (https://github.com/jenkinsci/docker-swarm-plugin) which seems to have some issue when reloading through jcasc. I cannot see any issue in the config.xml or in the gui but after an arbitary change in the gui our configuration works again. We are running jenkins in docker (jenkinsci/blueocean:latest) and have the Jenkins ver. 2.204.5 and configuration as code 1.36.

JENKINS-62334

jetersen commented 4 years ago

Properly best to open an issue over at https://github.com/jenkinsci/docker-swarm-plugin/issues

antonlindahlcevt commented 4 years ago

Done, Thanks! Though you might have good insight in where to look for changes but i guess docker-swarm-plugin knows what more they change in there plugin. Please close if it should be handled in docker-plugin issue tracking instead.

jetersen commented 4 years ago

Did you define a DockerServerEndpoint ? Seems to be the one gives the you a null pointer.

An JCasC yaml sample would be helpful.

antonlindahlcevt commented 4 years ago

Not sure which part is the endpoint.. This is our JCasc yaml which seems to give me the correct things in the gui but i guess its something else that is missing.

clouds:
  - dockerSwarm:
      agentTemplates:
      - baseWorkspaceLocation: "/home/runner"
        command: |-
          sh
          -cx
          wget -T 60 $DOCKER_SWARM_PLUGIN_JENKINS_AGENT_JAR_URL && java -jar agent.jar -jnlpUrl $DOCKER_SWARM_PLUGIN_JENKINS_AGENT_JNLP_URL -secret $DOCKER_SWARM_PLUGIN_JENKINS_AGENT_SECRET -noReconnect -workDir /home/tyrfing
        image: "our-server-computer:5000/latest-image:latest"
        label: "docker-image"
        limitsMemoryBytes: 0
        limitsNanoCPUs: 0
        osWindows: false
        placementConstraints: "node.role!=manager"
        pullCredentialsId: "3a7e52ef-ee88-46f3-a6d7-0bf9155ab697"
        reservationsMemoryBytes: 0
        reservationsNanoCPUs: 0
        serverAddress: "docker.swarm.se:5000"
        user: "root"
        workingDir: "/home/tyrfing"
      dockerHost:
        credentialsId: "DockerSwarm"
        uri: "https://docker.swarm.se:2376"
      dockerSwarmApiUrl: "https://docker.swarm.se:2376"
      jenkinsUrl: "http://our.jenkins.se:8080"
jetersen commented 4 years ago

dockerHost seems to be the endpoint. So definitely a bug in the docker swarm plugin.

antonlindahlcevt commented 4 years ago

Ok i will check there, thanks alot!

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.