per-platform jobs
This commit is contained in:
		
							parent
							
								
									4795defd9b
								
							
						
					
					
						commit
						c82be89c76
					
				|  | @ -1,5 +1,9 @@ | ||||||
| dist: bionic | dist: bionic | ||||||
| sudo: required | sudo: required | ||||||
|  | env: | ||||||
|  |   - DOCKER_BUILD_PLATFORM=linux/amd64 | ||||||
|  |   - DOCKER_BUILD_PLATFORM=linux/arm/v7 | ||||||
|  |   - DOCKER_BUILD_PLATFORM=linux/arm64 | ||||||
| 
 | 
 | ||||||
| before_install: | before_install: | ||||||
|   - curl -fsSL https://get.docker.com | sh |   - curl -fsSL https://get.docker.com | sh | ||||||
|  |  | ||||||
|  | @ -7,14 +7,14 @@ export DOCKER_PROJECT="democratic-csi" | ||||||
| export DOCKER_REPO="${DOCKER_ORG}/${DOCKER_PROJECT}" | export DOCKER_REPO="${DOCKER_ORG}/${DOCKER_PROJECT}" | ||||||
| 
 | 
 | ||||||
| if [[ -n "${TRAVIS_TAG}" ]]; then | if [[ -n "${TRAVIS_TAG}" ]]; then | ||||||
|   docker buildx build --progress plain --pull --push --platform linux/amd64,linux/arm/v7,linux/arm64 -t ${DOCKER_REPO}:${TRAVIS_TAG} . |   docker buildx build --progress plain --pull --push --platform "${DOCKER_BUILD_PLATFORM}" -t ${DOCKER_REPO}:${TRAVIS_TAG} . | ||||||
|   docker push ${DOCKER_REPO}:${TRAVIS_TAG} |   docker push ${DOCKER_REPO}:${TRAVIS_TAG} | ||||||
| elif [[ -n "${TRAVIS_BRANCH}" ]]; then | elif [[ -n "${TRAVIS_BRANCH}" ]]; then | ||||||
|   if [[ "${TRAVIS_BRANCH}" == "master" ]]; then |   if [[ "${TRAVIS_BRANCH}" == "master" ]]; then | ||||||
|     docker buildx build --progress plain --pull --push --platform linux/amd64,linux/arm/v7,linux/arm64 -t ${DOCKER_REPO}:latest . |     docker buildx build --progress plain --pull --push --platform "${DOCKER_BUILD_PLATFORM}" -t ${DOCKER_REPO}:latest . | ||||||
|     docker push ${DOCKER_REPO}:latest |     docker push ${DOCKER_REPO}:latest | ||||||
|   else |   else | ||||||
|     docker buildx build --progress plain --pull --push --platform linux/amd64,linux/arm/v7,linux/arm64 -t ${DOCKER_REPO}:${TRAVIS_BRANCH} . |     docker buildx build --progress plain --pull --push --platform "${DOCKER_BUILD_PLATFORM}" -t ${DOCKER_REPO}:${TRAVIS_BRANCH} . | ||||||
|     docker push ${DOCKER_REPO}:${TRAVIS_BRANCH} |     docker push ${DOCKER_REPO}:${TRAVIS_BRANCH} | ||||||
|   fi |   fi | ||||||
| else | else | ||||||
|  |  | ||||||
|  | @ -1,5 +1,7 @@ | ||||||
| FROM debian:10-slim | FROM debian:10-slim | ||||||
| 
 | 
 | ||||||
|  | ENV DEBIAN_FRONTEND=noninteractive | ||||||
|  | 
 | ||||||
| ARG TARGETPLATFORM | ARG TARGETPLATFORM | ||||||
| ARG BUILDPLATFORM | ARG BUILDPLATFORM | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue