Skip to content

Instantly share code, notes, and snippets.

@phil-lgr
Created June 11, 2019 19:36
Show Gist options
  • Save phil-lgr/eba275d0d56e9df73f6ac07be1c53022 to your computer and use it in GitHub Desktop.
Save phil-lgr/eba275d0d56e9df73f6ac07be1c53022 to your computer and use it in GitHub Desktop.
Renovate on Bitbucket

Setup Renovate

Blog post

Consult the renovate docs

Create an AppPassword on Bitbucket

Create a file named renovate-bot.secret.yaml with:

#
# Define namespace for renovate
#
apiVersion: v1
kind: Namespace
metadata:
    name: renovate
---
#
# Create secrets for renovate bot
#
apiVersion: v1
kind: Secret
metadata:
    namespace: renovate
    name: renovate-env
type: Opaque
stringData:
    renovate-platform: 'bitbucket'
    renovate-endpoint: 'https://api.bitbucket.org/2.0/'
    renovate-username: '<bot-username>'
    renovate-password: '<app-password>'
    renovate-autodiscover: 'false'

then apply it:

kubectl apply -f config/kubernetes-aws/renovate-bot.secret.yaml
kubectl get secrets --namespace renovate

Create the cron job with:

kubectl apply -f config/kubernetes-aws/renovate-bot.yaml

Make sure the cronjob is showing up:

kubectl get cronjob --namespace renovate

To run the cronjob manually:

kubectl create job --from=cronjob/renovate renovate-test-run --namespace renovate

Troubleshooting

kubectl get pods --namespace renovate
kubectl logs <pod-name> --namespace renovate
kubectl describe pods <pod-name> --namespace renovate

Cleanup

kubectl delete job renovate-test-run --namespace renovate
kubectl delete -f config/kubernetes-aws/renovate-bot.yaml
kubectl delete -f config/kubernetes-aws/renovate-bot.secret.yaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment