Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ jobs:
- uses: cvmfs-contrib/github-action-cvmfs@v3
with:
cvmfs_repositories: 'singularity.opensciencegrid.org'
- uses: eic/run-cvmfs-osg-eic-shell@main
- uses: ./
with:
run_local_checkout: 'true'
platform-release: "jug_xl:nightly"
run: |
gcc --version
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/double.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,15 @@ jobs:
- uses: cvmfs-contrib/github-action-cvmfs@v3
with:
cvmfs_repositories: 'singularity.opensciencegrid.org'
- uses: eic/run-cvmfs-osg-eic-shell@main
- uses: ./
with:
run_local_checkout: 'true'
platform-release: "jug_xl:nightly"
run: |
gcc --version
which gcc
eic-info
- uses: eic/run-cvmfs-osg-eic-shell@main
- uses: ./
with:
run_local_checkout: 'true'
platform-release: "jug_xl:nightly"
run: |
gcc --version
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/network-none.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: network-none
on: [push, pull_request]
jobs:
singularity:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cvmfs-contrib/github-action-cvmfs@v3
with:
cvmfs_repositories: 'singularity.opensciencegrid.org'
- uses: ./
with:
platform-release: "jug_xl:nightly"
network_types: "none"
run: |
if ping -c 1 8.8.8.8 ; then
false
else
true
fi
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ The following parameters are supported:
- `run`: They payload code you want to execute on top of the view
- `setup`: Initialization/Setup script for a view that sets the environment (e.g. `/opt/detector/setup.sh`)
- `sandbox-path`: Path where the setup script for the custom view is location. By specifying this variable the auto-resolving of the view based on `release` and `platform` is disabled.
- `network_types`: Network types to setup inside container. Defaults to `bridge` networking, but can be `none` to disable networking.

Please be aware that you must use the combination of parameters `release` and `platform` together or use just the variable `platform-release` alone. These two options are given to enable more flexibility for the user to form their workflow with matrix expressions.

Expand Down
18 changes: 7 additions & 11 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,13 @@ inputs:
required: false
default: ''
platform-release:
description: 'LCG view release platform string you are targeting (e.g. jug_xl:3.0-stable)'
description: 'EIC shell release platform string you are targeting (e.g. jug_xl:3.0-stable)'
required: false
default: ''
run:
description: 'They payload code you want to execute on top of the view'
required: false
default: ''
run_local_checkout:
description: 'Run the local checkout of the action and not the main repo code'
required: false
default: 'false'
setup:
description: 'Environment initialization bash script that is sourced (e.g. install/setup.sh)'
required: false
Expand All @@ -32,17 +28,16 @@ inputs:
description: 'Custom path where the sandbox is located'
required: false
default: ''
network_types:
description: 'Network access types inside EIC shell'
required: false
default: 'bridge'

runs:
using: "composite"
steps:
- run: |
if [ "${{ inputs.run_local_checkout }}" == "true" ]; then
echo "WARNING running local checkout of the action !"
. setup-eic-shell.sh local
else
${{ github.action_path }}/setup-eic-shell.sh
fi
${{ github.action_path }}/setup-eic-shell.sh
shell: bash
env:
THIS: ${{ github.action_path }}
Expand All @@ -53,3 +48,4 @@ runs:
RUN: ${{ inputs.run }}
SETUP: ${{ inputs.setup }}
SANDBOX_PATH: ${{ inputs.sandbox-path }}
NETWORK_TYPES: ${{ inputs.network_types }}
2 changes: 1 addition & 1 deletion run-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ if singularity instance list | grep ${worker} ; then
echo "Reusing exisitng Singularity image from ${SANDBOX_PATH}"
else
echo "Starting Singularity image from ${SANDBOX_PATH}"
singularity instance start --bind /cvmfs --bind ${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE} ${SANDBOX_PATH} ${worker}
singularity instance start --bind /cvmfs --bind ${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE} --network ${NETWORK_TYPES:-bridge} ${SANDBOX_PATH} ${worker}
fi

echo "####################################################################"
Expand Down
6 changes: 1 addition & 5 deletions setup-eic-shell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@ if [ -z "${SANDBOX_PATH}" ]; then
fi

if [ "$(uname)" == "Linux" ]; then
if [ "${1:-}" == "local" ]; then
. run-linux.sh
else
$THIS/run-linux.sh
fi
$THIS/run-linux.sh
fi

if [ "$(uname)" == "Darwin" ]; then
Expand Down