Open dk-coligo opened 3 months ago
@dk-coligo sorry for the delay, we are in the process of a new release, so, I will back to this after the release. We need to add it to our CI/CD integration tests to make sure that this will not break it the already existent experience.
@microhobby we've had to make many other changes to the default scripts. For example, the platform-push stage for the tasks.json. In the developer documentation, there is a dependency on tcb unpack
then tcb platform push
. When I add this to the depends-on:
parameter of the platform-push task in tasks.json, only the unpack command runs and then exits without running the platform-push. So, unpack
needs explicit running in the build.yaml stage. I'll comment on the file inline separately so you can find it :)
The existing github actions does not function for a docker-in-docker (
dind
) configuration. Due to the build script using directories withroot:root
ownership a rootless self-hosted runner can not complete this workflow.The configuration below adds
-wd working_directory
argument to thetcb-env-setup.sh
script to allow absolute path to be passed directly to thedocker run torizon/torizoncore-builder
. Due to adind
setup, the/workdir
needs to be mounted with an absolute path. Github actions provides variables containing the absolute path for the runner directory, however, this is a well documented bug in the runner since 2022:A workaround for this is to add a build step creating a file with this abs-path to be referenced later
echo "${{ github.workspace }}" >> abs-path
. Any ENV var set in actions will be replaced at run-time by the runner replacing the ABS path with a relative sandboxed path for the runner. This is why a file is written, not an ENV.The
scripts/tasks.ps1
now has an additional ENV check to detect if it's in a Actions workflow, and set the abs-path accordingly. I did not handle errors for thisabs-path
file not existing.tcb-build
stage, no subsequent steps -tcb-platform-push-ostree
, orplatform-update-fleet
:exclamation:REF: email Signed-off-by: d.kelly@coligo.ai