Skip to content
This repository has been archived by the owner on Jul 2, 2023. It is now read-only.

Commit

Permalink
#21
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill Wang committed Oct 12, 2022
1 parent d18de00 commit 21649c6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ dist: bionic

env:
- CI_NAME=travis DOCKER_CLI_EXPERIMENTAL=enabled
- rebuild="failed"
- imageName="socat"

before_install:
- sudo rm -rf /var/lib/apt/lists/*
Expand All @@ -16,6 +18,6 @@ before_install:
- docker run --rm --privileged multiarch/qemu-user-static:register --reset

script:
- docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"
- docker version
- bash ./build.sh
- bash ./build.sh ${rebuild}
- docker run -ti --rm -v /var/run/docker.sock:/var/run/docker.sock -v ~/.cache:/root/.cache aquasec/trivy image --severity HIGH,CRITICAL alpine/${imageName}
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ do
fi
done

if [[ ( $sum -ne 1 ) || ( $1 == "rebuild" ) ]];then
if [[ ( $sum -ne 1 ) || ( $1 == "true" ) ]];then
docker build --build-arg VERSION=${latest} --no-cache -t ${image}:${latest} .

if [[ "$TRAVIS_BRANCH" == "master" ]]; then
Expand Down

0 comments on commit 21649c6

Please sign in to comment.