Skip to content

Instantly share code, notes, and snippets.

@osscontributor
Last active February 23, 2023 15:16
Show Gist options
  • Save osscontributor/32051f36a4f61eee0e4b697a1ce5dd1d to your computer and use it in GitHub Desktop.
Save osscontributor/32051f36a4f61eee0e4b697a1ce5dd1d to your computer and use it in GitHub Desktop.
String operation = env.operation
String components = env.components
String cmd = operation == 'Add' ? '--add_components' : '--remove_components'
sh """
set +x
apt update
apt install -y python2
apt install -y curl
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
python2 get-pip.py
pip install pyyaml
cd $WORKSPACE/tools/scripts_minimal_client_spec
chmod +x add_or_remove_components.py
python2 hello.py ${cmd} ${components}
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment