-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.envrc.gitpod
57 lines (50 loc) · 2.19 KB
/
.envrc.gitpod
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
if ! command -v terraform &> /dev/null
then
sudo apt-get update -y && sudo apt-get install -y gnupg software-properties-common curl
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
sudo apt-get update -y && sudo apt-get install terraform -y
fi
if ! command -v commitizen &> /dev/null
then
npm install commitizen -g
commitizen init cz-conventional-changelog --save-dev --save-exact
npm install --save-dev @commitlint/prompt @commitlint/config-conventional commitizen
touch .git/hooks/prepare-commit-msg
echo "exec < /dev/tty && node_modules/.bin/cz --hook || true" >> .git/hooks/prepare-commit-msg
fi
if ! command -v secretsfoundry &> /dev/null
then
cd /tmp &&\
wget https://github.com/truefoundry/secretsfoundry/releases/download/v0.1.16/secretsfoundry-0.1.16-linux-x64 &&\
mv secretsfoundry-0.1.16-linux-x64 secretsfoundry &&\
chmod u+x secretsfoundry &&\
sudo mv secretsfoundry /usr/local/bin
fi
if ! command -v driftctl &> /dev/null
then
curl -L https://github.com/snyk/driftctl/releases/latest/download/driftctl_linux_amd64 -o driftctl
chmod +x driftctl && sudo mv driftctl /usr/local/bin/
fi
if ! command -v act &> /dev/null
then
curl https://raw.githubusercontent.com/nektos/act/master/install.sh | sudo bash
sudo mv ./bin/act /usr/local/bin/
fi
WORKPLACE="/workspace/mtchoun-mouh"
if ! command -v aws &> /dev/null
then
pushd /tmp || exit
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip && sudo ./aws/install && rm awscliv2.zip && rm -rf aws/ &&\
mkdir "$WORKPLACE"/.aws && touch "$WORKPLACE"/.aws/credentials && touch "$WORKPLACE"/.aws/config &&\
echo "export AWS_SHARED_CREDENTIALS_FILE=$WORKPLACE/.aws/credentials"
echo "export AWS_CONFIG_FILE=$WORKPLACE/.aws/config"
echo "export AWS_SDK_LOAD_CONFIG=1"
aws configure
popd || exit
fi
echo "export AWS_SHARED_CREDENTIALS_FILE=$WORKPLACE/.aws/credentials" >> ~/.bashrc
echo "export AWS_CONFIG_FILE=$WORKPLACE/.aws/config" >> ~/.bashrc
echo "export AWS_SDK_LOAD_CONFIG=1" >> ~/.bashrc