mirror of
https://github.com/bitnami/minideb.git
synced 2026-06-04 10:13:55 +08:00
fix jessie builds and repo digest fetch command
This commit is contained in:
+24
-5
@@ -79,16 +79,35 @@ jobs:
|
||||
for DIST in $DISTS ; do
|
||||
sudo docker manifest create $BASENAME:$DIST $BASENAME:$DIST-amd64 $BASENAME:$DIST-arm64
|
||||
sudo docker manifest push $BASENAME:$DIST
|
||||
sudo docker pull $BASENAME:$DIST
|
||||
|
||||
if [[ "$DISTS_WITH_SNAPSHOT" =~ (^|[[:space:]])"$DIST"($|[[:space:]]) ]] ; then
|
||||
SNAPSHOT_NAME="$DIST-snapshot-$(./snapshot_id)"
|
||||
sudo docker manifest create $SNAPSHOT_NAME:$DIST $SNAPSHOT_NAME:$DIST-amd64 $SNAPSHOT_NAME:$DIST-arm64
|
||||
sudo docker manifest push $SNAPSHOT_NAME:$DIST
|
||||
sudo docker pull $SNAPSHOT_NAME:$DIST
|
||||
sudo docker manifest create $BASENAME:$SNAPSHOT_NAME $BASENAME:$SNAPSHOT_NAME-amd64 $BASENAME:$SNAPSHOT_NAME-arm64
|
||||
sudo docker manifest push $BASENAME:$SNAPSHOT_NAME
|
||||
fi
|
||||
|
||||
# Use '.RepoDigests 0' for getting Dockerhub repo digest as it was the first pushed
|
||||
DIST_REPO_DIGEST=$(docker image inspect --format '{{index .RepoDigests 0}}' "$BASENAME:${DIST}")
|
||||
DIST_REPO_DIGEST="$BASENAME"@$(docker manifest inspect "$BASENAME:${DIST}" | jq -r .manifests[0].digest)
|
||||
update_minideb_derived "https://github.com/$BASENAME-runtimes" "$DIST" "$DIST_REPO_DIGEST"
|
||||
done
|
||||
- stage: deploy
|
||||
if: branch = master AND type = push
|
||||
env:
|
||||
- DIST="jessie"
|
||||
before_install: mkdir $HOME/.docker
|
||||
install: 'echo "{ \"experimental\": \"enabled\" }" > $HOME/.docker/config.json'
|
||||
script:
|
||||
- |
|
||||
if [ -n "${DOCKER_PASSWORD:-}" ]; then
|
||||
docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"
|
||||
fi
|
||||
|
||||
# Create and merge a PR to update minideb-extras
|
||||
CIRCLE_CI_FUNCTIONS_URL=${CIRCLE_CI_FUNCTIONS_URL:-https://raw.githubusercontent.com/bitnami/test-infra/master/circle/functions}
|
||||
source <(curl -sSL "$CIRCLE_CI_FUNCTIONS_URL")
|
||||
sudo docker manifest create $BASENAME:$DIST $BASENAME:$DIST-amd64
|
||||
sudo docker manifest push $BASENAME:$DIST
|
||||
|
||||
# Use '.RepoDigests 0' for getting Dockerhub repo digest as it was the first pushed
|
||||
DIST_REPO_DIGEST="$BASENAME"@$(docker manifest inspect "$BASENAME:${DIST}" | jq -r .manifests[0].digest)
|
||||
update_minideb_derived "https://github.com/$BASENAME-runtimes" "$DIST" "$DIST_REPO_DIGEST"
|
||||
|
||||
@@ -47,14 +47,14 @@ build() {
|
||||
|
||||
debian_snapshot_id=${3:-}
|
||||
if [ -n "$debian_snapshot_id" ]; then
|
||||
TAG="${DIST}-snapshot-${debian_snapshot_id}"
|
||||
TAG="${DIST}-snapshot-${debian_snapshot_id}-$PLATFORM"
|
||||
else
|
||||
TAG=$DIST
|
||||
TAG=$DIST-$PLATFORM
|
||||
fi
|
||||
|
||||
[ -f "debootstrap/$DIST" ] || (echo "buildall: Unknown distribution: $DIST" && exit 1)
|
||||
current_ts="$(date -u +%Y-%m-%dT%H:%M:%S.%NZ)"
|
||||
if docker pull "$BASENAME:$TAG" > /dev/null; then
|
||||
if docker pull "$BASENAME:$TAG-$PLATFORM" > /dev/null; then
|
||||
target_ts="$(docker inspect "$BASENAME:$TAG" | jq --raw-output ".[0].Created")"
|
||||
pulled_image_id="$(docker inspect "$BASENAME:$TAG" | jq --raw-output ".[0].Id")"
|
||||
else
|
||||
|
||||
@@ -53,7 +53,7 @@ desc "Checking that the terminfo is valid when running with -t (#17)"
|
||||
echo "" | test_extra_args '-t' bash -c 'install_packages procps && top -d1 -n1 -b'
|
||||
|
||||
MYSQL_PACKAGE=default-mysql-server
|
||||
if [ "jessie" == "$DIST" ]; then
|
||||
if [[ "$DIST" == "jessie"* ]]; then
|
||||
MYSQL_PACKAGE=mysql-server
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user