Skip to content

Commit 0ca31bd

Browse files
PensuKiran Mova
authored andcommitted
feat(build): Adding ppc64le build for linux-utils
Signed-off-by: Peeyush Gupta <[email protected]>
1 parent 6632a6b commit 0ca31bd

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

.travis.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,31 @@ jobs:
1919
- IMAGE_REPO="linux-utils-arm64"
2020
- TRIVYARCH="ARM64"
2121
- RELEASE_TAG_DOWNSTREAM=0
22+
- os: linux
23+
arch: ppc64le
24+
env:
25+
- IMAGE_REPO="linux-utils-ppc64le"
26+
- RELEASE_TAG_DOWNSTREAM=0
2227

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

3340
script:
3441
- make image
3542
- make test
36-
- ./trivy --exit-code 0 --severity HIGH --no-progress ${DIMAGE}:ci
37-
- ./trivy --exit-code 1 --severity CRITICAL --no-progress ${DIMAGE}:ci
43+
- if [ "$TRAVIS_CPU_ARCH" != "ppc64le" ]; then
44+
./trivy --exit-code 0 --severity HIGH --no-progress ${DIMAGE}:ci;
45+
./trivy --exit-code 1 --severity CRITICAL --no-progress ${DIMAGE}:ci;
46+
fi
3847
- make push
3948
# If this build is running due to travis release tag, and
4049
# this job indicates to push the release downstream, then

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ ifeq (${DIMAGE}, )
2626
XC_ARCH:=$(shell uname -m)
2727
ifeq (${XC_ARCH},aarch64)
2828
DIMAGE="openebs/linux-utils-arm64"
29+
else ifeq (${XC_ARCH},ppc64le)
30+
DIMAGE="openebs/linux-utils-ppc64le"
2931
endif
3032
export DIMAGE
3133
endif

0 commit comments

Comments
 (0)