Back to home page

EIC code displayed by LXR

 
 

    


Warning, /run-cvmfs-osg-eic-shell/README.md is written in an unsupported language. File is not indexed.

0001 # GitHub Action: eic/run-cvmfs-osg-eic-shell
0002 ![linux](https://github.com/eic/run-cvmfs-osg-eic-shell/workflows/linux/badge.svg)
0003 
0004 This GitHub Action executes user payload code inside a EIC shell environment, specified by the user.
0005 
0006 ## Instructions
0007 
0008 ### Prerequisites
0009 This action depends on the user to call the companion action `uses: cvmfs-contrib/github-action-cvmfs@v4` before using `uses: eic/run-cvmfs-osg-eic-shell@v1`, which will install CVMFS on the node. GitHub Actions currently do not support calling the action `github-action-cvmfs` from within `run-cvmfs-osg-eic-shell`, this needs to be done explicitly by the user.
0010 
0011 ### Example
0012 
0013 You can use this GitHub Action in a workflow in your own repository with `uses: eic/run-cvmfs-osg-eic-shell@v1`.
0014 
0015 A minimal job example for GitHub-hosted runners of type `ubuntu-latest`:
0016 ```yaml
0017 jobs:
0018   run-eic-shell:
0019     runs-on: ubuntu-latest
0020     steps:
0021     - uses: actions/checkout@v4
0022     - uses: cvmfs-contrib/github-action-cvmfs@v4
0023     - uses: eic/run-cvmfs-osg-eic-shell@v1
0024       with:
0025         platform-release: "eic_xl:nightly"
0026         run: |
0027           gcc --version
0028           which gcc
0029           eic-info
0030 ```
0031 In this case the action will automatically resolve the correct container image (in this case `eic_xl:nightly`) and spawn an instance with Singularity from `/cvmfs/singularity.opensciencegrid.org/`.
0032 
0033 The action mounts the checkout directory into the mentioned container and wraps the variable `run` in the script:
0034 
0035 ```sh
0036 #!/usr/bin/env bash
0037 export LC_ALL=C
0038 set -Euo pipefail
0039 trap 's=$?; echo "$0: Error on line "$LINENO": $BASH_COMMAND"; exit $s' ERR
0040 IFS=$'\n\t'
0041 set -e
0042 
0043 source ${SETUP}
0044 
0045 ${RUN} # the multi-line variable specified in the action under run: |
0046 ```
0047 
0048 which is executed in the container and thus giving the user an easy and direct access to run arbitrary code on top of an EIC shell.
0049 
0050 
0051 ### Parameters
0052 The following parameters are supported:
0053  - `platform`: EIC shell platform you are targeting (e.g. `eic_xl`)
0054  - `release`: EIC shell release you are targeting (e.g. `3.0-stable`)
0055  - `platform-release`: EIC shell platform release string you are targeting (e.g. `eic_xl:3.0-stable`)
0056  - `run`: They payload code you want to execute on top of the view
0057  - `setup`: Initialization/Setup script for a view that sets the environment (e.g. `/opt/detector/epic-main/bin/thisepic.sh`)
0058  - `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.
0059  - `network_types`: Network types to setup inside container. Defaults to `bridge` networking, but can be `none` to disable networking.
0060  - `apptainer_version`: Apptainer version to use. Defaults to `latest`, but can be any version such as `v1.1.3`.
0061 
0062 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.
0063 
0064 ### Minimal Example
0065 
0066 There are minimal examples, which are also workflows in this repository in the subfolder [.github/workflows/](https://github.com/eic/run-cvmfs-osg-eic-shell/tree/main/.github/workflows).
0067 
0068 ## Limitations
0069 
0070 The action will always resolve the correct image to execute your code on top the requested view, therefore you must always set the top level GitHub Action variable `runs-on: ubuntu-latest`.