Skip to content

Instantly share code, notes, and snippets.

@zhilyaev
Last active January 22, 2020 14:41
Show Gist options
  • Select an option

  • Save zhilyaev/f5a6dd60d8d2567ab06540a769be8cb5 to your computer and use it in GitHub Desktop.

Select an option

Save zhilyaev/f5a6dd60d8d2567ab06540a769be8cb5 to your computer and use it in GitHub Desktop.
chicken-or-egg
#!/usr/bin/env bash
for repo in $(curl "https://gitlab.com/api/v4/groups/6969791/projects&include_subgroups=true" | jq '.[].ssh_url_to_repo' | tr -d '"'); do
dir=$(echo $repo | awk -F ":" '{print substr($2, 1, length($2)-4)}')
mkdir -p $dir
git clone $repo $dir
done
cd chicken-or-egg/iac/make
echo "# AWS" > .env
echo "AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID" >> .env
echo "AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY" >> .env
echo "AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION" >> .env
make all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment