mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-18 09:17:49 +08:00
add releases to travis
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
parent
c7c08e10dd
commit
bc0260db73
26
.travis.yml
26
.travis.yml
@ -8,12 +8,28 @@ install:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
# Temporarily disabling other platforms to keep development faster.
|
- PLATFORMS="linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x,linux/ppc64le"
|
||||||
# - PLATFORMS="linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x,linux/ppc64le"
|
- CROSS_PLATFORMS="${PLATFORMS},darwin/amd64,windows/amd64"
|
||||||
# - CROSS_PLATFORMS=${PLATFORMS},darwin/amd64,windows/amd64
|
|
||||||
- PLATFORMS="linux/amd64"
|
|
||||||
- CROSS_PLATFORMS="${PLATFORMS},darwin/amd64"
|
|
||||||
- PREFER_BUILDCTL="1"
|
- PREFER_BUILDCTL="1"
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- make binaries validate-all && TARGETPLATFORM="${CROSS_PLATFORMS}" ./hack/cross
|
- make binaries validate-all && TARGETPLATFORM="${CROSS_PLATFORMS}" ./hack/cross
|
||||||
|
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
- provider: script
|
||||||
|
script: PLATFORMS="${CROSS_PLATFORMS}" ./hack/release $TRAVIS_TAG release-out
|
||||||
|
on:
|
||||||
|
repo: docker/buildx
|
||||||
|
tags: true
|
||||||
|
condition: $TRAVIS_TAG =~ ^v[0-9]
|
||||||
|
- provider: releases
|
||||||
|
api_key:
|
||||||
|
secure: "VKVL+tyS3BfqjM4VMGHoHJbcKY4mqq4AGrclVEvBnt0gm1LkGeKxSheCZgF1EC4oSV8rCy6dkoRWL0PLkl895MIl20Z4v53o1NOQ4Fn0A+eptnrld8jYUkL5PcD+kdEqv2GkBn7vO6E/fwYY/wH9FYlE+fXUa0c/YQGqNGS+XVDtgkftqBV+F2EzaIwk+D+QClFBRmKvIbXrUQASi1K6K2eT3gvzR4zh679TSdI2nbnTKtE06xG1PBFVmb1Ux3/Jz4yHFvf2d3M1mOyqIBsozKoyxisiFQxnm3FjhPrdlZJ9oy/nsQM3ahQKJ3DF8hiLI1LxcxRa6wo//t3uu2eJSYl/c5nu0T7gVw4sChQNy52fUhEGoDTDwYoAxsLSDXcpj1jevRsKvxt/dh2e2De1a9HYj5oM+z2O+pcyiY98cKDbhe2miUqUdiYMBy24xUunB46zVcJF3pIqCYtw5ts8ES6Ixn3u+4OGV/hMDrVdiG2bOZtNVkdbKMEkOEBGa3parPJ69jh6og639kdAD3DFxyZn3YKYuJlcNShn3tj6iPokBYhlLwwf8vuEV7gK7G0rDS9yxuF03jgkwpBBF2wy+u1AbJv241T7v2ZB8H8VlYyHA0E5pnoWbw+lIOTy4IAc8gIesMvDuFFi4r1okhiAt/24U0p4aAohjh1nPuU3spY="
|
||||||
|
file: release-out/**/*
|
||||||
|
skip_cleanup: true
|
||||||
|
file_glob: true
|
||||||
|
on:
|
||||||
|
repo: docker/buildx
|
||||||
|
tags: true
|
||||||
|
condition: $TRAVIS_TAG =~ ^v[0-9]
|
32
hack/release
Executable file
32
hack/release
Executable file
@ -0,0 +1,32 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
TAG=$1
|
||||||
|
OUT=$2
|
||||||
|
|
||||||
|
set -eu -o pipefail
|
||||||
|
|
||||||
|
: ${PLATFORMS=linux/amd64}
|
||||||
|
: ${CONTINUOUS_INTEGRATION=}
|
||||||
|
|
||||||
|
progressFlag=""
|
||||||
|
if [ "$CONTINUOUS_INTEGRATION" == "true" ]; then progressFlag="--progress=plain"; fi
|
||||||
|
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
echo "usage: ./hack/release <tag> <out>"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -z "$TAG" ] || [ -z "$OUT" ]; then
|
||||||
|
usage
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
|
buildctl build $progressFlag --frontend=dockerfile.v0 \
|
||||||
|
--local context=. --local dockerfile=. \
|
||||||
|
--opt target=release \
|
||||||
|
--opt platform=$PLATFORMS \
|
||||||
|
--exporter local \
|
||||||
|
--exporter-opt output=$OUT
|
Loading…
x
Reference in New Issue
Block a user