Skip to content

Commit

Permalink
Add support for ec2_instance task type
Browse files Browse the repository at this point in the history
Also update test data to confirm EC2 instance task parsing.

Signed-off-by: Chris Evich <cevich@redhat.com>
  • Loading branch information
cevich committed Jun 29, 2022
1 parent 26f565c commit 3426cb8
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cirrus-ci_env/cirrus-ci_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ def get_type_image(self, item: dict,
# Order is significant, VMs always override containers
if "gce_instance" in item:
return "gcevm", item["gce_instance"].get("image_name", default_image)
if "ec2_instance" in item:
return "ec2vm", item["ec2_instance"].get("image", default_image)
elif "osx_instance" in item or "macos_instance" in item:
_ = item.get("osx_instance", item.get("macos_instance"))
return "osx", _.get("image", default_image)
Expand Down
31 changes: 31 additions & 0 deletions cirrus-ci_env/test/actual_cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ env:

# Google-cloud VM Images
IMAGE_SUFFIX: "c6524344056676352"
FEDORA_AMI_ID: "ami-04f37091c3ec43890"
FEDORA_CACHE_IMAGE_NAME: "fedora-${IMAGE_SUFFIX}"
PRIOR_FEDORA_CACHE_IMAGE_NAME: "prior-fedora-${IMAGE_SUFFIX}"
UBUNTU_CACHE_IMAGE_NAME: "ubuntu-${IMAGE_SUFFIX}"
Expand Down Expand Up @@ -61,6 +62,8 @@ timeout_in: 60m

gcp_credentials: ENCRYPTED[a28959877b2c9c36f151781b0a05407218cda646c7d047fc556e42f55e097e897ab63ee78369dae141dcf0b46a9d0cdd]

aws_credentials: ENCRYPTED[4ca070bffe28eb9b27d63c568b52970dd46f119c3a83b8e443241e895dbf1737580b4d84eed27a311a2b74287ef9f79f]


# Default/small container image to execute tasks with
container: &smallcontainer
Expand Down Expand Up @@ -555,6 +558,33 @@ rootless_integration_test_task:
always: *int_logs_artifacts


podman_machine_task:
name: *std_name_fmt
alias: podman_machine
# FIXME: Added for speedy-testing
only_if: $CIRRUS_CHANGE_TITLE =~ '.*CI:BUILD.*'
depends_on:
- build
- local_integration_test
- remote_integration_test
- container_integration_test
- rootless_integration_test
ec2_instance:
image: "${VM_IMAGE_NAME}"
type: m5zn.metal # Bare-metal instance is required
region: us-east-1
env:
TEST_FLAVOR: "machine"
PRIV_NAME: "rootless" # intended use-case
DISTRO_NV: "${FEDORA_NAME}"
VM_IMAGE_NAME: "${FEDORA_AMI_ID}"
clone_script: *noop # Comes from cache
gopath_cache: *ro_gopath_cache
setup_script: *setup
main_script: *main
always: *int_logs_artifacts


# Always run subsequent to integration tests. While parallelism is lost
# with runtime, debugging system-test failures can be more challenging
# for some golang developers. Otherwise the following tasks run across
Expand Down Expand Up @@ -690,6 +720,7 @@ success_task:
- remote_integration_test
- rootless_integration_test
- container_integration_test
- podman_machine
- local_system_test
- remote_system_test
- rootless_system_test
Expand Down
1 change: 1 addition & 0 deletions cirrus-ci_env/test/actual_task_names.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ int podman ubuntu-2010 root host
int remote fedora-33 root host
int remote ubuntu-2004 root host
int remote ubuntu-2010 root host
machine podman fedora-33 rootless host
sys podman fedora-33 root host
sys podman fedora-33 rootless host
sys podman ubuntu-2004 root host
Expand Down
8 changes: 8 additions & 0 deletions cirrus-ci_env/test/expected_cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,14 @@ tasks:
TEST_FLAVOR: int
VM_IMAGE_NAME: ubuntu-c6524344056676352
_BUILD_CACHE_HANDLE: ubuntu-2010-build-${CIRRUS_BUILD_ID}
machine podman fedora-33 rootless host:
alias: podman_machine
env:
CTR_FQIN: quay.io/libpod/fedora_podman:c6524344056676352
DISTRO_NV: fedora-33
TEST_FLAVOR: machine
PRIV_NAME: rootless
VM_IMAGE_NAME: ami-04f37091c3ec43890
sys podman fedora-33 root host:
alias: local_system_test
env:
Expand Down
3 changes: 3 additions & 0 deletions cirrus-ci_env/test/expected_ti.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ int remote ubuntu-2004 root host:
int remote ubuntu-2010 root host:
- gcevm
- ubuntu-c6524344056676352
machine podman fedora-33 rootless host:
- ec2vm
- ami-04f37091c3ec43890
sys podman fedora-33 root host:
- gcevm
- fedora-c6524344056676352
Expand Down

0 comments on commit 3426cb8

Please sign in to comment.