Support GitHub Webhook to trigger pipeline build through the API server
Github webhook development docs
Github webhook integration best practices
Want to contribute? Read our contributing guidelines
Install and run ngrok to expose localhost by ngrok http 3001
. The Webhook in GitHub should point to the ngrok address.
Radix GitHub Webhook follows the standard procedure defined in how we work.
Radix GitHub Webhook is installed as a Radix application in script when setting up a cluster. It will setup app environment with aliases, and a Webhook so that changes to this repository will be reflected in Radix platform.
- Execute
make docker-build
- Execute
docker images
to see the imagetag of the last build - Execute
az acr login --name radixdev
- Execute
docker push radixdev.azurecr.io/radix-github-webhook:<imagetag>
to push the image created in step 1 - Execute
kubectl edit deploy webhook -n radix-github-webhook-qa
- Edit the image name from
radix-github-webhook-webhook
toradix-github-webhook
and tag fromlatest
to<imagetag>
- Save and close
- Wait for pods to start
Bearer token can be provided in two ways
- In a file
/var/run/secrets/kubernetes.io/serviceaccount/token
- Environment variable
BEARER_TOKEN
(create new token withkubectl create token --namespace radix-github-webhook-qa radix-github-webhook
)
if file does not exist - environment variable has being used
When debug locally together with other apps and services - local radix-api
can be used
USE_LOCAL_RADIX_API
false
,no
or not set - connecting to in-clusterradix-api
true
oryes
- connecting toradix-api
, running onhttp://localhost:3002
--port
/-p
: Port to listen for, defaults to 3001.
USE_LOCAL_RADIX_API
: Defaults tono
, ex:no
oryes
API_SERVER_ENDPOINT_PREFIX
: No defaults, ex:https://server-radix-api-qa
RADIX_CLUSTERNAME
: No defaults, ex:dev
RADIX_DNS_ZONE
: No defaults, ex:radix.equinor.com
This is how we handle security issues