Skip to content

Commit a9d9039

Browse files
author
Carlos Rodriguez Hernandez
committed
Remove snapshot logic
Signed-off-by: Carlos Rodriguez Hernandez <[email protected]>
1 parent 064761b commit a9d9039

File tree

10 files changed

+4
-118
lines changed

10 files changed

+4
-118
lines changed

.github/actions/build/action.yml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,6 @@ inputs:
88
is_latest:
99
description: The created dist is also latest
1010
default: false
11-
build_snapshot:
12-
description: Build snapshot build
13-
default: false
14-
outputs:
15-
snapshot-id:
16-
description: "Created snapshot id if requested to build it"
17-
value: ${{ steps.snapshot-id.outputs.snapshot-id }}
1811
runs:
1912
using: "composite"
2013
steps:
@@ -36,21 +29,11 @@ runs:
3629
echo "QEMU is not required for platform ${{ inputs.platform }}"
3730
fi
3831
shell: bash
39-
- name: Build snapshot id
40-
id: snapshot-id
41-
run: |
42-
if ${{ inputs.build_snapshot }} ; then
43-
echo "::set-output name=snapshot-id::$(./snapshot_id)"
44-
fi
45-
shell: bash
4632
- name: "Build image"
4733
run: |
4834
set -x
4935
echo Building ${{ inputs.dist }} - ${{ inputs.platform }}
5036
sudo -E bash -x buildone "${{ inputs.dist }}" "${{ inputs.platform }}"
51-
if ${{ inputs.build_snapshot }} ; then
52-
sudo -E bash -x buildone_snapshot "${{ inputs.dist }}" "${{ steps.snapshot-id.outputs.snapshot-id }}" "${{ inputs.platform }}"
53-
fi
5437
if ${{ inputs.is_latest }} ; then
5538
BASENAME=${BASENAME:?Undefined or empty BASENAME}
5639
echo "Tagging latest"

.github/workflows/main.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ on:
1717
env:
1818
BASENAME: bitnami/minideb
1919
LATEST: bullseye
20-
DIST_WITH_SNAPSHOT: buster
2120
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
2221
jobs:
2322
# This workflow contains a single job called "build"
@@ -56,7 +55,6 @@ jobs:
5655
dist: "${{ matrix.dist }}"
5756
platform: "${{ matrix.arch }}"
5857
is_latest: ${{ matrix.dist == env.LATEST }}
59-
build_snapshot: ${{ matrix.dist == env.DIST_WITH_SNAPSHOT }}
6058
- name: Push
6159
if: github.ref == 'refs/heads/master'
6260
env:
@@ -69,9 +67,6 @@ jobs:
6967
if ${{ matrix.dist == env.LATEST }} ; then
7068
bash pushone "latest" "${{ matrix.arch }}"
7169
fi
72-
if ${{ matrix.dist == env.DIST_WITH_SNAPSHOT }} ; then
73-
bash pushone "${{ matrix.dist }}-snapshot-${{ steps.build.outputs.snapshot-id }}" "${{ matrix.arch }}"
74-
fi
7570
7671
deploy_manifests:
7772
runs-on: ubuntu-22.04

buildall

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,9 @@ arch=${1:-"amd64 arm64"}
1111
dist="buster
1212
bullseye
1313
"
14-
dist_with_snapshot="buster"
15-
1614
for a in $arch; do
1715
for i in $dist; do
1816
./buildone "$i" "$a"
1917
done
2018
done
2119

22-
snapshot_id=$(./snapshot_id)
23-
if [ -n "$snapshot_id" ]; then
24-
for a in $arch; do
25-
for i in $dist_with_snapshot; do
26-
./buildone_snapshot "$i" "$snapshot_id" "$a"
27-
done
28-
29-
mkdir -p "build/$a"
30-
echo "$snapshot_id" > "build/$a/snapshot_id"
31-
done
32-
fi

