Skip to content

Commit

Permalink
move to script
Browse files Browse the repository at this point in the history
  • Loading branch information
jesusfcr committed Feb 16, 2023
1 parent e22ab9f commit 321a5b2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
5 changes: 1 addition & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ env:
- PLATFORMS="linux/amd64 linux/arm64"
- ARM64_EXCLUDE="(prowler|semgrep|zap)" # Regex with the check names to exclude from arm64 build
go_import_path: github.com/adevinta/vulcan-checks
before_deploy:
- sudo mkdir -m 0755 -p /etc/apt/keyrings && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
- echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
- sudo apt-get update && sudo apt-get install docker-buildx-plugin
before_deploy: _scripts/setup_buildx.sh
deploy:
- provider: script
script: bash release.sh
Expand Down
14 changes: 14 additions & 0 deletions _scripts/setup_buildx.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

set -e

if docker buildx version; then
exit 0
fi

sudo mkdir -m 0755 -p /etc/apt/keyrings && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg &&
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null &&
sudo apt-get update
sudo apt-get install docker-buildx-plugin

docker buildx version

0 comments on commit 321a5b2

Please sign in to comment.