-
Notifications
You must be signed in to change notification settings - Fork 17
/
build-push_packaging.sh
45 lines (34 loc) · 1.25 KB
/
build-push_packaging.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
# This script is called from build-push_setup.sh by packer. It's not intended
# to be used outside of those contexts. It assumes the lib.sh library has
# already been sourced, and that all "ground-up" package-related activity
# needs to be done, including repository setup and initial update.
set -e
SCRIPT_FILEPATH=$(realpath "$0")
SCRIPT_DIRPATH=$(dirname "$SCRIPT_FILEPATH")
REPO_DIRPATH=$(realpath "$SCRIPT_DIRPATH/../")
# shellcheck source=./lib.sh
source "$REPO_DIRPATH/lib.sh"
# packer and/or a --build-arg define this envar value uniformly
# for both VM and container image build workflows.
req_env_vars PACKER_BUILD_NAME
msg "Updating/Installing repos and packages for $OS_REL_VER"
bigto ooe.sh $SUDO dnf update -y
INSTALL_PACKAGES=(\
buildah
git
jq
podman
python3-pip
qemu-user-static
skopeo
unzip
)
echo "Installing general build/test dependencies"
bigto $SUDO dnf install -y "${INSTALL_PACKAGES[@]}"
# It was observed in F33, dnf install doesn't always get you the latest/greatest
lilto $SUDO dnf update -y
# Re-install would append to this, making a mess.
$SUDO rm -f /etc/automation_environment
# Re-install the latest version with the 'build-push' component
install_automation_tooling latest build-push