From b1981de923a7f406dd7978c9f7b730627d593f5c Mon Sep 17 00:00:00 2001 From: Erwin Ried <1091420+eried@users.noreply.github.com> Date: Tue, 26 May 2020 10:13:47 +0200 Subject: [PATCH] Updated Compile firmware (markdown) --- Compile-firmware.md | 47 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 5 deletions(-) diff --git a/Compile-firmware.md b/Compile-firmware.md index 8298fc3..c7c523e 100644 --- a/Compile-firmware.md +++ b/Compile-firmware.md @@ -1,13 +1,13 @@ The easiest way is to use Docker. After you install Docker in your machine, if you are inclined for using the command line, you can try the following: -For building: - +* For building: `docker build -t portapackccache -f dockerfile-nogit .` -For running (in the root of the repo): - +* For running (in the root of the repo): `docker run -it -v ${PWD}:/havoc portapackccache` +You have to create a `build` folder before running the image. + # Using Docker Hub and Kitematic The required Docker image is also in Docker Hub, browse for it in [Kitematic](https://github.com/docker/kitematic): @@ -15,4 +15,41 @@ The required Docker image is also in Docker Hub, browse for it in [Kitematic](ht You need to configure the path to the source code from the Volumes of the container as show in the image below. Everytime you run this container, it will compile the source and (if successful) leave the results in `build/firmware/` -[[img/Kitematic_VL5an8rufV.png]] \ No newline at end of file +[[img/Kitematic_VL5an8rufV.png]] + +# Using Buddy.Works (and other CI platforms) + +You can use the following _yml _as your template for your CI platform (pipeline export from [buddy.works](https://buddy.works/)): + +``` +- pipeline: "Build firmware"` + `trigger_mode: "ON_EVERY_PUSH"` + `ref_name: "master"` + `ref_type: "BRANCH"` + `auto_clear_cache: true` + `trigger_condition: "ALWAYS"` + `actions:` + `- action: "Build Docker image"` + `type: "DOCKERFILE"` + `dockerfile_path: "dockerfile-nogit"` + `do_not_prune_images: true` + `trigger_condition: "ALWAYS"` + `- action: "Execute: mkdir build"` + `type: "BUILD"` + `working_directory: "/buddy/portapack-havoc"` + `docker_image_name: "library/ubuntu"` + `docker_image_tag: "18.04"` + `execute_commands:` + `- "mkdir -p build"` + `volume_mappings:` + `- "/:/buddy/portapack-havoc"` + `trigger_condition: "ALWAYS"` + `shell: "BASH"` + `- action: "Run Docker Image"` + `type: "RUN_DOCKER_CONTAINER"` + `use_image_from_action: true` + `volume_mappings:` + `- "/:/havoc"` + `trigger_condition: "ALWAYS"` + `shell: "SH" +``` \ No newline at end of file