Hi all Iam using Jenkins to perform initial installation. Here is my script:
# Setup installation repository
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum makecache fast
# Install
yum install docker-ce
# Run
systemctl start docker
# Test
docker run hello-world
#Add user to the group
usermod -aG docker root
How can I have Jenkins fail if my docker run hello-world fails for any reason. Does anybody know the script for that ?? Iam running the shell script from my "Execute Shell " placeholder in my Jenkins master where it executes everything on my slave node. Is this a good idea ??