Skip to content
This repository has been archived by the owner on Sep 3, 2022. It is now read-only.

build: binaries for IBM Z (s390x) architecture #189

Merged
merged 5 commits into from
Jan 25, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 40 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,53 @@ jobs:
on:
tags: true
condition: ${TRAVIS_TAG} =~ ^[0-9]+\.[0-9]+\.[0-9]+$


- name: building s390x image
arch: s390x
script:
# Audit npm packages. Fail build whan a PR audit fails, otherwise report the vulnerability and proceed.
- if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then npm audit; else npm audit || true; fi
- npm test
- if [[ $TRAVIS_TAG =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then npm version --no-git-tag-version "${TRAVIS_TAG}"; fi
- docker build --rm -t "quay.io/razee/remoteresources3:${TRAVIS_COMMIT}-s390x" .
- if [ -n "${TRAVIS_TAG}" ]; then docker tag quay.io/razee/remoteresources3:${TRAVIS_COMMIT}-s390x quay.io/razee/remoteresources3:${TRAVIS_TAG}-s390x; fi
- docker images
- ./build/process-template.sh kubernetes/RemoteResourceS3/resource.yaml >/tmp/resource.yaml

before_deploy:
- docker login -u="${QUAY_ID}" -p="${QUAY_TOKEN}" quay.io

deploy:
# Deploy alpha builds
- provider: script
script: docker push "quay.io/razee/remoteresources3:${TRAVIS_TAG}-s390x"
skip_cleanup: true
on:
tags: true
condition: ${TRAVIS_TAG} =~ ^[0-9]+\.[0-9]+\.[0-9]+_[0-9]{3}$

# Deploy released builds
- provider: script
script: docker push "quay.io/razee/remoteresources3:${TRAVIS_TAG}-s390x"
skip_cleanup: true
on:
tags: true
condition: ${TRAVIS_TAG} =~ ^[0-9]+\.[0-9]+\.[0-9]+$

- stage: publish multi-arch image, npm & github release
arch: amd64
script:
- if [[ $TRAVIS_TAG =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then npm version --no-git-tag-version "${TRAVIS_TAG}"; fi
- ./build/process-template.sh kubernetes/RemoteResourceS3/resource.yaml >/tmp/resource.yaml
- export DOCKER_CLI_EXPERIMENTAL=enabled
- sudo chown -R $USER:$USER /etc/docker/
- if [ -n "${TRAVIS_TAG}" ]; then docker manifest create quay.io/razee/remoteresources3:${TRAVIS_TAG} quay.io/razee/remoteresources3:${TRAVIS_TAG}-amd64 quay.io/razee/remoteresources3:${TRAVIS_TAG}-ppc64le; fi
- |
if [ -n "${TRAVIS_TAG}" ]; then
docker manifest create quay.io/razee/remoteresources3:${TRAVIS_TAG} \
quay.io/razee/remoteresources3:${TRAVIS_TAG}-amd64 \
quay.io/razee/remoteresources3:${TRAVIS_TAG}-ppc64le \
quay.io/razee/remoteresources3:${TRAVIS_TAG}-s390x
fi

before_deploy:
- docker login -u="${QUAY_ID}" -p="${QUAY_TOKEN}" quay.io
Expand Down