Skip to content

Instantly share code, notes, and snippets.

View poldz123's full-sized avatar
🎯
Focusing

rodolfo navalon poldz123

🎯
Focusing
View GitHub Profile
#!/bin/bash
set -e
createGitlabRunner() {
# Create the tag of this runner based on the number of runners of the machines
GITLAB_TAG="giatec360-shell"
GITLAB_RUNNER_NAME="${1} SHELL"
# Register the runner to gitlab
sudo gitlab-runner register \
#!/bin/bash
update_repo() {
echo ============================
echo ========= NEXT: $1 =========
echo ============================
echo
rm -Rf .git/refs/original
git checkout dev
# Adds the java repository, repo, keys and update the apt. This also append the repo urls to
# the sources file and making sure that we do not append same deb and deb source
# all over again when running the installation.
DEB="deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main"
DEB_SOURCE="deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main"
apt-key adv --recv-key --keyserver keyserver.ubuntu.com EEA14886
grep -q -F "$DEB" /etc/apt/sources.list || echo "$DEB" >> /etc/apt/sources.list
grep -q -F "$DEB_SOURCE" /etc/apt/sources.list || echo "$DEB_SOURCE" >> /etc/apt/sources.list
apt-get update
# Install the java8 installer and make sure that we respond to the prompt