mirror of
https://github.com/minio/minio.git
synced 2025-10-29 07:45:02 -04:00
update scripts pointing to internal registry for community releases
This commit is contained in:
parent
9e49d5e7a6
commit
05e569960a
@ -1,8 +1,14 @@
|
|||||||
FROM minio/minio:latest
|
FROM minio/minio:latest
|
||||||
|
|
||||||
|
ARG TARGETARCH
|
||||||
|
ARG RELEASE
|
||||||
|
|
||||||
RUN chmod -R 777 /usr/bin
|
RUN chmod -R 777 /usr/bin
|
||||||
|
|
||||||
COPY ./minio /usr/bin/minio
|
COPY ./minio-${TARGETARCH}.${RELEASE} /usr/bin/minio
|
||||||
|
COPY ./minio-${TARGETARCH}.${RELEASE}.minisig /usr/bin/minio.minisig
|
||||||
|
COPY ./minio-${TARGETARCH}.${RELEASE}.sha256sum /usr/bin/minio.sha256sum
|
||||||
|
|
||||||
COPY dockerscripts/docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
|
COPY dockerscripts/docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"]
|
ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"]
|
||||||
|
|||||||
@ -1,37 +1,69 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
sudo sysctl net.ipv6.conf.all.disable_ipv6=0
|
set -ex
|
||||||
|
|
||||||
remote=$(git remote get-url upstream)
|
function _init() {
|
||||||
if test "$remote" != "git@github.com:minio/minio.git"; then
|
## All binaries are static make sure to disable CGO.
|
||||||
echo "Script requires that the 'upstream' remote is set to git@github.com:minio/minio.git"
|
export CGO_ENABLED=0
|
||||||
exit 1
|
export CRED_DIR="/media/${USER}/minio"
|
||||||
fi
|
|
||||||
|
|
||||||
git remote update upstream && git checkout master && git rebase upstream/master
|
## List of architectures and OS to test coss compilation.
|
||||||
|
SUPPORTED_OSARCH="linux/ppc64le linux/amd64 linux/arm64"
|
||||||
|
|
||||||
release=$(git describe --abbrev=0 --tags)
|
remote=$(git remote get-url upstream)
|
||||||
|
if test "$remote" != "git@github.com:minio/minio.git"; then
|
||||||
|
echo "Script requires that the 'upstream' remote is set to git@github.com:minio/minio.git"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
docker buildx build --push --no-cache \
|
git remote update upstream && git checkout master && git rebase upstream/master
|
||||||
--build-arg RELEASE="${release}" \
|
|
||||||
-t "minio/minio:latest" \
|
|
||||||
-t "minio/minio:latest-cicd" \
|
|
||||||
-t "quay.io/minio/minio:latest" \
|
|
||||||
-t "quay.io/minio/minio:latest-cicd" \
|
|
||||||
-t "minio/minio:${release}" \
|
|
||||||
-t "quay.io/minio/minio:${release}" \
|
|
||||||
--platform=linux/arm64,linux/amd64,linux/ppc64le \
|
|
||||||
-f Dockerfile.release .
|
|
||||||
|
|
||||||
docker buildx prune -f
|
release=$(git describe --abbrev=0 --tags)
|
||||||
|
export release
|
||||||
|
}
|
||||||
|
|
||||||
docker buildx build --push --no-cache \
|
function _build() {
|
||||||
--build-arg RELEASE="${release}" \
|
local osarch=$1
|
||||||
-t "minio/minio:${release}-cpuv1" \
|
IFS=/ read -r -a arr <<<"$osarch"
|
||||||
-t "quay.io/minio/minio:${release}-cpuv1" \
|
os="${arr[0]}"
|
||||||
--platform=linux/arm64,linux/amd64,linux/ppc64le \
|
arch="${arr[1]}"
|
||||||
-f Dockerfile.release.old_cpu .
|
package=$(go list -f '{{.ImportPath}}')
|
||||||
|
printf -- "--> %15s:%s\n" "${osarch}" "${package}"
|
||||||
|
|
||||||
docker buildx prune -f
|
# go build -trimpath to build the binary.
|
||||||
|
export GOOS=$os
|
||||||
|
export GOARCH=$arch
|
||||||
|
export MINIO_RELEASE=RELEASE
|
||||||
|
LDFLAGS=$(go run buildscripts/gen-ldflags.go)
|
||||||
|
go build -tags kqueue -trimpath --ldflags "${LDFLAGS}" -o ./minio-${arch}.${release}
|
||||||
|
minisign -qQSm ./minio-${arch}.${release} -s "$CRED_DIR/minisign.key" <"$CRED_DIR/minisign-passphrase"
|
||||||
|
|
||||||
sudo sysctl net.ipv6.conf.all.disable_ipv6=0
|
sha256sum_str=$(sha256sum <./minio-${arch}.${release})
|
||||||
|
rc=$?
|
||||||
|
if [ "$rc" -ne 0 ]; then
|
||||||
|
abort "unable to generate sha256sum for ${1}"
|
||||||
|
fi
|
||||||
|
echo "${sha256sum_str// -/minio.${release}}" >./minio-${arch}.${release}.sha256sum
|
||||||
|
}
|
||||||
|
|
||||||
|
function main() {
|
||||||
|
echo "Testing builds for OS/Arch: ${SUPPORTED_OSARCH}"
|
||||||
|
for each_osarch in ${SUPPORTED_OSARCH}; do
|
||||||
|
_build "${each_osarch}"
|
||||||
|
done
|
||||||
|
|
||||||
|
sudo sysctl net.ipv6.conf.all.disable_ipv6=0
|
||||||
|
|
||||||
|
docker buildx build --push --no-cache \
|
||||||
|
--build-arg RELEASE="${release}" \
|
||||||
|
-t "registry.min.dev/community/minio:latest" \
|
||||||
|
-t "registry.min.dev/community/minio:${release}" \
|
||||||
|
--platform=linux/arm64,linux/amd64,linux/ppc64le \
|
||||||
|
-f Dockerfile .
|
||||||
|
|
||||||
|
docker buildx prune -f
|
||||||
|
|
||||||
|
sudo sysctl net.ipv6.conf.all.disable_ipv6=0
|
||||||
|
}
|
||||||
|
|
||||||
|
_init && main "$@"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user