Skip to content

Commit

Permalink
yum
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryosuke Tomita committed Dec 17, 2023
1 parent c3c9f28 commit 8159ed2
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions copilot/pipelines/react-app-pipeline/buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,21 @@ phases:
- wget -q https://ecs-cli-v2-release.s3.amazonaws.com/copilot-linux-v1.32.0 -O copilot-linux
- chmod +x ./copilot-linux
# Download trivy. https://aquasecurity.github.io/trivy/v0.48/getting-started/installation/
- apt-get update
- apt-get install -y wget apt-transport-https gnupg lsb-release
- wget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | gpg --dearmor | tee /usr/share/keyrings/trivy.gpg > /dev/null
- echo "deb [signed-by=/usr/share/keyrings/trivy.gpg] https://aquasecurity.github.io/trivy-repo/deb $(lsb_release -sc) main" | tee -a /etc/apt/sources.list.d/trivy.list
- apt-get update
- apt-get install -y trivy
- echo "install trivy"
- RELEASE_VERSION=$(grep -Po '(?<=VERSION_ID=")[0-9]' /etc/os-release)
- cat << EOF | sudo tee -a /etc/yum.repos.d/trivy.repo
[trivy]
name=Trivy repository
baseurl=https://aquasecurity.github.io/trivy-repo/rpm/releases/$RELEASE_VERSION/\$basearch/
gpgcheck=1
enabled=1
gpgkey=https://aquasecurity.github.io/trivy-repo/rpm/public.key
EOF
- yum -y update
- yum -y install trivy
- chmod +x trivy


build:
commands:
- echo "Run your tests"
Expand Down

0 comments on commit 8159ed2

Please sign in to comment.