mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-09-20 06:46:19 +08:00
RELEASE: Move some BYOS steps to be standard (#3107)
Co-authored-by: Jeffrey Cafferata <jeffrey@jcid.nl>
This commit is contained in:
parent
12a72cb729
commit
269542c5cf
34
.github/workflows/pr_test.yml
vendored
34
.github/workflows/pr_test.yml
vendored
|
@ -128,61 +128,61 @@ jobs:
|
|||
# PROVIDER SECRET LIST
|
||||
# The above providers have additional env variables they
|
||||
# need for credentials and such.
|
||||
|
||||
#
|
||||
AZURE_DNS_CLIENT_ID: ${{ secrets.AZURE_DNS_CLIENT_ID }}
|
||||
AZURE_DNS_CLIENT_SECRET: ${{ secrets.AZURE_DNS_CLIENT_SECRET }}
|
||||
AZURE_DNS_RESOURCE_GROUP: ${{ secrets.AZURE_DNS_RESOURCE_GROUP }}
|
||||
AZURE_DNS_SUBSCRIPTION_ID: ${{ secrets.AZURE_DNS_SUBSCRIPTION_ID }}
|
||||
AZURE_DNS_TENANT_ID: ${{ secrets.AZURE_DNS_TENANT_ID }}
|
||||
|
||||
#
|
||||
BUNNY_DNS_API_KEY: ${{ secrets.BUNNY_DNS_API_KEY }}
|
||||
|
||||
#
|
||||
CLOUDFLAREAPI_ACCOUNTID: ${{ secrets.CLOUDFLAREAPI_ACCOUNTID }}
|
||||
CLOUDFLAREAPI_TOKEN: ${{ secrets.CLOUDFLAREAPI_TOKEN }}
|
||||
|
||||
#
|
||||
CLOUDNS_AUTH_ID: ${{ secrets.CLOUDNS_AUTH_ID }}
|
||||
CLOUDNS_AUTH_PASSWORD: ${{ secrets.CLOUDNS_AUTH_PASSWORD }}
|
||||
|
||||
#
|
||||
CSCGLOBAL_APIKEY: ${{ secrets.CSCGLOBAL_APIKEY }}
|
||||
CSCGLOBAL_USERTOKEN: ${{ secrets.CSCGLOBAL_USERTOKEN }}
|
||||
|
||||
#
|
||||
DIGITALOCEAN_TOKEN: ${{ secrets.DIGITALOCEAN_TOKEN }}
|
||||
|
||||
#
|
||||
GANDI_V5_APIKEY: ${{ secrets.GANDI_V5_APIKEY }}
|
||||
|
||||
#
|
||||
GCLOUD_EMAIL: ${{ secrets.GCLOUD_EMAIL }}
|
||||
GCLOUD_PRIVATEKEY: ${{ secrets.GCLOUD_PRIVATEKEY }}
|
||||
GCLOUD_PROJECT: ${{ secrets.GCLOUD_PROJECT }}
|
||||
GCLOUD_TYPE: ${{ secrets.GCLOUD_TYPE }}
|
||||
|
||||
#
|
||||
HEDNS_PASSWORD: ${{ secrets.HEDNS_PASSWORD }}
|
||||
HEDNS_TOTP_SECRET: ${{ secrets.HEDNS_TOTP_SECRET }}
|
||||
HEDNS_USERNAME: ${{ secrets.HEDNS_USERNAME }}
|
||||
|
||||
#
|
||||
HEXONET_ENTITY: ${{ secrets.HEXONET_ENTITY }}
|
||||
HEXONET_PW: ${{ secrets.HEXONET_PW }}
|
||||
HEXONET_UID: ${{ secrets.HEXONET_UID }}
|
||||
|
||||
#
|
||||
HUAWEICLOUD_REGION: ${{ secrets.HUAWEICLOUD_REGION }}
|
||||
HUAWEICLOUD_KEY_ID: ${{ secrets.HUAWEICLOUD_KEY_ID }}
|
||||
HUAWEICLOUD_KEY: ${{ secrets.HUAWEICLOUD_KEY }}
|
||||
|
||||
#
|
||||
NAMEDOTCOM_KEY: ${{ secrets.NAMEDOTCOM_KEY }}
|
||||
NAMEDOTCOM_URL: ${{ secrets.NAMEDOTCOM_URL }}
|
||||
NAMEDOTCOM_USER: ${{ secrets.NAMEDOTCOM_USER }}
|
||||
|
||||
#
|
||||
NS1_TOKEN: ${{ secrets.NS1_TOKEN }}
|
||||
|
||||
#
|
||||
POWERDNS_APIKEY: ${{ secrets.POWERDNS_APIKEY }}
|
||||
POWERDNS_APIURL: ${{ secrets.POWERDNS_APIURL }}
|
||||
POWERDNS_SERVERNAME: ${{ secrets.POWERDNS_SERVERNAME }}
|
||||
|
||||
#
|
||||
ROUTE53_KEY: ${{ secrets.ROUTE53_KEY }}
|
||||
ROUTE53_KEY_ID: ${{ secrets.ROUTE53_KEY_ID }}
|
||||
|
||||
#
|
||||
SAKURACLOUD_ACCESS_TOKEN: ${{ secrets.SAKURACLOUD_ACCESS_TOKEN }}
|
||||
SAKURACLOUD_ACCESS_TOKEN_SECRET: ${{ secrets.SAKURACLOUD_ACCESS_TOKEN_SECRET }}
|
||||
|
||||
#
|
||||
TRANSIP_ACCOUNT_NAME: ${{ secrets.TRANSIP_ACCOUNT_NAME }}
|
||||
TRANSIP_PRIVATE_KEY: ${{ secrets.TRANSIP_PRIVATE_KEY }}
|
||||
|
||||
|
|
|
@ -58,6 +58,10 @@ Create a branch as you normally would to submit a PR to the project.
|
|||
|
||||
Step 2: Update `pr_test.yml`
|
||||
|
||||
{% hint style="info" %}
|
||||
Edits to `pr_test.yml` may have already been done for you.
|
||||
{% endhint %}
|
||||
|
||||
Edit `.github/workflows/pr_test.yml`
|
||||
|
||||
1. Add the provider to the `PROVIDERS` list.
|
||||
|
@ -68,8 +72,10 @@ Edit `.github/workflows/pr_test.yml`
|
|||
The line looks something like:
|
||||
|
||||
{% code title=".github/workflows/pr_test.yml" %}
|
||||
```
|
||||
PROVIDERS: "['AZURE_DNS','BIND','CLOUDFLAREAPI','CLOUDNS','DIGITALOCEAN','GANDI_V5','GCLOUD','HEDNS','HEXONET','INWX','NAMEDOTCOM','NS1','POWERDNS','ROUTE53','TRANSIP']"
|
||||
```yaml
|
||||
env:
|
||||
PROVIDERS: "['AZURE_DNS','BIND','BUNNY_DNS','CLOUDFLAREAPI','CLOUDNS','DIGITALOCEAN','GANDI_V5','GCLOUD','HEDNS','HEXONET','HUAWEICLOUD','INWX','NAMEDOTCOM','NS1','POWERDNS','ROUTE53','SAKURACLOUD','TRANSIP']"
|
||||
ENV_CONTEXT: ${{ toJson(env) }}
|
||||
```
|
||||
{% endcode %}
|
||||
|
||||
|
|
|
@ -297,7 +297,58 @@ dependencies.
|
|||
|
||||
In the repo root, open `.goreleaser.yml` and add the provider to `Provider-specific changes` regexp.
|
||||
|
||||
## Step 14: Check your work
|
||||
## Step 14: Update `pr_test.yml`
|
||||
|
||||
This assures that in the future it will be easy to test this provider using GitHub Actions.
|
||||
|
||||
Edit `.github/workflows/pr_test.yml`
|
||||
|
||||
* Add the name of the provider to the PROVIDERS list.
|
||||
* Please keep this list sorted alphabetically.
|
||||
|
||||
The entry looks something like:
|
||||
|
||||
{% code title=".github/workflows/pr_test.yml" %}
|
||||
```yaml
|
||||
env:
|
||||
PROVIDERS: "['AZURE_DNS','BIND','BUNNY_DNS','CLOUDFLAREAPI','CLOUDNS','DIGITALOCEAN','GANDI_V5','GCLOUD','HEDNS','HEXONET','HUAWEICLOUD','INWX','NAMEDOTCOM','NS1','POWERDNS','ROUTE53','SAKURACLOUD','TRANSIP']"
|
||||
ENV_CONTEXT: ${{ toJson(env) }}
|
||||
```
|
||||
{% endcode %}
|
||||
|
||||
2. Add your providers `_DOMAIN` env variable:
|
||||
|
||||
* Add it to the `env` section of `integration-tests`.
|
||||
* Please keep this list sorted alphabetically.
|
||||
|
||||
To find this section, search for `PROVIDER SECRET LIST`.
|
||||
|
||||
For example, the entry for BIND looks like:
|
||||
|
||||
{% code title=".github/workflows/pr_test.yml" %}
|
||||
```
|
||||
BIND_DOMAIN: ${{ vars.BIND_DOMAIN }}
|
||||
```
|
||||
{% endcode %}
|
||||
|
||||
3. Add your providers other ENV variables:
|
||||
|
||||
Every provider requires different variables set to perform the integration tests. The list of such variables is in `integrationTest/providers.json`.
|
||||
|
||||
You've already added `*_DOMAIN` to `pr_test.yml`. Now we're going to add the remaining ones.
|
||||
|
||||
To find this section, search for `PROVIDER SECRET LIST`.
|
||||
|
||||
For example, the entry for CLOUDFLAREAPI looks like this:
|
||||
|
||||
{% code title=".github/workflows/pr_test.yml" %}
|
||||
```
|
||||
CLOUDFLAREAPI_ACCOUNTID: ${{ secrets.CLOUDFLAREAPI_ACCOUNTID }}
|
||||
CLOUDFLAREAPI_TOKEN: ${{ secrets.CLOUDFLAREAPI_TOKEN }}
|
||||
```
|
||||
{% endcode %}
|
||||
|
||||
## Step 15: Check your work
|
||||
|
||||
These are the things we'll be checking when you submit the PR. Please try to complete all or as many of these as possible.
|
||||
|
||||
|
@ -311,7 +362,7 @@ These are the things we'll be checking when you submit the PR. Please try to co
|
|||
* `documentation/providers.md` (the autogenerated table + the second one; make sure it is removed from the `requested` list)
|
||||
* `documentation/provider/`PROVIDERNAME`.md`
|
||||
* `integrationTest/providers.json`
|
||||
* `providers/_all/all.go`
|
||||
* `providers/_all/all.go`
|
||||
3. Review the code for style issues, remove debug statements, make sure all exported functions have a comment, and generally tighten up the code.
|
||||
4. Verify you're using the most recent version of anything you import. (See [Step 12](#step-12-dependencies))
|
||||
5. Re-run the [integration test](#step-7-integration-test) one last time.
|
||||
|
@ -322,12 +373,13 @@ These are the things we'll be checking when you submit the PR. Please try to co
|
|||
|
||||
At this point you can submit a PR.
|
||||
|
||||
Actually you can submit the PR even earlier if you just want feedback,
|
||||
input, or have questions. This is just a good stopping place to
|
||||
submit a PR if you haven't already.
|
||||
The PR should include the sentence: "Please create the GitHub label 'provider-PROVIDERNAME'" (change `PROVIDERNAME` to the name of your provider.) This is
|
||||
|
||||
Actually you can submit the PR earlier if you just want feedback,
|
||||
or have questions. However if you haven't submitted a PR by now, this is the time to do it.
|
||||
|
||||
|
||||
## Step 16: After the PR is merged
|
||||
|
||||
1. Close any related GitHub issues.
|
||||
2. [Create an issue (feature request)](https://github.com/StackExchange/dnscontrol/issues/new?title=Add%20label%20for%20PROVIDERNAME) with the text "Please create the GitHub label 'provider-PROVIDERNAME'".
|
||||
3. Would you like your provider to be tested automatically as part of every PR? Sure you would! Follow the instructions in [Bring-Your-Own-Secrets for automated testing](byo-secrets.md)
|
||||
|
|
Loading…
Reference in a new issue