Skip to content

Commit

Permalink
Merge pull request #324 from edsantiago/new-vms
Browse files Browse the repository at this point in the history
Let's see what we pick up this time
  • Loading branch information
edsantiago authored Jan 29, 2024
2 parents 55f939d + 71dcd86 commit c6ce03e
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 9 deletions.
2 changes: 1 addition & 1 deletion IMG_SFX
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20240102t212217z-f39f38d13
20240125t184057z-f39f38d13
23 changes: 22 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

# Default is sh, which has scripting limitations
SHELL := $(shell command -v bash;)

##### Functions #####

# Evaluates to $(1) if $(1) non-empty, otherwise evaluates to $(2)
Expand Down Expand Up @@ -124,10 +127,28 @@ help: ## Default target, parses special in-line comments as documentation.
# There are length/character limitations (a-z, 0-9, -) in GCE for image
# names and a max-length of 63.
.PHONY: IMG_SFX
IMG_SFX: ## Generate a new date-based image suffix, store in the file IMG_SFX
IMG_SFX: timebomb-check ## Generate a new date-based image suffix, store in the file IMG_SFX
$(file >$@,$(shell date --utc +%Y%m%dt%H%M%Sz)-f$(FEDORA_RELEASE)f$(PRIOR_FEDORA_RELEASE)d$(subst .,,$(DEBIAN_RELEASE)))
@echo "$(file <IMG_SFX)"

# Prevent us from wasting CI time when we have expired timebombs
.PHONY: timebomb-check
timebomb-check:
@now=$$(date +%Y%m%d); \
found=; \
while read -r bomb; do \
when=$$(echo "$$bomb" | awk '{print $$2}'); \
if [ $$when -lt $$now ]; then \
echo "$$bomb"; \
found=found; \
fi; \
done < <(git grep --line-number '^[ ]*timebomb '); \
if [[ -n "$$found" ]]; then \
echo ""; \
echo "****** FATAL: Please check/fix expired timebomb(s) ^^^^^^"; \
false; \
fi

.PHONY: IMPORT_IMG_SFX
IMPORT_IMG_SFX: ## Generate a new date-based import-image suffix, store in the file IMPORT_IMG_SFX
$(file >$@,$(shell date --utc +%Y%m%dt%H%M%Sz)-f$(FEDORA_RELEASE)f$(PRIOR_FEDORA_RELEASE)d$(subst .,,$(DEBIAN_RELEASE)))
Expand Down
6 changes: 4 additions & 2 deletions base_images/debian_base-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ echo "Updating package source lists"
#
# FIXME: 2024-01-02: Bumped the timebomb expiration date because it's
# too hard to find out if it's fixed or not
timebomb 20240110 "workaround for updating debian 12 to 13"
# 2024-01-25: again
timebomb 20240131 "workaround for updating debian 12 to 13"
$SUDO tee /usr/bin/version_find_latest <<"EOF"
#!/bin/bash
#
Expand Down Expand Up @@ -140,7 +141,8 @@ $SUDO chmod 755 /usr/bin/version_find_latest
# which has the horrible duplicate-path bug:
# https://github.com/containers/podman/issues/19407
# https://bugzilla.redhat.com/show_bug.cgi?id=2230127
timebomb 20240110 "prevent us from getting broken tar-1.35+dfsg-2"
# 2024-01-25 dfsg-3 also has the bug
timebomb 20240131 "prevent us from getting broken tar-1.35+dfsg-3"
( set -x; $SUDO apt-mark hold tar; )

echo "Upgrading to SID"
Expand Down
9 changes: 4 additions & 5 deletions get_ci_vm/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

# This script is intended to be executed as part of the container
# image build process. Using it under any other context is virtually
# guarantied to cause you much pain and suffering.
# guaranteed to cause you much pain and suffering.

set -eo pipefail
set -xeo pipefail

SCRIPT_FILEPATH=$(realpath "${BASH_SOURCE[0]}")
SCRIPT_DIRPATH=$(dirname "$SCRIPT_FILEPATH")
Expand All @@ -14,6 +14,7 @@ source "$REPO_DIRPATH/lib.sh"

declare -a PKGS
PKGS=( \
aws-cli
coreutils
curl
gawk
Expand All @@ -30,9 +31,7 @@ apk upgrade
apk add --no-cache "${PKGS[@]}"
rm -rf /var/cache/apk/*

pip3 install --upgrade pip
pip3 install --no-cache-dir awscli
aws --version # Confirm it actually runs
aws --version # Confirm that aws actually runs

install_automation_tooling cirrus-ci_env

Expand Down

0 comments on commit c6ce03e

Please sign in to comment.