Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-44032

embeddable build status should bust cache

    Details

    • Similar Issues:

      Description

      Per https://github.com/github/markup/issues/224 seems like there is an issue around cache control for READMEs in github repos.

        Attachments

          Activity

          Hide
          thomas_dee Thomas Döring added a comment -

          Kevin Carrasco Thank you for your feedback. I think I can mark this issue as closed then.

          Show
          thomas_dee Thomas Döring added a comment - Kevin Carrasco Thank you for your feedback. I think I can mark this issue as closed then.
          Hide
          el_psycho Kevin Carrasco added a comment -

          Thomas Döring I'm using 2.0 and this is not an issue for me anymore. It actually wasnt the plugin's fault but a misconfiguration of the nginx proxy ssl certs.

          I put an nginx proxy infront of Jenkins to handle the ssl stuff. When adding the cert you must concatenate the server certificate and the CA certificate together. For example:

          cat servercert.crt ca_cert.crt > nginxcert.crt
          

          If you dont do this and only use servercert.crt, everything will look fine if you use a browser to go to Jenkins but when you use a tool like curl, the cert will not be trusted. I've seen other system tools behave this way and have also seen this when using SSL libraries for some programming/scripting languages which is probably why GitHub's markdown renderer didnt want to load the badge. After configuring this properly, the badge loaded with no problems.

           

          Thanks.

          Show
          el_psycho Kevin Carrasco added a comment - Thomas Döring I'm using 2.0 and this is not an issue for me anymore. It actually wasnt the plugin's fault but a misconfiguration of the nginx proxy ssl certs. I put an nginx proxy infront of Jenkins to handle the ssl stuff. When adding the cert you must concatenate the server certificate and the CA certificate together. For example: cat servercert.crt ca_cert.crt > nginxcert.crt If you dont do this and only use servercert.crt, everything will look fine if you use a browser to go to Jenkins but when you use a tool like curl, the cert will not be trusted. I've seen other system tools behave this way and have also seen this when using SSL libraries for some programming/scripting languages which is probably why GitHub's markdown renderer didnt want to load the badge. After configuring this properly, the badge loaded with no problems.   Thanks.
          Hide
          thomas_dee Thomas Döring added a comment -

          Is this still an issue with v2.0?

          Show
          thomas_dee Thomas Döring added a comment - Is this still an issue with v2.0?
          Hide
          el_psycho Kevin Carrasco added a comment -

          I'm having this issue as well. Maybe the Cache-Control header needs to be tweaked a bit more?

          Here are the headers from my build status badge which does not render on GitHub:

          $ curl -L -I https://jenkins.bardel.ca/buildStatus/icon?job=backend/master
          HTTP/1.1 200 OK
          Server: nginx/1.13.12
          Date: Fri, 17 Aug 2018 21:15:31 GMT
          Content-Type: image/svg+xml;charset=utf-8
          Content-Length: 802
          Connection: keep-alive
          X-Content-Type-Options: nosniff
          ETag: "/static/0e86a960/build-passing-brightgreen-flat.svg"
          Expires: Fri, 01 Jan 1984 00:00:00 GMT
          Cache-Control: no-cache, private
          X-SSH-Endpoint: jenkins.bardel.ca:50022
          

           
          and here are the headers of a different badge that does render correctly on GitHub:

          $ curl -L -I https://ruby-gem-downloads-badge.herokuapp.com/rails
          HTTP/1.1 200 OK
          Server: Cowboy
          Connection: keep-alive
          Date: Fri, 17 Aug 2018 21:08:23 GMT
          Content-Type: image/svg+xml;Content-Encoding: gzip; charset=utf-8
          Pragma: no-cache
          Etag: "0415ad7e8ce0c3161a010b8f55ff01cb"
          Last-Modified: Fri, 17 Aug 2018 21:07:23 GMT
          Cache-Control: private, no-cache, no-store, must-revalidate, max-age=-86400
          Expires: Thu, 16 Aug 2018 21:08:23 GMT
          Via: 1.1 vegur
          

           

          Show
          el_psycho Kevin Carrasco added a comment - I'm having this issue as well. Maybe the Cache-Control header needs to be tweaked a bit more? Here are the headers from my build status badge which does not render on GitHub: $ curl -L -I https: //jenkins.bardel.ca/buildStatus/icon?job=backend/master HTTP/1.1 200 OK Server: nginx/1.13.12 Date: Fri, 17 Aug 2018 21:15:31 GMT Content-Type: image/svg+xml;charset=utf-8 Content-Length: 802 Connection: keep-alive X-Content-Type-Options: nosniff ETag: "/ static /0e86a960/build-passing-brightgreen-flat.svg" Expires: Fri, 01 Jan 1984 00:00:00 GMT Cache-Control: no-cache, private X-SSH-Endpoint: jenkins.bardel.ca:50022   and here are the headers of a different badge that does render correctly on GitHub: $ curl -L -I https: //ruby-gem-downloads-badge.herokuapp.com/rails HTTP/1.1 200 OK Server: Cowboy Connection: keep-alive Date: Fri, 17 Aug 2018 21:08:23 GMT Content-Type: image/svg+xml;Content-Encoding: gzip; charset=utf-8 Pragma: no-cache Etag: "0415ad7e8ce0c3161a010b8f55ff01cb" Last-Modified: Fri, 17 Aug 2018 21:07:23 GMT Cache-Control: private , no-cache, no-store, must-revalidate, max-age=-86400 Expires: Thu, 16 Aug 2018 21:08:23 GMT Via: 1.1 vegur  

            People

            • Assignee:
              thomas_dee Thomas Döring
              Reporter:
              ahammond Andrew Hammond
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: