Skip to content
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

How to run additional steps in the same environment #901

Open
firesurfer opened this issue Jan 24, 2025 · 1 comment
Open

How to run additional steps in the same environment #901

firesurfer opened this issue Jan 24, 2025 · 1 comment

Comments

@firesurfer
Copy link

Hi I am currently using the industrial_ci successfully in our github ci pipeline.
Now I would like to add additional steps that are run in the same environment. In this specific case I would like to run xacro on our urdf.xacro files in order to test if certain configuration can be processed successfully.

What I tried so far:

  1. Add an additional step after:
      - uses: 'ros-industrial/industrial_ci@master'
        env:
          UPSTREAM_WORKSPACE: ${{ inputs.upstream_workspace }}
          ROS_DISTRO: ${{ inputs.ros_distro }}
          ROS_REPO: ${{ inputs.ros_repo }}
      - name: Xacro
        run: |
            xacro <path to xacro file>
  1. Use the AFTER_SCRIPT to run the same command

In both cases it looks like the command is not run in the same environment as the one the industrial_ci pipeline runs in. (command xacro not found)

So the question is:
How can I run a custom command in the same environment after the build has finished?

@mathias-luedtke
Copy link
Member

How can I run a custom command in the same environment after the build has finished?

There is no shared environment! All commands create their custom environment as needed.

Add an additional step after:

This only works, if you run it on the target Ubuntu version with ISOLATION: shell

Use the AFTER_SCRIPT to run the same command

This should work!

But in both cases you will have to source setup.bash, for example by prefixing your command with rosenv, see
https://github.com/ros-industrial/industrial_ci/blob/master/doc/index.rst#customize-within-the-ci-process for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants