Skip to content

Commit 2e0508e

Browse files
[WIP] Devops tooling (Shift3#21)
* feat(devops): Add Terraform and CircleCI Co-authored-by: Justin <[email protected]>
1 parent fff8abb commit 2e0508e

File tree

3 files changed

+27
-3
lines changed

3 files changed

+27
-3
lines changed

.circleci/config.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
- checkout
88
- run: brew update
99
- run: brew install shellcheck
10-
- run: shellcheck setup -e SC2039
10+
- run: shellcheck setup -e SC2039 -e SC1091
1111
- run:
1212
name: Run Setup Script
1313
command: ./setup
@@ -23,15 +23,15 @@ jobs:
2323
- run: ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
2424
- run: apt update
2525
- run: apt install -y shellcheck sudo
26-
- run: shellcheck setup -e SC2039
26+
- run: shellcheck setup -e SC2039 -e SC1091
2727
- run: ./setup
2828
test-fedora:
2929
docker:
3030
- image: fedora:33
3131
steps:
3232
- checkout
3333
- run: dnf -y install ShellCheck sudo util-linux-user
34-
- run: shellcheck setup -e SC2039
34+
- run: shellcheck setup -e SC2039 -e SC1091
3535
- run: ./setup
3636

3737
workflows:

os/linux

+20
Original file line numberDiff line numberDiff line change
@@ -113,19 +113,39 @@ systemd_enable_docker_on_restart() {
113113
sudo systemctl enable docker
114114
}
115115

116+
install_circleci_cli() {
117+
curl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/master/install.sh | sudo bash
118+
}
119+
120+
deb_add_and_install_terraform() {
121+
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
122+
sudo apt-add-repository "deb [arch=$(dpkg --print-architecture)] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
123+
sudo apt-get install -y terraform
124+
}
125+
126+
dnf_add_and_install_terraform() {
127+
sudo dnf install -y dnf-plugins-core
128+
sudo dnf config-manager --add-repo https://rpm.releases.hashicorp.com/$release/hashicorp.repo
129+
sudo dnf -y install terraform
130+
}
131+
116132
case $OS in
117133
Fedora)
118134
fancy_echo "Installing packages using dnf"
119135
sudo dnf groupinstall -y "C Development Tools and Libraries"
120136
dnf_add_mongo_repo
137+
dnf_add_and_install_terraform
121138
sudo dnf -y install $FEDORA_PACKAGES
139+
install_circleci_cli
122140
fedora_enable_databases_on_restart
123141
;;
124142
Debian)
125143
fancy_echo "Installing packages using apt"
126144
deb_add_and_install_docker_ce
145+
deb_add_and_install_terraform
127146
apt_add_mongo_repo
128147
sudo apt install -y -q $DEBIAN_PACKAGES
148+
install_circleci_cli
129149
debian_enable_databases_on_restart
130150
systemd_enable_docker_on_restart
131151
;;

os/mac

+4
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ brew "hub"
6464
# Docker
6565
cask "docker", args: { force: true }
6666
67+
# Devops Tools
68+
brew "circleci"
69+
brew "terraform"
70+
6771
# Image manipulation
6872
brew "imagemagick"
6973

0 commit comments

Comments
 (0)