Skip to content

Commit

Permalink
feat(build): Adding ppc64le build for linux-utils
Browse files Browse the repository at this point in the history
Signed-off-by: Peeyush Gupta <[email protected]>
  • Loading branch information
Pensu authored and kmova committed Jun 8, 2020
1 parent 6632a6b commit 0ca31bd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
19 changes: 14 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,31 @@ jobs:
- IMAGE_REPO="linux-utils-arm64"
- TRIVYARCH="ARM64"
- RELEASE_TAG_DOWNSTREAM=0
- os: linux
arch: ppc64le
env:
- IMAGE_REPO="linux-utils-ppc64le"
- RELEASE_TAG_DOWNSTREAM=0

before_install:
- if [ -z $IMAGE_ORG ]; then
IMAGE_ORG="openebs";
export IMAGE_ORG;
fi
- export DIMAGE="${IMAGE_ORG}/${IMAGE_REPO}"
- export VERSION=$(curl --silent "https://api.github.com/repos/aquasecurity/trivy/releases/latest" | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/')
- wget https://github.com/aquasecurity/trivy/releases/download/v${VERSION}/trivy_${VERSION}_Linux-${TRIVYARCH}.tar.gz
- tar zxvf trivy_${VERSION}_Linux-${TRIVYARCH}.tar.gz
- if [ "$TRAVIS_CPU_ARCH" != "ppc64le" ]; then
export VERSION=$(curl --silent "https://api.github.com/repos/aquasecurity/trivy/releases/latest" | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/');
wget https://github.com/aquasecurity/trivy/releases/download/v${VERSION}/trivy_${VERSION}_Linux-${TRIVYARCH}.tar.gz;
tar zxvf trivy_${VERSION}_Linux-${TRIVYARCH}.tar.gz;
fi

script:
- make image
- make test
- ./trivy --exit-code 0 --severity HIGH --no-progress ${DIMAGE}:ci
- ./trivy --exit-code 1 --severity CRITICAL --no-progress ${DIMAGE}:ci
- if [ "$TRAVIS_CPU_ARCH" != "ppc64le" ]; then
./trivy --exit-code 0 --severity HIGH --no-progress ${DIMAGE}:ci;
./trivy --exit-code 1 --severity CRITICAL --no-progress ${DIMAGE}:ci;
fi
- make push
# If this build is running due to travis release tag, and
# this job indicates to push the release downstream, then
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ ifeq (${DIMAGE}, )
XC_ARCH:=$(shell uname -m)
ifeq (${XC_ARCH},aarch64)
DIMAGE="openebs/linux-utils-arm64"
else ifeq (${XC_ARCH},ppc64le)
DIMAGE="openebs/linux-utils-ppc64le"
endif
export DIMAGE
endif
Expand Down

0 comments on commit 0ca31bd

Please sign in to comment.