Skip to content

Commit

Permalink
add gcr/gcp docker helper (#646)
Browse files Browse the repository at this point in the history
* add gcr/gcp docker helper

* Update environment/setup.sh

Co-authored-by: Helio Machado <[email protected]>

* Update golden files, cleanup whitespace.

Co-authored-by: Helio Machado <[email protected]>
Co-authored-by: Domas Monkus <[email protected]>
  • Loading branch information
3 people authored Aug 25, 2022
1 parent 823ab13 commit 1e888fb
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
5 changes: 4 additions & 1 deletion environment/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ echo "APT::Get::Assume-Yes \"true\";" | sudo tee -a /etc/apt/apt.conf.d/90assume

sudo apt remove unattended-upgrades
systemctl disable apt-daily-upgrade.service

FILE=/var/log/cml_stack.log
if [ ! -f "$FILE" ]; then
sudo add-apt-repository universe -y
Expand All @@ -21,6 +21,9 @@ if [ ! -f "$FILE" ]; then
sudo curl --max-time 10 --output /usr/bin/docker-credential-ecr-login https://amazon-ecr-credential-helper-releases.s3.us-east-2.amazonaws.com/0.5.0/linux-amd64/docker-credential-ecr-login
sudo chmod a+x /usr/bin/docker-credential-ecr-login

curl --max-time 10 --location https://github.com/GoogleCloudPlatform/docker-credential-gcr/releases/download/v2.1.5/docker-credential-gcr_linux_amd64-2.1.5.tar.gz | sudo tar xz docker-credential-gcr
sudo mv docker-credential-gcr /usr/bin/docker-credential-gcr

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 update && sudo apt-get install -y terraform
Expand Down
5 changes: 4 additions & 1 deletion iterative/testdata/script_template_cloud_aws.golden
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ echo "APT::Get::Assume-Yes \"true\";" | sudo tee -a /etc/apt/apt.conf.d/90assume

sudo apt remove unattended-upgrades
systemctl disable apt-daily-upgrade.service

FILE=/var/log/cml_stack.log
if [ ! -f "$FILE" ]; then
sudo add-apt-repository universe -y
Expand All @@ -22,6 +22,9 @@ if [ ! -f "$FILE" ]; then
sudo curl --max-time 10 --output /usr/bin/docker-credential-ecr-login https://amazon-ecr-credential-helper-releases.s3.us-east-2.amazonaws.com/0.5.0/linux-amd64/docker-credential-ecr-login
sudo chmod a+x /usr/bin/docker-credential-ecr-login

curl --max-time 10 --location https://github.com/GoogleCloudPlatform/docker-credential-gcr/releases/download/v2.1.5/docker-credential-gcr_linux_amd64-2.1.5.tar.gz | sudo tar xz docker-credential-gcr
sudo mv docker-credential-gcr /usr/bin/docker-credential-gcr

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 update && sudo apt-get install -y terraform
Expand Down
5 changes: 4 additions & 1 deletion iterative/testdata/script_template_cloud_azure.golden
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ echo "APT::Get::Assume-Yes \"true\";" | sudo tee -a /etc/apt/apt.conf.d/90assume

sudo apt remove unattended-upgrades
systemctl disable apt-daily-upgrade.service

FILE=/var/log/cml_stack.log
if [ ! -f "$FILE" ]; then
sudo add-apt-repository universe -y
Expand All @@ -22,6 +22,9 @@ if [ ! -f "$FILE" ]; then
sudo curl --max-time 10 --output /usr/bin/docker-credential-ecr-login https://amazon-ecr-credential-helper-releases.s3.us-east-2.amazonaws.com/0.5.0/linux-amd64/docker-credential-ecr-login
sudo chmod a+x /usr/bin/docker-credential-ecr-login

curl --max-time 10 --location https://github.com/GoogleCloudPlatform/docker-credential-gcr/releases/download/v2.1.5/docker-credential-gcr_linux_amd64-2.1.5.tar.gz | sudo tar xz docker-credential-gcr
sudo mv docker-credential-gcr /usr/bin/docker-credential-gcr

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 update && sudo apt-get install -y terraform
Expand Down
5 changes: 4 additions & 1 deletion iterative/testdata/script_template_cloud_gcp.golden
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ echo "APT::Get::Assume-Yes \"true\";" | sudo tee -a /etc/apt/apt.conf.d/90assume

sudo apt remove unattended-upgrades
systemctl disable apt-daily-upgrade.service

FILE=/var/log/cml_stack.log
if [ ! -f "$FILE" ]; then
sudo add-apt-repository universe -y
Expand All @@ -22,6 +22,9 @@ if [ ! -f "$FILE" ]; then
sudo curl --max-time 10 --output /usr/bin/docker-credential-ecr-login https://amazon-ecr-credential-helper-releases.s3.us-east-2.amazonaws.com/0.5.0/linux-amd64/docker-credential-ecr-login
sudo chmod a+x /usr/bin/docker-credential-ecr-login

curl --max-time 10 --location https://github.com/GoogleCloudPlatform/docker-credential-gcr/releases/download/v2.1.5/docker-credential-gcr_linux_amd64-2.1.5.tar.gz | sudo tar xz docker-credential-gcr
sudo mv docker-credential-gcr /usr/bin/docker-credential-gcr

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 update && sudo apt-get install -y terraform
Expand Down
5 changes: 4 additions & 1 deletion iterative/testdata/script_template_cloud_invalid.golden
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ echo "APT::Get::Assume-Yes \"true\";" | sudo tee -a /etc/apt/apt.conf.d/90assume

sudo apt remove unattended-upgrades
systemctl disable apt-daily-upgrade.service

FILE=/var/log/cml_stack.log
if [ ! -f "$FILE" ]; then
sudo add-apt-repository universe -y
Expand All @@ -22,6 +22,9 @@ if [ ! -f "$FILE" ]; then
sudo curl --max-time 10 --output /usr/bin/docker-credential-ecr-login https://amazon-ecr-credential-helper-releases.s3.us-east-2.amazonaws.com/0.5.0/linux-amd64/docker-credential-ecr-login
sudo chmod a+x /usr/bin/docker-credential-ecr-login

curl --max-time 10 --location https://github.com/GoogleCloudPlatform/docker-credential-gcr/releases/download/v2.1.5/docker-credential-gcr_linux_amd64-2.1.5.tar.gz | sudo tar xz docker-credential-gcr
sudo mv docker-credential-gcr /usr/bin/docker-credential-gcr

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 update && sudo apt-get install -y terraform
Expand Down

0 comments on commit 1e888fb

Please sign in to comment.