Renovate: Release Notes for bitbucket-server

Created on 22 Mar 2019  路  17Comments  路  Source: renovatebot/renovate

What would you like Renovate to be able to do?
Release notes are not rendered in the pull request description for bitbucket-server

Describe the solution you'd like
Release notes to be rendered

Describe alternatives you've considered
N/A

Additional context
I upgraded the same package, one in github (first image) and the other in bitbucket-server (second image) and release notes is missing from bitbucket-server
github
bitbucket-server

priority-4-low docs

Most helpful comment

I think maybe the self-hosting page could be moved to the website section. Then the repo-only docs would just be related to contributing/developing

All 17 comments

Have you configured GITHUB_COM_TOKEN? If not, then you will hit GitHub's rate limits very fast and then not be able to retrieve release notes. Check your debug logs too.

I will give that a try when back at my computer.

I will keep this open to track documentation of this flag.

Documentation can be found at the self hosting.md but not renovatebot.com

Right now self-hosting documentation is kept within this repo, while usage documentation is published to renovatebot.com.

Maybe the fix here is then to add a paragraph in https://renovatebot.com/docs/self-hosted-configuration/ to note that there is more details for self hosting at the following locations

I think maybe the self-hosting page could be moved to the website section. Then the repo-only docs would just be related to contributing/developing

I downgraded typescript from 3.3.4000 -> 3.3.3333 and I've updated my config:

module.exports = {
  gitAuthor: "...",
  autodiscover: false,
  endpoint: "https://stash.company.com",
  gitFs: "https",
  logLevel: "debug",
  onboardingConfig: {
    "automerge": true,
    "rangeStrategy": "auto"
  },
  password: "...",
  platform: "bitbucket-server",
  repositories: ["...", "..."],
  token: "...",
  username: "..."
};

Ran [email protected] cli and found this when retrieving the changelog:

DEBUG: DID NOT Found PR from branch #renovate/typescript-3.x (repository=..., dependencies=typescript, branch=renovate/typescript-3.x)
DEBUG: getChangeLogJSON(args) (repository=..., dependencies=typescript, branch=renovate/typescript-3.x)
       "args": {
         "manager": "npm",
         "versionScheme": "npm",
         "depType": "devDependencies",
         "depName": "typescript",
         "fromVersion": "3.3.3333",
         "toVersion": "3.3.4000",
         "sourceUrl": "https://github.com/Microsoft/TypeScript"
       }
DEBUG: Repository URL does not match any known hosts (repository=..., dependencies=typescript, branch=renovate/typescript-3.x)
DEBUG: getBranchStatus(renovate/typescript-3.x, requiredStatusChecks=true) (repository=..., dependencies=typescript, branch=renovate/typescript-3.x)

Found an alternate solution because setting the env variables didn't work for me. By adding the following to my renovate config I was able to connect up to github without setting any environment variables!

  hostRules: [
    {
      hostType: "github",
      domainName: "github.com",
      token: "<removed>",
      baseUrl: "https://api.github.com/",
      endpoint: "https://api.github.com/",
      url: "https://api.github.com/"
    }
  ],

@k2snowman69 thanks for the feedback. Can you test and confirm that it works with just with the first 3 items in that host rule? i.e.

  hostRules: [
    {
      hostType: "github",
      domainName: "github.com",
      token: "<removed>"
    }
  ],

I would also like to debug why GITHUB_COM_TOKEN doesn't work for you.

Nope

"message": "Failed to configure hostType 'github': no endpoint defined",

I added baseUrl and url just to be safe but looks like as long as endpoint is defined along with the three you mentioned it runs fine.

As far as why GITHUB_COM_TOKEN doesn't work for me, it's more about how our vault + kubernetes system is setup for my group. We're using an init container to read the values out of vault which we then use to generate the config file instead of connecting vault to kube. Here is what my yml file looks like:

# Documentation for renovate - https://github.com/renovatebot/renovate/blob/master/docs/self-hosting.md
apiVersion: v1
kind: ConfigMap
metadata:
  name: renovate-config-template
  namespace: renovate
data:
  config.js.j2: |
    module.exports = {
      autodiscover: false,
      endpoint: "https://stash.company.com",
      hostRules: [
        {
          hostType: "github",
          domainName: "github.com",
          token: "{{ secrets['GITHUB_TOKEN'] }}",
          baseUrl: "https://api.github.com/",
          endpoint: "https://api.github.com/",
          url: "https://api.github.com/"
        }
      ],
      gitFs: "https",
      onboardingConfig: {
        automerge: true,
        rangeStrategy: "auto"
      },
      npmrc: "registry=https://npm.company.com/",
      password: "{{ secrets['STASH_TOKEN'] }}",
      platform: "bitbucket-server",
      repositories: [
        "repo/repo"
      ],
      token: "{{ secrets['GITHUB_TOKEN'] }}",
      username: "{{ secrets['STASH_USERNAME'] }}"
    }

---
apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: renovate
  namespace: renovate
spec:
  schedule: "@hourly"
  concurrencyPolicy: Forbid
  jobTemplate:
    spec:
      template:
        spec:
          containers:
            - name: renovate
              image: "renovate/renovate"
              volumeMounts:
                - name: renovate-config-dir
                  mountPath: /usr/src/app/config.js
                  subPath: config.js
          restartPolicy: Never
          initContainers:
            - name: atm-vault
              image: vault.company.com:2013/utilities/vault:latest
              args:
                - "--vault_url"
                - "https://prod.company.com:8200"
                - "--vault_namespace"
                - "secret/applications/renovate"
                - "--vault_auth_type"
                - "kube-auth"
                - "--vault_role"
                - "renovate-prod"
                - "--vault_kube_cluster"
                - "prod"
                - "--input_template"
                - "/tmp/config.js.j2"
                - "--output_file"
                - "/var/renovate/config.js"
              volumeMounts:
                - name: renovate-config-dir
                  mountPath: /var/renovate
                - name: renovate-config-template
                  mountPath: /tmp/config.js.j2
                  subPath: config.js.j2
          volumes:
            - name: renovate-config-dir
              emptyDir: {}
            - name: renovate-config-template
              configMap:
                name: renovate-config-template

Which version of Renovate are you using?

Thanks for the info re: GITHUB_COM_TOKEN. It's totally fine if you configure hostRules instead, because the env variable is just a shortcut for configuring a host rule anyway. But I'm curious about why you need endpoint unless you're running an older Renovate version.

This was using the latest available from the docker builds renovate/renovate:latest

Is it possible that you have that image cached and are not actually using the latest? That string 'no endpoint defined' was removed from the source code two weeks ago: https://github.com/renovatebot/renovate/commit/5f11c5e8d93ebf725042121c9a7a72bd12125652#diff-8fa6026ac27f8c07d1ee81f2a840793cL38

Very likely... sadly I don't have control over the Kube cluster so I can't flush the cache. Hopefully it updates on it's own at some point in the future. Good to know they are deprecated though, I'll document that and try and remove it.

I suggest you use a version tag instead of latest, too

Moved to using renovate/renovate:18 per your suggestion and noticed the latest pull on the server did result in the changes you suggested. Thanks!

Was this page helpful?
0 / 5 - 0 ratings