Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We don't need the fancy GOPATH stuff we used to use now with go v1.11 (…
…#1331) * Use golang v1.11 outside-of-GOPATH building strategy, the new norm, with both buildkite and circleci builds * Fiddle with .gitattributes as It was once again broken in some Windows situations. * Bump docker-compose and golang versions in circleci build * Introduce .editorconfig documenting use of LF not CRLF
- Loading branch information
Showing
12 changed files
with
110 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# EditorConfig is awesome: http://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
# On Windows the wrong line endings break docker containers | ||
# Article: https://help.github.com/articles/dealing-with-line-endings/ | ||
* text=auto | ||
/containers text eol=lf | ||
.gitignore text | ||
*.png binary | ||
*.jpg binary | ||
*.tqr binary | ||
*gz binary | ||
*MY? binary | ||
# Helpful examples: https://github.com/alexkaratarakis/gitattributes | ||
# Way more than you can stand to read: https://git-scm.com/docs/gitattributes | ||
|
||
# In general on this project there's no reason to have git changing line endings. | ||
# Modern editors can do the right thing with lf and should be set to do so, whether | ||
# on Windows or elsewhere. | ||
# The incredibly big gotcha here is that if a *.sh gets checked out on WIndows with CRLF and then built | ||
# into a container with the CRLF, it can't run in linux. | ||
|
||
# text=false here essentially is the same as core.autocrlf=false | ||
* text=false eol=lf | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,53 @@ | ||
<h1>Buildkite Test Agent Setup</h1> | ||
|
||
We are using [Buildkite](https://buildkite.com/drud) for Windows and macOS testing. The build machines and buildkite-agent must be set up before use. | ||
|
||
## Windows Test Agent Setup: | ||
|
||
0. Create the user "testbot" on the machine. The password should be the password of testbot@drud.com. | ||
1. Install [chocolatey](https://chocolatey.org/) | ||
2. Install golang/mysql-cli/make/git/docker-ce/nssm with `choco install -y git mysql-cli golang make docker-desktop nssm GoogleChrome zip jq composer cmder` (If docker-toolbox, use that instead; you may have to download the release separately to get correct version.) | ||
3. Enable gd and curl extensions in /c/tools/php73/php.ini | ||
3. Install bats: `git clone git://github.com/bats-core/bats-core; cd bats-core; git checkout v1.1.0; ./install.sh` | ||
3. If a laptop, set the "lid closing" setting in settings to do nothing. | ||
4. Set the "Sleep after time" setting in settings to never. | ||
5. Install the buildkite-agent. Use the latest release from [github.com/buildkite/agent](https://github.com/buildkite/agent/releases). It should go in /c/buildkite-agent, with the buildkite-agent.exe in /c/buildkite-agent/bin and the config in /c/buildkite-agent. | ||
6. Update the buildkite-agent.cfg with the *token* and *tags*. Tags will probably be like `"os=windows,osvariant=windows10pro,dockertype=dockerforwindows"` or `"os=windows,osvariant=windows10pro,dockertype=toolbox"`. | ||
7. Set up the agent to [run as a service](https://buildkite.com/docs/agent/v3/windows#running-as-a-service): | ||
- __on the "Log On" tab in the services widget it must be set up to log in as the primary user of the machine, so it inherits environment variables and home directory.__ | ||
8. Set up the machine to [automatically log in on boot](https://www.cnet.com/how-to/automatically-log-in-to-your-windows-10-pc/). Run netplwiz, provide the password for the main user, uncheck the "require a password to log in". | ||
9. On Docker Toolbox systems, add a link to "Docker Quickstart Terminal" in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp (see [link](http://www.thewindowsclub.com/make-programs-run-on-startup-windows)). | ||
10. On Docker-for-windows systems, launch Docker. It will offer to reconfigure Hyper-V and do a restart. | ||
11. On Docker-for-windows, configured the C: and other drives as shared to docker. | ||
12. On Docker Toolbox systems, make sure that nested virtualization is enabled however you need to enable it. | ||
13. Edit /c/ProgramData/git/config to `autocrlf: false` and verify that `git config --list` shows only autocrlf: false. | ||
14. Run `winpty docker run -it -p 80 busybox ls` to trigger the Windows Defender warning, and "allow access". | ||
15. Try running .buildkite/sanetestbot.sh to check your work. | ||
16. Change the name of the machine to something in keeping with current style. Maybe `testbot-dell-toolbox-3`. | ||
17. Reboot the machine and do a test run. (On windows the machine name only takes effect on reboot.) | ||
18. Set the timezone properly (US MT) | ||
19. Log into Chrome with the user testbot@drud.com and enable Chrome Remote Desktop. | ||
|
||
### macOS Test Agent Setup | ||
|
||
0. Create the user "testbot" on the machine. The password should be the password of testbot@drud.com. | ||
1. Install [homebrew](https://brew.sh/) | ||
2. Install golang/git/docker with `brew install golang git buildkite-agent mariadb jq p7zip bats-core composer` | ||
3. Install docker with `brew cask install docker` | ||
4. If the xcode command line tools are not yet installed, install them with `xcode select --install` | ||
5. Edit the buildkite-agent.cfg in /usr/local/etc/buildkite-agent.cfg to add the agent token and the tags. Tags will probably be like `"os=macos,osvariant=highsierra,dockertype=dockerformac"` - Also edit with `build-path="~/tmp/buildkite-agent/builds"` | ||
6. Install nosleep `brew cask install nosleep` | ||
7. Enable nosleep using its shortcut in the Mac status bar. | ||
8. In nosleep Preferences, enable "Never sleep on AC Adapter", "Never sleep on Battery", and "Start nosleep utility on system startup". | ||
9. Set up Mac to [automatically log in on boot](https://support.apple.com/en-us/HT201476). | ||
10. Try running .buildkite/sanetestbot.sh to check your work. | ||
11. Change the name of the machine to something in keeping with current style. Maybe `testbot-mbp2017-macos-3`. | ||
12. Log into Chrome with the user testbot@drud.com and enable Chrome Remote Desktop. | ||
13. Set the timezone properly (US MT) | ||
14. Reboot the machine and do a test run. | ||
<h1>Buildkite Test Agent Setup</h1> | ||
|
||
We are using [Buildkite](https://buildkite.com/drud) for Windows and macOS testing. The build machines and buildkite-agent must be set up before use. | ||
|
||
## Windows Test Agent Setup: | ||
|
||
0. Create the user "testbot" on the machine. The password should be the password of testbot@drud.com. | ||
1. Install [chocolatey](https://chocolatey.org/) | ||
2. Install golang/mysql-cli/make/git/docker-ce/nssm with `choco install -y git mysql-cli golang make docker-desktop nssm GoogleChrome zip jq composer cmder` (If docker-toolbox, use that instead; you may have to download the release separately to get correct version.) | ||
3. Enable gd and curl extensions in /c/tools/php73/php.ini | ||
3. Install bats: `git clone git://github.com/bats-core/bats-core; cd bats-core; git checkout v1.1.0; ./install.sh` | ||
3. If a laptop, set the "lid closing" setting in settings to do nothing. | ||
4. Set the "Sleep after time" setting in settings to never. | ||
5. Install the buildkite-agent. Use the latest release from [github.com/buildkite/agent](https://github.com/buildkite/agent/releases). It should go in /c/buildkite-agent, with the buildkite-agent.exe in /c/buildkite-agent/bin and the config in /c/buildkite-agent. | ||
6. Update the buildkite-agent.cfg | ||
* *token* | ||
* *tags*: Tags will probably be like `"os=windows,osvariant=windows10pro,dockertype=dockerforwindows"` or `"os=windows,osvariant=windows10pro,dockertype=toolbox"` | ||
* build-path: "C:\Users\testbot\tmp\buildkite" on Windows. (This is to get it to build in the home directory; by default docker toolbox won't mount anything outside the home directory.) | ||
7. Set up the agent to [run as a service](https://buildkite.com/docs/agent/v3/windows#running-as-a-service): | ||
- __on the "Log On" tab in the services widget it must be set up to log in as the primary user of the machine, so it inherits environment variables and home directory.__ | ||
8. Set up the machine to [automatically log in on boot](https://www.cnet.com/how-to/automatically-log-in-to-your-windows-10-pc/). Run netplwiz, provide the password for the main user, uncheck the "require a password to log in". | ||
9. On Docker Toolbox systems, add a link to "Docker Quickstart Terminal" in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp (see [link](http://www.thewindowsclub.com/make-programs-run-on-startup-windows)). | ||
10. On Docker-for-windows systems, launch Docker. It will offer to reconfigure Hyper-V and do a restart. | ||
11. On Docker-for-windows, configured the C: and other drives as shared to docker. | ||
12. On Docker Toolbox systems, make sure that nested virtualization is enabled however you need to enable it. | ||
13. Edit /c/ProgramData/git/config "core" section to `autocrlf: false` and `eol: lf` verify that `git config --list` shows only autocrlf: false. | ||
14. Run `winpty docker run -it -p 80 busybox ls` to trigger the Windows Defender warning, and "allow access". | ||
15. Try running .buildkite/sanetestbot.sh to check your work. | ||
16. Install ddev using the ddev_windows_installer.exe from https://github.com/drud/ddev/releases | ||
16. Change the name of the machine to something in keeping with current style. Maybe `testbot-dell-toolbox-3`. | ||
17. Reboot the machine and do a test run. (On windows the machine name only takes effect on reboot.) | ||
18. Set the timezone properly (US MT) | ||
19. Log into Chrome with the user testbot@drud.com and enable Chrome Remote Desktop. | ||
|
||
### macOS Test Agent Setup | ||
|
||
0. Create the user "testbot" on the machine. The password should be the password of testbot@drud.com. | ||
1. Change the name of the machine to something in keeping with current style. Maybe `testbot-macstadium-macos-3`. | ||
1. Install [homebrew](https://brew.sh/) `xcode select --install` and `/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"` | ||
2. Install golang/git/docker with `brew cask install item2 google-chrome docker nosleep && brew tap buildkite/buildkite && brew tap drud/ddev && brew install golang git buildkite-agent mariadb jq p7zip bats-core composer ddev` | ||
4. If the xcode command line tools are not yet installed, install them with `xcode select --install` | ||
5. Edit the buildkite-agent.cfg in /usr/local/etc/buildkite-agent.cfg to add | ||
* the agent token | ||
* Tags, like `"os=macos,osvariant=highsierra,dockertype=dockerformac"` | ||
* `build-path="~/tmp/buildkite-agent/builds"` | ||
7. Enable nosleep using its shortcut in the Mac status bar. | ||
8. In nosleep Preferences, enable "Never sleep on AC Adapter", "Never sleep on Battery", and "Start nosleep utility on system startup". | ||
9. Set up Mac to [automatically log in on boot](https://support.apple.com/en-us/HT201476). | ||
10. Try checking out ddev and running .buildkite/sanetestbot.sh to check your work. | ||
12. Log into Chrome with the user testbot@drud.com and enable Chrome Remote Desktop. | ||
13. Set the timezone properly (US MT) | ||
14. Start the agent with `brew services start buildkite-agent` | ||
15. Reboot the machine and do a test run. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.