Compare commits
4 Commits
Author | SHA1 | Date |
---|---|---|
|
c52201038e | |
|
c5c5f59594 | |
|
705df452eb | |
|
3c1415611a |
128
.cirrus.yml
128
.cirrus.yml
|
@ -1,128 +0,0 @@
|
||||||
---
|
|
||||||
|
|
||||||
env:
|
|
||||||
DEST_BRANCH: "main"
|
|
||||||
GOPATH: "/var/tmp/go"
|
|
||||||
GOBIN: "${GOPATH}/bin"
|
|
||||||
GOCACHE: "${GOPATH}/cache"
|
|
||||||
GOSRC: "${GOPATH}/src/github.com/containers/podman"
|
|
||||||
CIRRUS_WORKING_DIR: "${GOPATH}/src/github.com/containers/podman-py"
|
|
||||||
SCRIPT_BASE: "./contrib/cirrus"
|
|
||||||
CIRRUS_SHELL: "/bin/bash"
|
|
||||||
HOME: "/root" # not set by default
|
|
||||||
|
|
||||||
####
|
|
||||||
#### Cache-image names to test with (double-quotes around names are critical)
|
|
||||||
####
|
|
||||||
FEDORA_NAME: "fedora-36"
|
|
||||||
PRIOR_FEDORA_NAME: "fedora-35"
|
|
||||||
UBUNTU_NAME: "ubuntu-2204"
|
|
||||||
|
|
||||||
# Google-cloud VM Images
|
|
||||||
IMAGE_SUFFIX: "c6193881921355776"
|
|
||||||
FEDORA_CACHE_IMAGE_NAME: "fedora-podman-py-${IMAGE_SUFFIX}"
|
|
||||||
|
|
||||||
|
|
||||||
gcp_credentials: ENCRYPTED[0c639039cdd3a9a93fac7746ea1bf366d432e5ff3303bf293e64a7ff38dee85fd445f71625fa5626dc438be2b8efe939]
|
|
||||||
|
|
||||||
|
|
||||||
# Default VM to use unless set or modified by task
|
|
||||||
gce_instance:
|
|
||||||
image_project: "libpod-218412"
|
|
||||||
zone: "us-central1-c" # Required by Cirrus for the time being
|
|
||||||
cpu: 2
|
|
||||||
memory: "4Gb"
|
|
||||||
disk: 200 # Required for performance reasons
|
|
||||||
image_name: "${FEDORA_CACHE_IMAGE_NAME}"
|
|
||||||
|
|
||||||
gating_task:
|
|
||||||
name: "Gating test"
|
|
||||||
alias: gating
|
|
||||||
|
|
||||||
# Only run this on PRs, never during post-merge testing. This is also required
|
|
||||||
# for proper setting of EPOCH_TEST_COMMIT value, required by validation tools.
|
|
||||||
only_if: $CIRRUS_PR != ""
|
|
||||||
|
|
||||||
timeout_in: 20m
|
|
||||||
|
|
||||||
env:
|
|
||||||
PATH: ${PATH}:${GOPATH}/bin
|
|
||||||
|
|
||||||
script:
|
|
||||||
- make
|
|
||||||
- make lint
|
|
||||||
|
|
||||||
test_task:
|
|
||||||
name: "Test on $FEDORA_NAME"
|
|
||||||
alias: test
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- gating
|
|
||||||
|
|
||||||
script:
|
|
||||||
- ${SCRIPT_BASE}/enable_ssh.sh
|
|
||||||
- ${SCRIPT_BASE}/build_podman.sh
|
|
||||||
- ${SCRIPT_BASE}/enable_podman.sh
|
|
||||||
- ${SCRIPT_BASE}/test.sh
|
|
||||||
|
|
||||||
latest_task:
|
|
||||||
name: "Test Podman main on $FEDORA_NAME"
|
|
||||||
alias: latest
|
|
||||||
allow_failures: true
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- gating
|
|
||||||
|
|
||||||
env:
|
|
||||||
PATH: ${PATH}:${GOPATH}/bin
|
|
||||||
|
|
||||||
script:
|
|
||||||
- ${SCRIPT_BASE}/enable_ssh.sh
|
|
||||||
- ${SCRIPT_BASE}/build_podman.sh
|
|
||||||
- ${SCRIPT_BASE}/enable_podman.sh
|
|
||||||
- ${SCRIPT_BASE}/test.sh
|
|
||||||
|
|
||||||
# This task is critical. It updates the "last-used by" timestamp stored
|
|
||||||
# in metadata for all VM images. This mechanism functions in tandem with
|
|
||||||
# an out-of-band pruning operation to remove disused VM images.
|
|
||||||
meta_task:
|
|
||||||
alias: meta
|
|
||||||
name: "VM img. keepalive"
|
|
||||||
|
|
||||||
container: &smallcontainer
|
|
||||||
image: "quay.io/libpod/imgts:latest"
|
|
||||||
cpu: 1
|
|
||||||
memory: 1
|
|
||||||
|
|
||||||
env:
|
|
||||||
IMGNAMES: ${FEDORA_CACHE_IMAGE_NAME}
|
|
||||||
BUILDID: "${CIRRUS_BUILD_ID}"
|
|
||||||
REPOREF: "${CIRRUS_REPO_NAME}"
|
|
||||||
GCPJSON: ENCRYPTED[e8a53772eff6e86bf6b99107b6e6ee3216e2ca00c36252ae3bd8cb29d9b903ffb2e1a1322ea810ca251b04f833b8f8d9]
|
|
||||||
GCPNAME: ENCRYPTED[fb878daf188d35c2ed356dc777267d99b59863ff3abf0c41199d562fca50ba0668fdb0d87e109c9eaa2a635d2825feed]
|
|
||||||
GCPPROJECT: "libpod-218412"
|
|
||||||
|
|
||||||
clone_script: &noop mkdir -p $CIRRUS_WORKING_DIR
|
|
||||||
script: /usr/local/bin/entrypoint.sh
|
|
||||||
|
|
||||||
# Status aggregator for all tests. This task simply ensures a defined
|
|
||||||
# set of tasks all passed, and allows confirming that based on the status
|
|
||||||
# of this task.
|
|
||||||
success_task:
|
|
||||||
name: "Total Success"
|
|
||||||
alias: success
|
|
||||||
|
|
||||||
# N/B: ALL tasks must be listed here, minus their '_task' suffix.
|
|
||||||
depends_on:
|
|
||||||
- meta
|
|
||||||
- gating
|
|
||||||
- test
|
|
||||||
- latest
|
|
||||||
container:
|
|
||||||
image: quay.io/libpod/alpine:latest
|
|
||||||
cpu: 1
|
|
||||||
memory: 1
|
|
||||||
env:
|
|
||||||
CIRRUS_SHELL: "/bin/sh"
|
|
||||||
clone_script: *noop
|
|
||||||
script: *noop
|
|
2
Makefile
2
Makefile
|
@ -8,7 +8,7 @@ DESTDIR ?=
|
||||||
EPOCH_TEST_COMMIT ?= $(shell git merge-base $${DEST_BRANCH:-main} HEAD)
|
EPOCH_TEST_COMMIT ?= $(shell git merge-base $${DEST_BRANCH:-main} HEAD)
|
||||||
HEAD ?= HEAD
|
HEAD ?= HEAD
|
||||||
|
|
||||||
export PODMAN_VERSION ?= "4.2.0"
|
export PODMAN_VERSION ?= "4.2.1"
|
||||||
|
|
||||||
.PHONY: podman
|
.PHONY: podman
|
||||||
podman:
|
podman:
|
||||||
|
|
|
@ -74,6 +74,7 @@ class CreateMixin: # pylint: disable=too-few-public-methods
|
||||||
process will run as.
|
process will run as.
|
||||||
healthcheck (Dict[str,Any]): Specify a test to perform to check that the
|
healthcheck (Dict[str,Any]): Specify a test to perform to check that the
|
||||||
container is healthy.
|
container is healthy.
|
||||||
|
health_check_on_failure_action (int): Specify an action if a healthcheck fails.
|
||||||
hostname (str): Optional hostname for the container.
|
hostname (str): Optional hostname for the container.
|
||||||
init (bool): Run an init inside the container that forwards signals and reaps processes
|
init (bool): Run an init inside the container that forwards signals and reaps processes
|
||||||
init_path (str): Path to the docker-init binary
|
init_path (str): Path to the docker-init binary
|
||||||
|
@ -371,6 +372,7 @@ class CreateMixin: # pylint: disable=too-few-public-methods
|
||||||
"expose": {},
|
"expose": {},
|
||||||
"groups": pop("group_add"),
|
"groups": pop("group_add"),
|
||||||
"healthconfig": pop("healthcheck"),
|
"healthconfig": pop("healthcheck"),
|
||||||
|
"health_check_on_failure_action": pop("health_check_on_failure_action"),
|
||||||
"hostadd": [],
|
"hostadd": [],
|
||||||
"hostname": pop("hostname"),
|
"hostname": pop("hostname"),
|
||||||
"httpproxy": pop("use_config_proxy"),
|
"httpproxy": pop("use_config_proxy"),
|
||||||
|
|
|
@ -3,5 +3,5 @@
|
||||||
# Do not auto-update these from version.py,
|
# Do not auto-update these from version.py,
|
||||||
# as test code should be changed to reflect changes in Podman API versions
|
# as test code should be changed to reflect changes in Podman API versions
|
||||||
BASE_SOCK = "unix:///run/api.sock"
|
BASE_SOCK = "unix:///run/api.sock"
|
||||||
LIBPOD_URL = "http://%2Frun%2Fapi.sock/v4.2.0/libpod"
|
LIBPOD_URL = "http://%2Frun%2Fapi.sock/v4.2.1/libpod"
|
||||||
COMPATIBLE_URL = "http://%2Frun%2Fapi.sock/v1.40"
|
COMPATIBLE_URL = "http://%2Frun%2Fapi.sock/v1.40"
|
||||||
|
|
|
@ -144,6 +144,14 @@ class ContainersIntegrationTest(base.IntegrationTest):
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def test_container_healtchecks(self):
|
||||||
|
"""Test passing various healthcheck options"""
|
||||||
|
parameters = {}
|
||||||
|
parameters['healthcheck'] = {'Test': ['CMD-SHELL curl http://localhost || exit']}
|
||||||
|
parameters['health_check_on_failure_action'] = 1
|
||||||
|
container = self.client.containers.create(self.alpine_image, **parameters)
|
||||||
|
self.containers.append(container)
|
||||||
|
|
||||||
def test_container_mem_limit(self):
|
def test_container_mem_limit(self):
|
||||||
"""Test passing memory limit"""
|
"""Test passing memory limit"""
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
"""Version of PodmanPy."""
|
"""Version of PodmanPy."""
|
||||||
|
|
||||||
__version__ = "4.2.0"
|
__version__ = "4.2.1"
|
||||||
__compatible_version__ = "1.40"
|
__compatible_version__ = "1.40"
|
||||||
|
|
Loading…
Reference in New Issue