Chore: Upgrade Jenkins-job-builder to 6.3.0
[releng/global-jjb.git] / shell / sigul-install.sh
1 #!/bin/bash
2 # SPDX-License-Identifier: EPL-1.0
3 ##############################################################################
4 # Copyright (c) 2017 The Linux Foundation and others.
5 #
6 # All rights reserved. This program and the accompanying materials
7 # are made available under the terms of the Eclipse Public License v1.0
8 # which accompanies this distribution, and is available at
9 # http://www.eclipse.org/legal/epl-v10.html
10 ##############################################################################
11 echo "---> sigul-install.sh"
12
13 # Ensure we fail the job if any steps fail.
14 set -e -o pipefail
15
16 if command -v sigul &>/dev/null; then
17     echo "Sigul already installed; skipping installation."
18 else
19     # Setup sigul RPM repo
20     echo "[fedora-infra-sigul]
21 name=Fedora builder packages for sigul
22 baseurl=https://kojipkgs.fedoraproject.org/repos-dist/epel\$releasever-infra/latest/\$basearch/
23 enabled=1
24 gpgcheck=1
25 gpgkey=https://infrastructure.fedoraproject.org/repo/infra/RPM-GPG-KEY-INFRA-TAGS
26 includepkgs=sigul*
27 skip_if_unavailable=True" > fedora-infra-sigul.repo
28
29     sudo cp fedora-infra-sigul.repo /etc/yum.repos.d
30     rm fedora-infra-sigul.repo
31
32     # install sigul
33     sudo yum install -y -q sigul
34 fi;