Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cirrus: Add packages that provide htpasswd #6822

Merged
merged 3 commits into from
Jul 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ env:
UBUNTU_NAME: "ubuntu-20"
PRIOR_UBUNTU_NAME: "ubuntu-19"

_BUILT_IMAGE_SUFFIX: "libpod-6508632441356288"
_BUILT_IMAGE_SUFFIX: "podman-5869602141896704"
FEDORA_CACHE_IMAGE_NAME: "${FEDORA_NAME}-${_BUILT_IMAGE_SUFFIX}"
PRIOR_FEDORA_CACHE_IMAGE_NAME: "${PRIOR_FEDORA_NAME}-${_BUILT_IMAGE_SUFFIX}"
UBUNTU_CACHE_IMAGE_NAME: "${UBUNTU_NAME}-${_BUILT_IMAGE_SUFFIX}"
Expand Down
4 changes: 3 additions & 1 deletion contrib/cirrus/packer/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ PACKER_DIST_FILENAME := packer_${PACKER_VER}_linux_${GOARCH}.zip

# Only needed for libpod_base_images target
TIMESTAMP := $(shell date +%s)
GOSRC ?= $(shell realpath "./../../../")
GOPATH ?= /var/tmp/go
GOSRC ?= $(GOPATH)/src/github.com/containers/libpod
PACKER_BASE ?= contrib/cirrus/packer
SCRIPT_BASE ?= contrib/cirrus
POST_MERGE_BUCKET_SUFFIX ?=
Expand Down Expand Up @@ -54,6 +55,7 @@ libpod_images: guard-PACKER_BUILDS libpod_images.json packer
./packer build \
-force \
$(shell test -z "${PACKER_BUILDS}" || echo "-only=${PACKER_BUILDS}") \
-var GOPATH=$(GOPATH) \
-var GOSRC=$(GOSRC) \
-var PACKER_BASE=$(PACKER_BASE) \
-var SCRIPT_BASE=$(SCRIPT_BASE) \
Expand Down
5 changes: 5 additions & 0 deletions contrib/cirrus/packer/fedora_packaging.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ INSTALL_PACKAGES=(\
gpgme-devel
grubby
hostname
httpd-tools
iproute
iptables
jq
Expand Down Expand Up @@ -168,5 +169,9 @@ fi
echo "Installing runtime tooling"
# Save some runtime by having these already available
cd $GOSRC
# Required since initially go was not installed
source $GOSRC/$SCRIPT_BASE/lib.sh
echo "Go environment has been setup:"
go env
$SUDO make install.tools
$SUDO $GOSRC/hack/install_catatonit.sh
12 changes: 10 additions & 2 deletions contrib/cirrus/packer/libpod_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# All of these are required
variables:
BUILT_IMAGE_SUFFIX: '{{env `BUILT_IMAGE_SUFFIX`}}'
GOPATH: '{{env `GOPATH`}}'
GOSRC: '{{env `GOSRC`}}'
PACKER_BASE: '{{env `PACKER_BASE`}}'
SCRIPT_BASE: '{{env `SCRIPT_BASE`}}'
Expand Down Expand Up @@ -62,15 +63,22 @@ builders:

# The brains of the operation, making actual modifications to the base-image.
provisioners:
- type: 'shell'
inline:
- 'set -ex'
# The 'file' provisioner item (below) will create the final component
- 'mkdir -vp $(dirname {{user `GOSRC`}})'

- type: 'file'
source: '{{user `GOSRC`}}'
destination: '/tmp/libpod'
destination: '{{user `GOSRC`}}'

- type: 'shell'
script: '{{user `GOSRC`}}/{{user `PACKER_BASE`}}/{{split build_name "-" 0}}_setup.sh'
environment_vars:
- 'PACKER_BUILDER_NAME={{build_name}}'
- 'GOSRC=/tmp/libpod'
- 'GOPATH={{user `GOPATH`}}'
- 'GOSRC={{user `GOSRC`}}'
- 'PACKER_BASE={{user `PACKER_BASE`}}'
- 'SCRIPT_BASE={{user `SCRIPT_BASE`}}'

Expand Down
6 changes: 6 additions & 0 deletions contrib/cirrus/packer/ubuntu_packaging.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ ooe.sh curl -L -o /tmp/Release.key "https://download.opensuse.org/repositories/d
ooe.sh $SUDO apt-key add - < /tmp/Release.key

INSTALL_PACKAGES=(\
apache2-utils
apparmor
aufs-tools
autoconf
Expand Down Expand Up @@ -153,7 +154,12 @@ if [[ ${#DOWNLOAD_PACKAGES[@]} -gt 0 ]]; then
fi

echo "Installing runtime tooling"
# Save some runtime by having these already available
cd $GOSRC
# Required since initially go was not installed
source $GOSRC/$SCRIPT_BASE/lib.sh
echo "Go environment has been setup:"
go env
$SUDO hack/install_catatonit.sh
$SUDO make install.libseccomp.sudo
$SUDO make install.tools