Compare commits

...
2 Commits
Author SHA1 Message Date
zvecr f61c99fdda Remove duplication of ssh keys and fix usage on PR builds (#5013) 2019-02-15 06:47:47 -08:00
Konstantin Đorđević cd369b7107 docker_build.sh: Run container in interactive mode (#5088)
* docker_build.sh: Run container in interactive mode

* Add message about QMK Toolbox

* Update Docker docs
2019-02-15 06:46:42 -08:00
4 changed files with 16 additions and 27 deletions

No files matched your search

+3 -3
View File
@@ -129,12 +129,12 @@ If you have trouble and want to ask for help, it is useful to generate a *Win_Ch
## Docker ## Docker
If this is a bit complex for you, Docker might be the turn-key solution you need. After installing [Docker CE](https://docs.docker.com/install/#supported-platforms), run the following command from the `qmk_firmware` directory to build a keyboard/keymap: If this is a bit complex for you, Docker might be the turnkey solution you need. After installing [Docker CE](https://docs.docker.com/install/#supported-platforms), run the following command from the `qmk_firmware` directory to build a keyboard/keymap:
```bash ```bash
util/docker_build.sh keyboard:keymap util/docker_build.sh keyboard:keymap
# For example: util/docker_build.sh ergodox_ez:steno # For example: util/docker_build.sh ergodox_ez:steno
``` ```
This will compile the targeted keyboard/keymap and leave the resulting `.hex` or `.bin` file in the QMK directory for you to flash. If `:keymap` is omitted, the `default` keymap is used. Note that the parameter format is the same as when building with `make`. This will compile the desired keyboard/keymap and leave the resulting `.hex` or `.bin` file in the QMK directory for you to flash. If `:keymap` is omitted, the `default` keymap is used. Note that the parameter format is the same as when building with `make`.
You can also start the script without any parameters, in which case it will ask you to input the build parameters one by one, which you may find easier to use: You can also start the script without any parameters, in which case it will ask you to input the build parameters one by one, which you may find easier to use:
```bash ```bash
@@ -147,7 +147,7 @@ There is also support for building _and_ flashing the keyboard straight from Doc
util/docker_build.sh keyboard:keymap:target util/docker_build.sh keyboard:keymap:target
# For example: util/docker_build.sh planck/rev6:default:dfu-util # For example: util/docker_build.sh planck/rev6:default:dfu-util
``` ```
If you're on Linux, this should work out of the box. On Windows and macOS, it requires [Docker Machine](http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos/) to be running. This is tedious to set up, so it's not recommended; use QMK Toolbox instead. If you're on Linux, this should work out of the box. On Windows and macOS, it requires [Docker Machine](http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos/) to be running. This is tedious to set up, so it's not recommended; use [QMK Toolbox](https://github.com/qmk/qmk_toolbox) instead.
!> Docker for Windows requires [Hyper-V](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v) to be enabled. This means that it cannot work on versions of Windows which don't have Hyper-V, such as Windows 7, Windows 8 and **Windows 10 Home**. !> Docker for Windows requires [Hyper-V](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v) to be enabled. This means that it cannot work on versions of Windows which don't have Hyper-V, such as Windows 7, Windows 8 and **Windows 10 Home**.
+2 -1
View File
@@ -39,11 +39,12 @@ if [ -n "$target" ]; then
else else
echo "Error: target requires docker-machine to work on your platform" >&2 echo "Error: target requires docker-machine to work on your platform" >&2
echo "See http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos" >&2 echo "See http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos" >&2
echo "Consider flashing with QMK Toolbox (https://github.com/qmk/qmk_toolbox) instead" >&2
exit 3 exit 3
fi fi
fi fi
dir=$(pwd -W 2>/dev/null) || dir=$PWD # Use Windows path if on Windows dir=$(pwd -W 2>/dev/null) || dir=$PWD # Use Windows path if on Windows
# Run container and build firmware # Run container and build firmware
docker run --rm $usb_args -v "$dir":/qmk_firmware qmkfm/qmk_firmware \ docker run --rm -it $usb_args -v "$dir":/qmk_firmware qmkfm/qmk_firmware \
make "$keyboard${keymap:+:$keymap}${target:+:$target}" make "$keyboard${keymap:+:$keymap}${target:+:$target}"
+1 -15
View File
@@ -1,9 +1,6 @@
#!/bin/bash #!/bin/bash
TRAVIS_BRANCH="${TRAVIS_BRANCH:master}" source util/travis_push.sh
TRAVIS_PULL_REQUEST="${TRAVIS_PULL_REQUEST:false}"
TRAVIS_COMMIT_MESSAGE="${TRAVIS_COMMIT_MESSAGE:-none}"
TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE:-HEAD~1..HEAD}"
set -o errexit -o nounset set -o errexit -o nounset
@@ -12,17 +9,6 @@ echo "Using git hash ${rev}"
if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]] ; then if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]] ; then
git config --global user.name "QMK Bot"
git config --global user.email "[email protected]"
openssl aes-256-cbc -K $encrypted_b0ee987fd0fc_key -iv $encrypted_b0ee987fd0fc_iv -in secrets.tar.enc -out secrets.tar -d
tar xvf secrets.tar
chmod 600 id_rsa_qmk_firmware
chmod 600 id_rsa_qmk.fm
eval `ssh-agent -s`
ssh-add id_rsa_qmk_firmware
# convert to unix line-endings # convert to unix line-endings
git checkout master git checkout master
git diff --diff-filter=M --name-only -n 1 -z ${TRAVIS_COMMIT_RANGE} | xargs -0 dos2unix git diff --diff-filter=M --name-only -n 1 -z ${TRAVIS_COMMIT_RANGE} | xargs -0 dos2unix
+10 -8
View File
@@ -5,13 +5,15 @@ TRAVIS_PULL_REQUEST="${TRAVIS_PULL_REQUEST:false}"
TRAVIS_COMMIT_MESSAGE="${TRAVIS_COMMIT_MESSAGE:-none}" TRAVIS_COMMIT_MESSAGE="${TRAVIS_COMMIT_MESSAGE:-none}"
TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE:-HEAD~1..HEAD}" TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE:-HEAD~1..HEAD}"
git config --global user.name "QMK Bot" if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]] ; then
git config --global user.email "[email protected]" git config --global user.name "QMK Bot"
git config --global user.email "[email protected]"
openssl aes-256-cbc -K $encrypted_b0ee987fd0fc_key -iv $encrypted_b0ee987fd0fc_iv -in secrets.tar.enc -out secrets.tar -d openssl aes-256-cbc -K $encrypted_b0ee987fd0fc_key -iv $encrypted_b0ee987fd0fc_iv -in secrets.tar.enc -out secrets.tar -d
tar xvf secrets.tar tar xvf secrets.tar
chmod 600 id_rsa_qmk_firmware chmod 600 id_rsa_qmk_firmware
chmod 600 id_rsa_qmk.fm chmod 600 id_rsa_qmk.fm
eval `ssh-agent -s` eval `ssh-agent -s`
ssh-add id_rsa_qmk_firmware ssh-add id_rsa_qmk_firmware
fi