Skip to content

Commit

Permalink
Replace /build/source by /build/ironos to eliminate ambiguity with /b…
Browse files Browse the repository at this point in the history
…uild/source/source (#1748)

* docker/buildAll.sh: replace /build/source by /build/ironos to eliminate ambiguity with /build/source/source

* scripts/ci/buildAll.sh: fix shellcheck and add additional comment
  • Loading branch information
ia authored Jul 20, 2023
1 parent 93a18e5 commit 297a4df
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ services:
command: /bin/sh
volumes:
- ./scripts/ci:/build/ci:Z
- ./:/build/source:Z
- ./:/build/ironos:Z
6 changes: 3 additions & 3 deletions scripts/IronOS.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM alpine:3.16
LABEL maintainer="Ben V. Brown <ralim@ralimtek.com>"

# Default current dir when container starts
WORKDIR /build/source
WORKDIR /build/ironos

# Installing the two compilers (ARM & RISCV), python3 & pip, clang tools:
## - compilers: gcc-*, newlib-*
Expand All @@ -29,7 +29,7 @@ RUN apk add --no-cache ${APK_COMPS} ${APK_PYTHON} ${APK_MISC} ${APK_DEV}
RUN python3 -m pip install ${PIP_PKGS}

# Git trust to avoid related warning
RUN git config --global --add safe.directory /build/source
RUN git config --global --add safe.directory /build/ironos

COPY . /build/source
COPY . /build/ironos
COPY ./scripts/ci /build/ci
18 changes: 13 additions & 5 deletions scripts/ci/buildAll.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,20 @@
set -e
set -u

mkdir -p /build/ci/artefacts
# Init vars
dir_ci="/build/ci"
dir_ironos="/build/ironos"
dir_source="${dir_ironos}/source"

# Build STM code
cd /build/source/source/
# Prepare output dir
dir_artefacts="${dir_ci}/artefacts"
mkdir -p "${dir_artefacts}"

# Build firmware
cd "${dir_source}"
bash ./build.sh || exit 1
echo "All Firmware built"

# Copy out all the final resulting files we would like to store for the next op
cp -r /build/source/source/Hexfile/*.hex /build/ci/artefacts/
cp -r /build/source/source/Hexfile/*.bin /build/ci/artefacts/
cp -r "${dir_source}"/Hexfile/*.bin "${dir_artefacts}"
cp -r "${dir_source}"/Hexfile/*.hex "${dir_artefacts}"

0 comments on commit 297a4df

Please sign in to comment.