mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-09-20 06:46:19 +08:00
CICD: Rename the master branch to main (#2774)
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
This commit is contained in:
parent
858c902101
commit
355c0fe6a1
|
@ -114,7 +114,7 @@ indent_size = 2
|
||||||
indent_style = space
|
indent_style = space
|
||||||
|
|
||||||
# Svelte
|
# Svelte
|
||||||
# https://github.com/sveltejs/svelte/blob/master/.editorconfig
|
# https://github.com/sveltejs/svelte/blob/main/.editorconfig
|
||||||
[*.svelte]
|
[*.svelte]
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
indent_style = tab
|
indent_style = tab
|
||||||
|
|
4
.github/workflows/codeql.yml
vendored
4
.github/workflows/codeql.yml
vendored
|
@ -13,10 +13,10 @@ name: "CodeQL"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "master" ]
|
branches: [ "main" ]
|
||||||
pull_request:
|
pull_request:
|
||||||
# The branches below must be a subset of the branches above
|
# The branches below must be a subset of the branches above
|
||||||
branches: [ "master" ]
|
branches: [ "main" ]
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '32 19 * * 0'
|
- cron: '32 19 * * 0'
|
||||||
|
|
||||||
|
|
4
.github/workflows/pr_test.yml
vendored
4
.github/workflows/pr_test.yml
vendored
|
@ -1,7 +1,7 @@
|
||||||
name: "PR: Run all tests"
|
name: "PR: Run all tests"
|
||||||
on:
|
on:
|
||||||
# git push origin master:tlim_testpr --force
|
# git push origin main:tlim_testpr --force
|
||||||
# will trigger a full PR test on the master branch:
|
# will trigger a full PR test on the main branch:
|
||||||
# https://github.com/StackExchange/dnscontrol/actions/workflows/pr_test.yml?query=branch%3Atlim_testpr
|
# https://github.com/StackExchange/dnscontrol/actions/workflows/pr_test.yml?query=branch%3Atlim_testpr
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
|
|
|
@ -205,7 +205,7 @@ This example requires the [1Password command-line tool](https://developer.1passw
|
||||||
but works with any shell command that returns a properly formatted `creds.json`.
|
but works with any shell command that returns a properly formatted `creds.json`.
|
||||||
In this case, the 1Password CLI is used to inject the secrets from
|
In this case, the 1Password CLI is used to inject the secrets from
|
||||||
a 1Password vault, rather than storing them in environment variables.
|
a 1Password vault, rather than storing them in environment variables.
|
||||||
An example of a template file containing Linode and Cloudflare API credentials is available here: [creds.json](https://github.com/StackExchange/dnscontrol/blob/master/documentation/assets/1password/creds.json).
|
An example of a template file containing Linode and Cloudflare API credentials is available here: [creds.json](https://github.com/StackExchange/dnscontrol/blob/main/documentation/assets/1password/creds.json).
|
||||||
|
|
||||||
{% code title="creds.json" %}
|
{% code title="creds.json" %}
|
||||||
```json
|
```json
|
||||||
|
|
|
@ -89,7 +89,7 @@ use BIND for DNS service, it is useful for testing.
|
||||||
domains, and so on.
|
domains, and so on.
|
||||||
|
|
||||||
Start your `dnsconfig.js` file by downloading
|
Start your `dnsconfig.js` file by downloading
|
||||||
[dnsconfig.js](https://github.com/StackExchange/dnscontrol/blob/master/documentation/assets/getting-started/dnsconfig.js)
|
[dnsconfig.js](https://github.com/StackExchange/dnscontrol/blob/main/documentation/assets/getting-started/dnsconfig.js)
|
||||||
and renaming it.
|
and renaming it.
|
||||||
|
|
||||||
The file looks like:
|
The file looks like:
|
||||||
|
@ -155,7 +155,7 @@ It is only needed if any providers require credentials (API keys,
|
||||||
usernames, passwords, etc.).
|
usernames, passwords, etc.).
|
||||||
|
|
||||||
Start your `creds.json` file by downloading
|
Start your `creds.json` file by downloading
|
||||||
[creds.json](https://github.com/StackExchange/dnscontrol/blob/master/documentation/assets/getting-started/creds.json)
|
[creds.json](https://github.com/StackExchange/dnscontrol/blob/main/documentation/assets/getting-started/creds.json)
|
||||||
and renaming it.
|
and renaming it.
|
||||||
|
|
||||||
The file looks like:
|
The file looks like:
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
DNSControl has build in support for notifications when changes are made. This allows you to post messages in team chat, or send emails when dns changes are made.
|
DNSControl has build in support for notifications when changes are made. This allows you to post messages in team chat, or send emails when dns changes are made.
|
||||||
|
|
||||||
Notifications are written in the [notifications package](https://github.com/StackExchange/dnscontrol/tree/master/pkg/notifications), and is a really simple interface to implement if you want to add
|
Notifications are written in the [notifications package](https://github.com/StackExchange/dnscontrol/tree/main/pkg/notifications), and is a really simple interface to implement if you want to add
|
||||||
new types or destinations.
|
new types or destinations.
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
|
@ -11,7 +11,7 @@ Please change the version number as appropriate. Substitute (for example)
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
export VERSION=v4.2.0
|
export VERSION=v4.2.0
|
||||||
git checkout master
|
git checkout main
|
||||||
git pull
|
git pull
|
||||||
go fmt ./...
|
go fmt ./...
|
||||||
go generate ./...
|
go generate ./...
|
||||||
|
@ -19,7 +19,7 @@ go mod tidy
|
||||||
git commit -a -m "Update generated files for $VERSION"
|
git commit -a -m "Update generated files for $VERSION"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Step 2. Tag the commit in master that you want to release
|
## Step 2. Tag the commit in main that you want to release
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
export VERSION=v4.2.0
|
export VERSION=v4.2.0
|
||||||
|
@ -152,7 +152,7 @@ Overview: You will fork the repo and add any secrets to your fork. For security
|
||||||
|
|
||||||
1. [Fork StackExchange/dnscontrol](https://github.com/StackExchange/dnscontrol/fork) in GitHub.
|
1. [Fork StackExchange/dnscontrol](https://github.com/StackExchange/dnscontrol/fork) in GitHub.
|
||||||
|
|
||||||
If you already have a fork, be sure to use the "sync fork" button on the main page to sync with master.
|
If you already have a fork, be sure to use the "sync fork" button on the main page to sync with the upstream.
|
||||||
|
|
||||||
2. In your fork, set the `${DOMAIN}_DOMAIN` variable in GHA via Settings :: Secrets and variables :: Actions :: Variables.
|
2. In your fork, set the `${DOMAIN}_DOMAIN` variable in GHA via Settings :: Secrets and variables :: Actions :: Variables.
|
||||||
|
|
||||||
|
|
|
@ -2,18 +2,18 @@
|
||||||
|
|
||||||
## Where are the docs?
|
## Where are the docs?
|
||||||
|
|
||||||
TL;DR version: [`docs`](https://github.com/StackExchange/dnscontrol/tree/master/docs) is the [marketing website](https://dnscontrol.org). [`documentation`](https://github.com/StackExchange/dnscontrol/tree/master/documentation) is the [docs.dnscontrol.org](https://docs.dnscontrol.org/) website. (Yes, the names are backwards!)
|
TL;DR version: [`docs`](https://github.com/StackExchange/dnscontrol/tree/main/docs) is the [marketing website](https://dnscontrol.org). [`documentation`](https://github.com/StackExchange/dnscontrol/tree/main/documentation) is the [docs.dnscontrol.org](https://docs.dnscontrol.org/) website. (Yes, the names are backwards!)
|
||||||
|
|
||||||
**The two websites**
|
**The two websites**
|
||||||
|
|
||||||
1. <https://dnscontrol.org/>
|
1. <https://dnscontrol.org/>
|
||||||
* The main website
|
* The main website
|
||||||
* Source code: [`docs`](https://github.com/StackExchange/dnscontrol/tree/master/docs)
|
* Source code: [`docs`](https://github.com/StackExchange/dnscontrol/tree/main/docs)
|
||||||
* Mostly "marketing" for the project.
|
* Mostly "marketing" for the project.
|
||||||
* Rarely changes. Updated via GitHub "pages" feature.
|
* Rarely changes. Updated via GitHub "pages" feature.
|
||||||
2. <https://docs.dnscontrol.org/>
|
2. <https://docs.dnscontrol.org/>
|
||||||
* Project documentation
|
* Project documentation
|
||||||
* Source code: [`documentation`](https://github.com/StackExchange/dnscontrol/tree/master/documentation)
|
* Source code: [`documentation`](https://github.com/StackExchange/dnscontrol/tree/main/documentation)
|
||||||
* Users and developer documentation
|
* Users and developer documentation
|
||||||
* Changes frequently. Updated via [GitBook](https://www.gitbook.com/)
|
* Changes frequently. Updated via [GitBook](https://www.gitbook.com/)
|
||||||
|
|
||||||
|
@ -21,10 +21,10 @@ TL;DR version: [`docs`](https://github.com/StackExchange/dnscontrol/tree/master/
|
||||||
|
|
||||||
Within the git repo, docs are grouped:
|
Within the git repo, docs are grouped:
|
||||||
|
|
||||||
* [`documentation/`](https://github.com/StackExchange/dnscontrol/tree/master/documentation): general docs
|
* [`documentation/`](https://github.com/StackExchange/dnscontrol/tree/main/documentation): general docs
|
||||||
* [`documentation/providers/`](https://github.com/StackExchange/dnscontrol/tree/master/documentation/providers/): One file per provider
|
* [`documentation/providers/`](https://github.com/StackExchange/dnscontrol/tree/main/documentation/providers/): One file per provider
|
||||||
* [`documentation/functions/`](https://github.com/StackExchange/dnscontrol/tree/master/documentation/functions/): One file per `dnsconfig.js` language feature
|
* [`documentation/functions/`](https://github.com/StackExchange/dnscontrol/tree/main/documentation/functions/): One file per `dnsconfig.js` language feature
|
||||||
* [`documentation/assets/FOO/`](https://github.com/StackExchange/dnscontrol/tree/master/documentation/assets/): Images for page FOO(PNGs only, please!)
|
* [`documentation/assets/FOO/`](https://github.com/StackExchange/dnscontrol/tree/main/documentation/assets/): Images for page FOO(PNGs only, please!)
|
||||||
|
|
||||||
## How to add a new page?
|
## How to add a new page?
|
||||||
|
|
||||||
|
|
|
@ -122,7 +122,7 @@ Directory names should be consitent. It should be all lowercase and match the A
|
||||||
## Step 4: Activate the driver
|
## Step 4: Activate the driver
|
||||||
|
|
||||||
Edit
|
Edit
|
||||||
[providers/\_all/all.go](https://github.com/StackExchange/dnscontrol/blob/master/providers/_all/all.go).
|
[providers/\_all/all.go](https://github.com/StackExchange/dnscontrol/blob/main/providers/_all/all.go).
|
||||||
Add the provider list so DNSControl knows it exists.
|
Add the provider list so DNSControl knows it exists.
|
||||||
|
|
||||||
## Step 5: Implement
|
## Step 5: Implement
|
||||||
|
@ -163,7 +163,7 @@ Integration tests use a test account and a test domain.
|
||||||
All records will be deleted from the test domain! Use a OTE domain or a real domain that isn't otherwise in use and can be destroyed.
|
All records will be deleted from the test domain! Use a OTE domain or a real domain that isn't otherwise in use and can be destroyed.
|
||||||
{% endhint %}
|
{% endhint %}
|
||||||
|
|
||||||
* Edit [integrationTest/providers.json](https://github.com/StackExchange/dnscontrol/blob/master/integrationTest/providers.json):
|
* Edit [integrationTest/providers.json](https://github.com/StackExchange/dnscontrol/blob/main/integrationTest/providers.json):
|
||||||
* Add the `creds.json` info required for this provider in the form of environment variables.
|
* Add the `creds.json` info required for this provider in the form of environment variables.
|
||||||
|
|
||||||
Now you can run the integration tests.
|
Now you can run the integration tests.
|
||||||
|
|
|
@ -144,7 +144,7 @@ func (c *desecProvider) buildIndexFromResponse(bodyString []byte) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parses the Link Header into a map (https://github.com/desec-io/desec-tools/blob/master/fetch_zone.py#L13)
|
// Parses the Link Header into a map (https://github.com/desec-io/desec-tools/blob/main/fetch_zone.py#L13)
|
||||||
func (c *desecProvider) convertLinks(links string) map[string]string {
|
func (c *desecProvider) convertLinks(links string) map[string]string {
|
||||||
mapping := make(map[string]string)
|
mapping := make(map[string]string)
|
||||||
printer.Debugf("Header: %s\n", links)
|
printer.Debugf("Header: %s\n", links)
|
||||||
|
|
Loading…
Reference in a new issue