-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
several improvements of workflow #4
Conversation
* add devcontainer CI build workflow * contain an `src/` directory, which is where all packages should go, as then the root of the repository can itself serve as a colcon workspace (works best for dev containers) * configures `.dockerignore` and `.gitignore` to ensure that any colcon-generated files (as repository root is also workspace) don't end up in code base etc. * create a `post-create` command that is executed on container creation and auto-configures the `~/.bashrc` with the local workspace and attempts to build the whole colcon workspace. This is to speed up later builds as all packages that can be build already automatically are. * updated documentation to match this
@ibrahimhroob, I think this is an improvement to the template, based on my experience with devcontainers ans ros2 overall. Happy to discuss |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some explanations, @ibrahimhroob
@@ -10,7 +10,7 @@ RUN apt-get update \ | |||
|
|||
# get the source tree and analyse it for its package.xml only | |||
FROM base as sourcefilter | |||
COPY . /tmp/src | |||
COPY ./src /tmp/src |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now all packages should be under src/
bin/ | ||
lib/ | ||
install/ | ||
*~ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ignore all directories etc that are generated by colcon, also ignore changes to readme etc as they are just documentation
imageName: lcas.lincoln.ac.uk/devcontainer/${{ steps.docker_image_name.outputs.docker_image }} | ||
push: never | ||
imageTag: ${{ env.BRANCH }} | ||
#runCmd: "bash .devcontainer/run-ci.sh" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a new CI workflow, that ensures that the devcontainer image can be build. Basically it guarantees that the devcontainer image on the main branch always works
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much @marc-hanheide, all looks great
src/
directory, which is where all packages should go, as then the root of the repository can itself serve as a colcon workspace (works best for dev containers).dockerignore
and.gitignore
to ensure that any colcon-generated files (as repository root is also workspace) don't end up in code base etc.post-create
command that is executed on container creation and auto-configures the~/.bashrc
with the local workspace and attempts to build the whole colcon workspace. This is to speed up later builds as all packages that can be build already automatically are.