buildone

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,7 @@ log() {
4444
build() {
4545
DIST=$1
4646
PLATFORM=${2:-amd64}
47-
48-
debian_snapshot_id=${3:-}
49-
if [ -n "$debian_snapshot_id" ]; then
50-
TAG="${DIST}-snapshot-${debian_snapshot_id}-$PLATFORM"
51-
else
52-
TAG=$DIST-$PLATFORM
53-
fi
47+
TAG=$DIST-$PLATFORM
5448

5549
[ -f "debootstrap/$DIST" ] || (echo "buildall: Unknown distribution: $DIST" && exit 1)
5650
current_ts="$(date -u +%Y-%m-%dT%H:%M:%S.%NZ)"
@@ -64,7 +58,7 @@ build() {
6458
log "============================================"
6559
log "Building $BASENAME:$TAG"
6660
log "============================================"
67-
./mkimage "build/$TAG.tar" "$DIST" "$PLATFORM" "${debian_snapshot_id:-}"
61+
./mkimage "build/$TAG.tar" "$DIST" "$PLATFORM"
6862
built_image_id=$(./import "build/$TAG.tar" "$target_ts" "$PLATFORM")
6963
log "============================================"
7064
log "Running tests for $BASENAME:$TAG"
@@ -73,7 +67,7 @@ build() {
7367
log "============================================"
7468
log "Rebuilding $BASENAME:$TAG to test reproducibility"
7569
log "============================================"
76-
./mkimage "build/${TAG}-repro.tar" "$DIST" "$PLATFORM" "${debian_snapshot_id:-}"
70+
./mkimage "build/${TAG}-repro.tar" "$DIST" "$PLATFORM"
7771
repro_image_id=$(./import "build/${TAG}-repro.tar" "$target_ts" "$PLATFORM")
7872
if [ "$repro_image_id" != "$built_image_id" ]; then
7973
log "$BASENAME:$TAG differs after a rebuild. Examine $built_image_id and $repro_image_id"

buildone_snapshot

Lines changed: 0 additions & 11 deletions
This file was deleted.

mkimage

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ ROOT=$(cd "$(dirname "$0")" && pwd)
88
TARGET=${1:?Specify the target filename}
99
DIST=${2:-stable}
1010
PLATFORM=${3:-$(dpkg --print-architecture)}
11-
SNAPSHOT_ID=${4:-}
1211

1312
LOGFILE=${TARGET}.log
1413

@@ -78,11 +77,6 @@ rootfs_chroot bash debootstrap/debootstrap --second-stage
7877
repo_url="http://deb.debian.org/debian"
7978
sec_repo_url="http://security.debian.org/"
8079

81-
if [ -n "$SNAPSHOT_ID" ]; then
82-
repo_url="http://snapshot.debian.org/archive/debian/${SNAPSHOT_ID}/"
83-
sec_repo_url="http://snapshot.debian.org/archive/debian-security/${SNAPSHOT_ID}/"
84-
fi
85-
8680
echo -e "deb ${repo_url} $DIST main" > "$rootfsDir/etc/apt/sources.list"
8781
if [ "$DIST" == "bullseye" ]; then
8882
echo "deb ${repo_url} $DIST-updates main" >> "$rootfsDir/etc/apt/sources.list"

pushall

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ set -o pipefail
77
DISTS="buster
88
bullseye
99
"
10-
DISTS_WITH_SNAPSHOT="buster"
1110
LATEST=bullseye
1211
BASENAME=bitnami/minideb
1312

@@ -34,15 +33,6 @@ for DIST in $DISTS; do
3433
push "$DIST"
3534
done
3635

37-
if [ -f "build/snapshot_id" ]; then
38-
snapshot_id=$(cat build/snapshot_id)
39-
40-
for DIST in $DISTS_WITH_SNAPSHOT; do
41-
TAG="${DIST}-snapshot-${snapshot_id}"
42-
push "${TAG}"
43-
done
44-
fi
45-
4636
docker tag "${BASENAME}:${LATEST}" "${BASENAME}:latest"
4737

4838
push latest

pushmanifest

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@ bullseye
99
latest
1010
"}
1111

12-
DISTS_WITH_SNAPSHOT=${DISTS_WITH_SNAPSHOT:-buster}
1312
BASENAME=bitnami/minideb
1413
PLATFORMS=${PLATFORMS:-amd64 arm64}
1514
DRY_RUN=${DRY_RUN:-}
16-
SNAPSHOT_ID=${SNAPSHOT_ID:-}
1715
read -r -a ARCHS <<<"$PLATFORMS"
1816

1917
run_docker() {
@@ -60,9 +58,6 @@ tags=()
6058

6159
for DIST in $DISTS; do
6260
tags+=("$DIST")
63-
if list_includes "$DISTS_WITH_SNAPSHOT" "$DIST" ; then
64-
tags+=("$DIST-snapshot-${SNAPSHOT_ID:-$(./snapshot_id)}")
65-
fi
6661
done
6762

6863
repositories=("$BASENAME")

qemu_build

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ fi
4949

5050
DIST=$1
5151
PLATFORM=${2:-amd64}
52-
DEBIAN_SNAPSHOT_ID=${3:-}
5352

5453
make .installed-qemu
5554
mkdir -p .kvm-images/{amd64,arm64}
@@ -145,7 +144,7 @@ do_ssh "apt-get update && apt-get install -y docker-ce docker-ce-cli containerd.
145144
rsync -avz -e "ssh -o 'StrictHostKeyChecking=no' -o 'UserKnownHostsFile=/dev/null' -p 5555 -i $pub_key_dir/id_rsa" --exclude ".git" --exclude ".installed-requirements" --exclude ".kvm-images" --exclude "build" --exclude "ssh" ./ "root@localhost:/build/."
146145
do_ssh "cd /build/ && make .installed-requirements"
147146

148-
do_ssh "cd /build/ && ./buildone \"$DIST\" \"$PLATFORM\" \"$DEBIAN_SNAPSHOT_ID\""
147+
do_ssh "cd /build/ && ./buildone \"$DIST\" \"$PLATFORM\""
149148
rsync -avz -e "ssh -o 'StrictHostKeyChecking=no' -o 'UserKnownHostsFile=/dev/null' -p 5555 -i $pub_key_dir/id_rsa" "root@localhost:/build/build/$DIST.tar" "./$TARGET_FILE"
150149

151150
current_ts="$(date -u +%Y-%m-%dT%H:%M:%S.%NZ)"

snapshot_id

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)