├── .codespellignore
├── ci
├── lib.sh
├── shellcheck.sh
├── tag_latest.sh
├── make.sh
├── make_container_images.sh
├── Containerfile
└── validate.sh
├── .dockerignore
├── IMG_SFX
├── get_ci_vm
├── good_repo_test
│ ├── dot_cirrus.yml
│ ├── dot_git.tar.gz
│ ├── README.md
│ ├── .cirrus.yml
│ ├── hack
│ │ └── get_ci_vm.sh
│ └── uninit_gcloud.output
├── good_repo_test_v2
│ ├── dot_cirrus.yml
│ ├── mock_ec2_key
│ ├── mock_ec2_key.pub
│ ├── README.md
│ ├── uninit_aws.output
│ ├── .cirrus.yml
│ ├── ami_search.json
│ └── hack
│ │ └── get_ci_vm.sh
├── Containerfile
├── setup.sh
├── bad_repo_test
│ └── hack
│ │ └── get_ci_vm.sh
└── test.sh
├── .gitignore
├── .codespelldict
├── base_images
├── cloud-init
│ ├── fedora
│ │ └── cloud.cfg.d
│ │ │ ├── 40_enable_root.cfg
│ │ │ └── 40_defuser.cfg
│ └── debian
│ │ └── cloud.cfg.d
│ │ ├── 40_defuser.cfg
│ │ └── 40_enable_root.cfg
├── no_dash.dat
├── .gitignore
├── fedora-cloud-init.service
├── debian_base-setup.sh
├── fedora_base-setup.sh
└── cloud.yml
├── .codespellrc
├── CODE-OF-CONDUCT.md
├── gcsupld
├── Containerfile
├── README.md
├── entrypoint.sh
└── test.sh
├── win_images
├── enable-rdp-userdata.xml
├── bootstrap.ps1
├── win-lib.ps1
├── win_packaging.ps1
├── win_finalization.ps1
└── win-server-wsl.yml
├── imgprune
├── Containerfile
├── README.md
└── entrypoint.sh
├── SECURITY.md
├── .cirrus.star
├── imgobsolete
├── Containerfile
├── README.md
└── entrypoint.sh
├── imgts
├── google-cloud-sdk.repo
├── README.md
├── Containerfile
├── lib_entrypoint.sh
└── entrypoint.sh
├── image_builder
├── google-cloud-sdk.repo
├── install_packages.txt
├── Containerfile
├── setup.sh
├── install_packages.sh
└── gce.yml
├── orphanvms
├── Containerfile
├── README.md
├── entrypoint.sh
├── _gce
└── _ec2
├── skopeo_cidev
├── README.md
├── Containerfile
├── packages.txt
└── setup.sh
├── get_packer_version.sh
├── gcpprojects.txt
├── ccia
├── fake_manifests
│ ├── Image-builder image
│ │ └── manifest
│ │ │ └── image_builder
│ │ │ └── manifest.json
│ ├── fedora Cache Image
│ │ └── manifest
│ │ │ └── cache_images
│ │ │ └── manifest.json
│ ├── ubuntu Base Image
│ │ └── manifest
│ │ │ └── base_images
│ │ │ └── manifest.json
│ ├── ubuntu Cache Image
│ │ └── manifest
│ │ │ └── cache_images
│ │ │ └── manifest.json
│ ├── fedora-aws Base Image
│ │ └── manifest
│ │ │ └── base_images
│ │ │ └── manifest.json
│ ├── build-push Cache Image
│ │ └── manifest
│ │ │ └── cache_images
│ │ │ └── manifest.json
│ ├── fedora-aws Cache Image
│ │ └── manifest
│ │ │ └── cache_images
│ │ │ └── manifest.json
│ ├── fedora-aws-arm64 Base Image
│ │ └── manifest
│ │ │ └── base_images
│ │ │ └── manifest.json
│ ├── fedora-netavark Cache Image
│ │ └── manifest
│ │ │ └── cache_images
│ │ │ └── manifest.json
│ ├── fedora-podman-aws-arm64 Cache Image
│ │ └── manifest
│ │ │ └── cache_images
│ │ │ └── manifest.json
│ ├── fedora-netavark-aws-arm64 Cache Image
│ │ └── manifest
│ │ │ └── cache_images
│ │ │ └── manifest.json
│ └── fedora Base Image
│ │ └── manifest
│ │ └── base_images
│ │ └── manifest.json
├── README.md
├── test.sh
└── Containerfile
├── make-user-data.sh
├── podman
├── setup.sh
└── Containerfile
├── .pre-commit-hooks.yaml
├── .github
├── workflows
│ ├── check_cirrus_cron.yml
│ ├── orphan_vms.yml
│ └── pr_image_id.yml
├── renovate.json5
└── actions
│ └── bin
│ └── create_image_table.py
├── check-imgsfx.sh
├── cache_images
├── build-push_packaging.sh
├── rawhide_setup.sh
├── fedora_setup.sh
├── debian_setup.sh
├── fedora-netavark_packaging.sh
├── debian_packaging.sh
├── fedora_packaging.sh
└── cloud.yml
├── dot_pre-commit-config.yaml.example
├── get_fedora_url.sh
├── systemd_banish.sh
└── README-simplified.md
/.codespellignore:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/ci/lib.sh:
--------------------------------------------------------------------------------
1 | ../lib.sh
--------------------------------------------------------------------------------
/.dockerignore:
--------------------------------------------------------------------------------
1 | .git
2 | tmp
3 |
--------------------------------------------------------------------------------
/IMG_SFX:
--------------------------------------------------------------------------------
1 | 20251211t152018z-f43f42d14
2 |
--------------------------------------------------------------------------------
/get_ci_vm/good_repo_test/dot_cirrus.yml:
--------------------------------------------------------------------------------
1 | .cirrus.yml
--------------------------------------------------------------------------------
/get_ci_vm/good_repo_test_v2/dot_cirrus.yml:
--------------------------------------------------------------------------------
1 | .cirrus.yml
--------------------------------------------------------------------------------
/get_ci_vm/good_repo_test_v2/mock_ec2_key:
--------------------------------------------------------------------------------
1 | blahblahblah
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | */*.json
2 | /.cache
3 | .pre-commit-config.yaml
4 |
--------------------------------------------------------------------------------
/get_ci_vm/good_repo_test_v2/mock_ec2_key.pub:
--------------------------------------------------------------------------------
1 | blahblahblah
2 |
--------------------------------------------------------------------------------
/get_ci_vm/good_repo_test_v2/README.md:
--------------------------------------------------------------------------------
1 | ../good_repo_test/README.md
--------------------------------------------------------------------------------
/.codespelldict:
--------------------------------------------------------------------------------
1 | IMGSFX,IMG-SFX->IMG_SFX
2 | Dockerfile->Containerfile
3 |
--------------------------------------------------------------------------------
/base_images/cloud-init/fedora/cloud.cfg.d/40_enable_root.cfg:
--------------------------------------------------------------------------------
1 | disable_root: 0
2 |
--------------------------------------------------------------------------------
/base_images/cloud-init/debian/cloud.cfg.d/40_defuser.cfg:
--------------------------------------------------------------------------------
1 | ../../fedora/cloud.cfg.d/40_defuser.cfg
--------------------------------------------------------------------------------
/base_images/cloud-init/debian/cloud.cfg.d/40_enable_root.cfg:
--------------------------------------------------------------------------------
1 | ../../fedora/cloud.cfg.d/40_enable_root.cfg
--------------------------------------------------------------------------------
/base_images/no_dash.dat:
--------------------------------------------------------------------------------
1 | Name: dash/sh
2 | Template: dash/sh
3 | Value: false
4 | Owners: dash
5 | Flags: seen
6 |
--------------------------------------------------------------------------------
/.codespellrc:
--------------------------------------------------------------------------------
1 | [codespell]
2 | ignore-words = .codespellignore
3 | dictionary = .codespelldict
4 | quiet-level = 3
5 |
--------------------------------------------------------------------------------
/base_images/.gitignore:
--------------------------------------------------------------------------------
1 | *json
2 | packer
3 | packer*zip
4 | packer_cache
5 | cidata*
6 | meta-data
7 | user-data
8 |
--------------------------------------------------------------------------------
/get_ci_vm/good_repo_test/dot_git.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/containers/automation_images/HEAD/get_ci_vm/good_repo_test/dot_git.tar.gz
--------------------------------------------------------------------------------
/base_images/cloud-init/fedora/cloud.cfg.d/40_defuser.cfg:
--------------------------------------------------------------------------------
1 | # Avoid adding any users to the system by default. GCP OSLogin will do it at runtime.
2 | users: {}
3 |
--------------------------------------------------------------------------------
/get_ci_vm/good_repo_test/README.md:
--------------------------------------------------------------------------------
1 | This directory is setup for testing, changes to any of it's contents
2 | may cause unwanted side-effects. Please understand the test.sh script
3 | before making any changes.
4 |
--------------------------------------------------------------------------------
/CODE-OF-CONDUCT.md:
--------------------------------------------------------------------------------
1 | ## The Automation Images Project Community Code of Conduct
2 |
3 | The Automation Images Project follows the [Containers Community Code of Conduct](https://github.com/containers/common/blob/main/CODE-OF-CONDUCT.md).
4 |
--------------------------------------------------------------------------------
/gcsupld/Containerfile:
--------------------------------------------------------------------------------
1 | FROM imgts:latest
2 |
3 | COPY /gcsupld/entrypoint.sh /usr/local/bin/entrypoint.sh
4 | RUN chmod 755 /usr/local/bin/entrypoint.sh
5 |
6 | # These are required at runtime
7 | ENV FROM_FILEPATH="" \
8 | TO_GCSURI=""
9 |
--------------------------------------------------------------------------------
/win_images/enable-rdp-userdata.xml:
--------------------------------------------------------------------------------
1 |
2 | Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Terminal Server" -Name "fDenyTSConnections" -Value 0
3 | Enable-NetFirewallRule -DisplayGroup "Remote Desktop"
4 |
5 |
--------------------------------------------------------------------------------
/imgprune/Containerfile:
--------------------------------------------------------------------------------
1 | FROM imgts:latest
2 |
3 | COPY /imgprune/entrypoint.sh /usr/local/bin/entrypoint.sh
4 | RUN chmod 755 /usr/local/bin/entrypoint.sh
5 |
6 | # These are only needed by imgts
7 | ENV IMGNAMES="" \
8 | BUILDID="" \
9 | REPOREF=""
10 |
--------------------------------------------------------------------------------
/SECURITY.md:
--------------------------------------------------------------------------------
1 | ## Security and Disclosure Information Policy for the Automation Images Project
2 |
3 | The Automation Images Project follows the [Security and Disclosure Information Policy](https://github.com/containers/common/blob/main/SECURITY.md) for the Containers Projects.
4 |
--------------------------------------------------------------------------------
/.cirrus.star:
--------------------------------------------------------------------------------
1 | #
2 | # Lang. ref: https://github.com/bazelbuild/starlark/blob/master/spec.md#contents
3 | # Impl. ref: https://cirrus-ci.org/guide/programming-tasks/
4 | load("cirrus", "fs")
5 |
6 | def main():
7 | return {
8 | "env": {
9 | "IMG_SFX": fs.read("IMG_SFX").strip()
10 | },
11 | }
12 |
--------------------------------------------------------------------------------
/imgobsolete/Containerfile:
--------------------------------------------------------------------------------
1 | FROM imgts:latest
2 |
3 | COPY /imgobsolete/entrypoint.sh /usr/local/bin/entrypoint.sh
4 | RUN chmod 755 /usr/local/bin/entrypoint.sh
5 |
6 | # Env. vars set to "__unknown__" are required to be set by the caller
7 | ENV AWSINI="__unknown__" \
8 | IMGNAMES="" \
9 | BUILDID="" \
10 | REPOREF=""
11 |
--------------------------------------------------------------------------------
/imgts/google-cloud-sdk.repo:
--------------------------------------------------------------------------------
1 | # Copy-pasted from https://cloud.google.com/sdk/docs/install#red-hatfedoracentos
2 |
3 | [google-cloud-cli]
4 | name=Google Cloud CLI
5 | baseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el9-x86_64
6 | enabled=1
7 | gpgcheck=1
8 | repo_gpgcheck=0
9 | gpgkey=https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
10 |
--------------------------------------------------------------------------------
/image_builder/google-cloud-sdk.repo:
--------------------------------------------------------------------------------
1 | # Copy-pasted from https://cloud.google.com/sdk/docs/install#red-hatfedoracentos
2 |
3 | [google-cloud-cli]
4 | name=Google Cloud CLI
5 | baseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el9-x86_64
6 | enabled=1
7 | gpgcheck=1
8 | repo_gpgcheck=0
9 | gpgkey=https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
10 |
--------------------------------------------------------------------------------
/orphanvms/Containerfile:
--------------------------------------------------------------------------------
1 | FROM imgts:latest
2 |
3 | COPY /orphanvms/entrypoint.sh /orphanvms/_gce /orphanvms/_ec2 /usr/local/bin/
4 | RUN chmod 755 /usr/local/bin/entrypoint.sh
5 |
6 | # Clear unneeded requirements, add GCPPROJECTS and AWSINI as required
7 | ENV IMGNAMES="" \
8 | BUILDID="" \
9 | REPOREF="" \
10 | GCPPROJECTS="__unknown__" \
11 | AWSINI="__unknown__"
12 |
--------------------------------------------------------------------------------
/get_ci_vm/good_repo_test_v2/uninit_aws.output:
--------------------------------------------------------------------------------
1 | This is fake output for testing.
2 |
3 | Name Value Type Location
4 | ---- ----- ---- --------
5 | profile automation_images manual --profile
6 |
7 | The config profile (automation_images) could not be found
8 | This is fake output for testing.
9 |
--------------------------------------------------------------------------------
/skopeo_cidev/README.md:
--------------------------------------------------------------------------------
1 | # Skopeo CI/Dev image
2 |
3 | The contents of this directory are intended to be utilized via
4 | the `Makefile` at the top of the repository. Typically as
5 | `make skopeo_cidev IMG_SFX=`. The resultant image is utilized
6 | as part of the [skopeo project's](https://github.com/containers/skopeo)
7 | development and CI automation. It should not be used outside
8 | of those contexts.
9 |
--------------------------------------------------------------------------------
/get_ci_vm/good_repo_test/.cirrus.yml:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | aws_test_task:
4 | ec2_instance:
5 | image: ami-1234567890
6 |
7 | google_test_task:
8 | gce_instance:
9 | image_name: test-image-name
10 |
11 | container_test_task:
12 | container:
13 | image: something
14 |
15 | windows_container_test_task:
16 | windows_container:
17 | image: cirrusci/windowsservercore:2019
18 |
--------------------------------------------------------------------------------
/get_ci_vm/good_repo_test_v2/.cirrus.yml:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | aws_test_task:
4 | env:
5 | EC2_INST_TYPE: bigone.supervm
6 | ec2_instance:
7 | image: fedora-podman-aws-arm64-c5495735033528320
8 | type: ${EC2_INST_TYPE}
9 |
10 | google_test_task:
11 | gce_instance:
12 | image_name: test-image-name
13 |
14 | container_test_task:
15 | container:
16 | image: something
17 |
--------------------------------------------------------------------------------
/get_packer_version.sh:
--------------------------------------------------------------------------------
1 |
2 |
3 | # This script is intended to be executed from the Makefile.
4 | # It allows the .cirrus.yml definition of PACKER_VERSION to
5 | # act as the single source of truth for this value.
6 |
7 | cd $(dirname "${BASH_SOURCE[0]}") || exit
8 | YML_LINE=$(grep -Em1 '^\s+PACKER_VERSION:' .cirrus.yml)
9 | VER_VAL=$(awk '{print $3}' <<<"$YML_LINE" | tr -d "\"'[:space:]")
10 | echo -n "$VER_VAL"
11 |
--------------------------------------------------------------------------------
/gcpprojects.txt:
--------------------------------------------------------------------------------
1 | # This is a listing of Google Cloud Platform Project IDs for
2 | # orphan VM monitoring and possibly other automation tasks.
3 | # Note: CI VM images produced by this repo are all stored within
4 | # the libpod-218412 project (in addition to some AWS EC2)
5 | buildah
6 | conmon-222014
7 | containers-build-source-image
8 | libpod-218412
9 | netavark-2021
10 | oci-seccomp-bpf-hook
11 | skopeo
12 | storage-240716
13 | udica-247612
14 |
--------------------------------------------------------------------------------
/image_builder/install_packages.txt:
--------------------------------------------------------------------------------
1 | buildah
2 | bash-completion
3 | curl
4 | findutils
5 | gawk
6 | genisoimage
7 | git
8 | google-cloud-cli
9 | jq
10 | libvirt
11 | libvirt-admin
12 | libvirt-client
13 | libvirt-daemon
14 | libxcrypt-compat
15 | make
16 | openssh
17 | openssl
18 | podman
19 | python3
20 | python3-pyyaml
21 | qemu-img
22 | qemu-kvm
23 | rng-tools
24 | rootfiles
25 | rsync
26 | sed
27 | skopeo
28 | tar
29 | unzip
30 | util-linux
31 | vim
32 |
--------------------------------------------------------------------------------
/ccia/fake_manifests/Image-builder image/manifest/image_builder/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "builds": [
3 | {
4 | "name": "image-builder",
5 | "builder_type": "googlecompute",
6 | "build_time": 1658173915,
7 | "files": null,
8 | "artifact_id": "image-builder-5419329914142720",
9 | "packer_run_uuid": "243ae2b1-d4b4-4917-9883-a96c516a2c39",
10 | "custom_data": {
11 | "IMG_SFX": "5419329914142720"
12 | }
13 | }
14 | ],
15 | "last_run_uuid": "243ae2b1-d4b4-4917-9883-a96c516a2c39"
16 | }
17 |
--------------------------------------------------------------------------------
/imgprune/README.md:
--------------------------------------------------------------------------------
1 | A container image for maintaining the collection of
2 | deprecated VM images disused by CI/CD projects. Images
3 | marked deprecated are pruned (deleted) by this image
4 | once they surpass a certain age since last-used.
5 |
6 | * `GCPJSON` - Contents of the service-account JSON key file.
7 | * `GCPNAME` - Complete Name (fake e-mail address) of the service account.
8 | * `GCPPROJECT` - Project ID of the GCP project.
9 |
10 | Example build (from repository root):
11 |
12 | ```bash
13 | make imgprune IMG_SFX=example
14 | ```
15 |
--------------------------------------------------------------------------------
/ccia/fake_manifests/fedora Cache Image/manifest/cache_images/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "builds": [
3 | {
4 | "name": "fedora",
5 | "builder_type": "googlecompute",
6 | "build_time": 1658176163,
7 | "files": null,
8 | "artifact_id": "fedora-c5419329914142720",
9 | "packer_run_uuid": "30833ff6-05df-ee1e-4378-57991d592136",
10 | "custom_data": {
11 | "IMG_SFX": "5419329914142720",
12 | "STAGE": "cache"
13 | }
14 | }
15 | ],
16 | "last_run_uuid": "30833ff6-05df-ee1e-4378-57991d592136"
17 | }
18 |
--------------------------------------------------------------------------------
/ccia/fake_manifests/ubuntu Base Image/manifest/base_images/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "builds": [
3 | {
4 | "name": "ubuntu",
5 | "builder_type": "googlecompute",
6 | "build_time": 1658175167,
7 | "files": null,
8 | "artifact_id": "ubuntu-b5419329914142720",
9 | "packer_run_uuid": "238ce64e-cb7d-4c1b-38ff-3e0eb9e3939a",
10 | "custom_data": {
11 | "IMG_SFX": "5419329914142720",
12 | "STAGE": "base"
13 | }
14 | }
15 | ],
16 | "last_run_uuid": "238ce64e-cb7d-4c1b-38ff-3e0eb9e3939a"
17 | }
18 |
--------------------------------------------------------------------------------
/ccia/fake_manifests/ubuntu Cache Image/manifest/cache_images/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "builds": [
3 | {
4 | "name": "ubuntu",
5 | "builder_type": "googlecompute",
6 | "build_time": 1658176053,
7 | "files": null,
8 | "artifact_id": "ubuntu-c5419329914142720",
9 | "packer_run_uuid": "553ec5c0-7b09-e06d-2837-b272204696d1",
10 | "custom_data": {
11 | "IMG_SFX": "5419329914142720",
12 | "STAGE": "cache"
13 | }
14 | }
15 | ],
16 | "last_run_uuid": "553ec5c0-7b09-e06d-2837-b272204696d1"
17 | }
18 |
--------------------------------------------------------------------------------
/orphanvms/README.md:
--------------------------------------------------------------------------------
1 | A container image to help identify possibly orphaned
2 | VM instances. Deliberately avoids producing any output
3 | if no instances are identified.
4 |
5 | * `GCPPROJECTS` - Whitespace separated Project IDs to check.
6 | * `GCPJSON` - Contents of the service-account JSON key file. N/B: Must have
7 | 'Compute Read' role for all listed `$GCPPROJECTS`.
8 | * `GCPNAME` - Complete Name (fake e-mail address) of the service account.
9 |
10 | Example build (from repository root):
11 |
12 | ```bash
13 | make orphanvms IMG_SFX=example
14 | ```
15 |
--------------------------------------------------------------------------------
/ccia/fake_manifests/fedora-aws Base Image/manifest/base_images/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "builds": [
3 | {
4 | "name": "fedora-aws",
5 | "builder_type": "amazon-ebs",
6 | "build_time": 1658175765,
7 | "files": null,
8 | "artifact_id": "us-east-1:ami-000448bd70242ba3c",
9 | "packer_run_uuid": "193dbe11-9c6b-e0b0-efc9-dc0e8fbf98dc",
10 | "custom_data": {
11 | "IMG_SFX": "5419329914142720",
12 | "STAGE": "base"
13 | }
14 | }
15 | ],
16 | "last_run_uuid": "193dbe11-9c6b-e0b0-efc9-dc0e8fbf98dc"
17 | }
18 |
--------------------------------------------------------------------------------
/ccia/fake_manifests/build-push Cache Image/manifest/cache_images/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "builds": [
3 | {
4 | "name": "build-push",
5 | "builder_type": "googlecompute",
6 | "build_time": 1658175996,
7 | "files": null,
8 | "artifact_id": "build-push-c5419329914142720",
9 | "packer_run_uuid": "250b8705-ce4d-7844-7181-f1181dd7e04c",
10 | "custom_data": {
11 | "IMG_SFX": "5419329914142720",
12 | "STAGE": "cache"
13 | }
14 | }
15 | ],
16 | "last_run_uuid": "250b8705-ce4d-7844-7181-f1181dd7e04c"
17 | }
18 |
--------------------------------------------------------------------------------
/ccia/fake_manifests/fedora-aws Cache Image/manifest/cache_images/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "builds": [
3 | {
4 | "name": "fedora-aws",
5 | "builder_type": "amazon-ebs",
6 | "build_time": 1658176592,
7 | "files": null,
8 | "artifact_id": "us-east-1:ami-0442ccd2bb66504b7",
9 | "packer_run_uuid": "df4c911b-80a3-27ee-a513-4b6e29c1c906",
10 | "custom_data": {
11 | "IMG_SFX": "5419329914142720",
12 | "STAGE": "cache"
13 | }
14 | }
15 | ],
16 | "last_run_uuid": "df4c911b-80a3-27ee-a513-4b6e29c1c906"
17 | }
18 |
--------------------------------------------------------------------------------
/ci/shellcheck.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # This script is intended to be executed by humans or automation.
4 | # It simply provides a one-command way of executing shellcheck
5 | # in a uniform way
6 |
7 | set -e
8 |
9 | cd $(realpath $(dirname "$0")/../)
10 | shellcheck --color=always --format=tty \
11 | --shell=bash --external-sources \
12 | --enable add-default-case,avoid-nullary-conditions,check-unassigned-uppercase \
13 | --exclude SC2046,SC2034,SC2090,SC2064 \
14 | --wiki-link-count=0 --severity=warning \
15 | ./*.sh ./*/*.sh
16 |
17 | echo "PASS"
18 |
--------------------------------------------------------------------------------
/ccia/fake_manifests/fedora-aws-arm64 Base Image/manifest/base_images/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "builds": [
3 | {
4 | "name": "fedora-aws-arm64",
5 | "builder_type": "amazon-ebs",
6 | "build_time": 1658175464,
7 | "files": null,
8 | "artifact_id": "us-east-1:ami-0f5f268182775a8c2",
9 | "packer_run_uuid": "e4a389da-e1dc-35db-ef32-361e890e4b30",
10 | "custom_data": {
11 | "IMG_SFX": "5419329914142720",
12 | "STAGE": "base"
13 | }
14 | }
15 | ],
16 | "last_run_uuid": "e4a389da-e1dc-35db-ef32-361e890e4b30"
17 | }
18 |
--------------------------------------------------------------------------------
/ccia/fake_manifests/fedora-netavark Cache Image/manifest/cache_images/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "builds": [
3 | {
4 | "name": "fedora-netavark",
5 | "builder_type": "googlecompute",
6 | "build_time": 1658176148,
7 | "files": null,
8 | "artifact_id": "fedora-netavark-c5419329914142720",
9 | "packer_run_uuid": "d95c8118-3970-4a73-d348-692a5a3371a3",
10 | "custom_data": {
11 | "IMG_SFX": "5419329914142720",
12 | "STAGE": "cache"
13 | }
14 | }
15 | ],
16 | "last_run_uuid": "d95c8118-3970-4a73-d348-692a5a3371a3"
17 | }
18 |
--------------------------------------------------------------------------------
/base_images/fedora-cloud-init.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=Initial cloud-init job (metadata service crawler)
3 | DefaultDependencies=no
4 | Wants=cloud-init-local.service
5 | After=cloud-init-local.service
6 | Wants=google-network-daemon.service
7 | After=google-network-daemon.service
8 | Before=systemd-user-sessions.service
9 |
10 | [Service]
11 | Type=oneshot
12 | ExecStart=/usr/bin/cloud-init init
13 | RemainAfterExit=yes
14 | TimeoutSec=0
15 |
16 | # Output needs to appear in instance console output
17 | StandardOutput=journal+console
18 |
19 | [Install]
20 | WantedBy=cloud-init.target
21 |
--------------------------------------------------------------------------------
/ccia/fake_manifests/fedora-podman-aws-arm64 Cache Image/manifest/cache_images/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "builds": [
3 | {
4 | "name": "fedora-podman-aws-arm64",
5 | "builder_type": "amazon-ebs",
6 | "build_time": 1658176346,
7 | "files": null,
8 | "artifact_id": "us-east-1:ami-051a5e8dad587bf22",
9 | "packer_run_uuid": "7e742dec-035c-6b95-8793-c464b2a6ac0f",
10 | "custom_data": {
11 | "IMG_SFX": "5419329914142720",
12 | "STAGE": "cache"
13 | }
14 | }
15 | ],
16 | "last_run_uuid": "7e742dec-035c-6b95-8793-c464b2a6ac0f"
17 | }
18 |
--------------------------------------------------------------------------------
/ccia/fake_manifests/fedora-netavark-aws-arm64 Cache Image/manifest/cache_images/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "builds": [
3 | {
4 | "name": "fedora-netavark-aws-arm64",
5 | "builder_type": "amazon-ebs",
6 | "build_time": 1658176335,
7 | "files": null,
8 | "artifact_id": "us-east-1:ami-07a339e76f84afa7b",
9 | "packer_run_uuid": "b8a09332-800a-09c2-ba0e-2564e6e52f76",
10 | "custom_data": {
11 | "IMG_SFX": "5419329914142720",
12 | "STAGE": "cache"
13 | }
14 | }
15 | ],
16 | "last_run_uuid": "b8a09332-800a-09c2-ba0e-2564e6e52f76"
17 | }
18 |
--------------------------------------------------------------------------------
/ccia/fake_manifests/fedora Base Image/manifest/base_images/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "builds": [
3 | {
4 | "name": "fedora",
5 | "builder_type": "qemu",
6 | "build_time": 1658175535,
7 | "files": [
8 | {
9 | "name": "fedora-b5419329914142720",
10 | "size": 0
11 | }
12 | ],
13 | "artifact_id": "",
14 | "packer_run_uuid": "b1ec41bd-c395-45d6-96cf-f03a1ff2c894",
15 | "custom_data": {
16 | "IMG_SFX": "5419329914142720",
17 | "STAGE": "base"
18 | }
19 | }
20 | ],
21 | "last_run_uuid": "b1ec41bd-c395-45d6-96cf-f03a1ff2c894"
22 | }
23 |
--------------------------------------------------------------------------------
/make-user-data.sh:
--------------------------------------------------------------------------------
1 |
2 | # This script is utilized by Makefile, it's not intended to be run by humans
3 |
4 | set -eo pipefail
5 |
6 | if [[ ! -r "cidata.ssh.pub" ]]; then
7 | echo "ERROR: Expectinbg to find the file $PWD/cidata.ssh.pub existing and readable.
8 | "
9 | exit 1
10 | fi
11 |
12 | cat < user-data
13 | #cloud-config
14 | timezone: US/Central
15 | growpart:
16 | mode: auto
17 | disable_root: false
18 | ssh_pwauth: True
19 | ssh_import_id: [root]
20 | ssh_authorized_keys:
21 | - $(cat cidata.ssh.pub)
22 | users:
23 | - name: root
24 | primary-group: root
25 | homedir: /root
26 | system: true
27 | EOF
28 |
--------------------------------------------------------------------------------
/skopeo_cidev/Containerfile:
--------------------------------------------------------------------------------
1 | ARG BASE_NAME=fedora
2 | ARG BASE_TAG=latest
3 | FROM ${BASE_NAME}:${BASE_TAG}
4 |
5 | # Required to keep perl & other tooling happy
6 | ENV LC_ALL="C"
7 |
8 | COPY /packages.txt /root/
9 | RUN dnf -y update && \
10 | dnf -y install $(sed -r -e '/^#/d' -e '/^$/d' /root/packages.txt) && \
11 | dnf -y upgrade && \
12 | dnf clean all
13 |
14 | ENV REG_REPO="https://github.com/docker/distribution.git" \
15 | REG_COMMIT_SCHEMA1="ec87e9b6971d831f0eff752ddb54fb64693e51cd" \
16 | OSO_REPO="https://github.com/openshift/origin.git" \
17 | OSO_TAG="v1.5.0-alpha.3"
18 |
19 | COPY /setup.sh /root/
20 | RUN bash /root/setup.sh
21 |
--------------------------------------------------------------------------------
/imgts/README.md:
--------------------------------------------------------------------------------
1 | A container image for tracking automation metadata.
2 | This is used to update last-used timestamps on
3 | VM images to prevent them from being pruned.
4 |
5 | Required environment variables:
6 | * `GCPJSON` - Contents of the service-account JSON key file.
7 | * `GCPNAME` - Complete Name (fake e-mail address) of the service account.
8 | * `GCPPROJECT` - Project ID of the GCP project.
9 | * `IMGNAMES` - Whitespace separated list of image names to update.
10 | * `BUILDID` - Cirrus CI build ("job") ID number for auditing purposes.
11 | * `REPOREF` - Repository name that ran the build.
12 |
13 | Example build (from repository root):
14 |
15 | ```bash
16 | make imgts IMG_SFX=example
17 | ```
18 |
--------------------------------------------------------------------------------
/imgobsolete/README.md:
--------------------------------------------------------------------------------
1 | A container image for maintaining the collection of
2 | VM images used by CI/CD on several projects. Acts upon
3 | metadata maintained by the `imgts` container. Images
4 | found to be disused, are marked obsolete (deprecated).
5 | A future process is responsible for pruning the obsolete
6 | images. This workflow provides for a recovery option
7 | should an image be erroneously obsoleted.
8 |
9 | * `GCPJSON` - Contents of the service-account JSON key file.
10 | * `GCPNAME` - Complete Name (fake e-mail address) of the service account.
11 | * `GCPPROJECT` - Project ID of the GCP project.
12 |
13 | Example build (from repository root):
14 |
15 | ```bash
16 | make imgobsolete IMG_SFX=example
17 | ```
18 |
--------------------------------------------------------------------------------
/skopeo_cidev/packages.txt:
--------------------------------------------------------------------------------
1 | # general deps
2 | docker-distribution
3 | git
4 | golang
5 | golang-github-cpuguy83-md2man
6 | make
7 |
8 | # Skopeo documentation building
9 | btrfs-progs-devel
10 | device-mapper-devel
11 | golang
12 | gpgme-devel
13 | make
14 |
15 | # storage deps
16 | btrfs-progs-devel
17 | device-mapper-devel
18 |
19 | # gpgme bindings deps
20 | libassuan-devel
21 | gnupg
22 | gpgme-devel
23 |
24 | # htpasswd for system tests
25 | httpd-tools
26 |
27 | # OpenShift deps
28 | bats
29 | bsdtar
30 | device-mapper
31 | docker
32 | e2fsprogs
33 | ethtool
34 | findutils
35 | golint
36 | hostname
37 | iproute
38 | iptables
39 | jq
40 | lsof
41 | nmap-ncat
42 | openssl
43 | podman
44 | runc
45 | socat
46 | tar
47 | tree
48 | util-linux
49 | wget
50 | which
51 | xfsprogs
52 |
--------------------------------------------------------------------------------
/podman/setup.sh:
--------------------------------------------------------------------------------
1 |
2 |
3 | # This script is intended to be executed as part of the container
4 | # image build process. Using it under any other context is virtually
5 | # guarantied to cause you much pain and suffering.
6 |
7 | set -eo pipefail
8 |
9 | SCRIPT_FILEPATH=$(realpath "${BASH_SOURCE[0]}")
10 | SCRIPT_DIRPATH=$(dirname "$SCRIPT_FILEPATH")
11 | REPO_DIRPATH=$(realpath "$SCRIPT_DIRPATH/../")
12 | # shellcheck source=./lib.sh
13 | source "$REPO_DIRPATH/lib.sh"
14 |
15 | if [[ "$OS_RELEASE_ID" == "debian" ]]; then
16 | bash base_images/debian_base-setup.sh
17 | bash cache_images/debian_setup.sh
18 | elif [[ "$OS_RELEASE_ID" == "fedora" ]]; then
19 | bash base_images/fedora_base-setup.sh
20 | bash cache_images/fedora_setup.sh
21 | else
22 | die "Unknown/unsupported Distro '$OS_RELEASE_ID'"
23 | fi
24 |
--------------------------------------------------------------------------------
/gcsupld/README.md:
--------------------------------------------------------------------------------
1 | A container image for uploading a file to Google Cloud Storage
2 | (GCS). It requires the caller to posess both a service-account
3 | credentials file, volume-mount the file to be uploaded, and
4 | provide the full destination URI. The `` must
5 | already exist, and `