-
Notifications
You must be signed in to change notification settings - Fork 239
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
Feat(containers): add labels to AVD container images and fork test workflows #5081
base: devel
Are you sure you want to change the base?
Conversation
Review docs on Read the Docs To test this pull request: # Create virtual environment for this testing below the current directory
python -m venv test-avd-pr-5081
# Activate the virtual environment
source test-avd-pr-5081/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/ankudinov/avd.git@container_labels#subdirectory=python-avd" --force
# Point Ansible collections path to the Python virtual environment
export ANSIBLE_COLLECTIONS_PATH=$VIRTUAL_ENV/ansible_collections
# Install Ansible collection
ansible-galaxy collection install git+https://github.com/ankudinov/avd.git#/ansible_collections/arista/avd/,container_labels --force
# Optional: Install AVD examples
cd test-avd-pr-5081
ansible-playbook arista.avd.install_examples |
|
The new workflows were created to add some flexibility and due to the fact that I can't make How to test:
Alternatively simply review the code and run: podman pull ghcr.io/ankudinov/avd/universal:python3.11-avd-container_labels
podman inspect ghcr.io/ankudinov/avd/universal:python3.11-avd-container_labels |
|
||
"on": | ||
push: | ||
branches: [ '**' ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is needed at all.
branches: [ '**' ] |
- .github/workflows/container_build_template.yml | ||
- .github/workflows/build_base_on_forks.yml | ||
workflow_dispatch: | ||
branches: [ '**' ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
branches: [ '**' ] |
|
||
"on": | ||
push: | ||
branches: [ '**' ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
branches: [ '**' ] |
|
||
"on": | ||
push: | ||
branches: [ '**' ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
branches: [ '**' ] |
- .github/workflows/container_build_template.yml | ||
- .github/workflows/build_dev_on_forks.yml | ||
workflow_dispatch: | ||
branches: [ '**' ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
branches: [ '**' ] |
- .github/workflows/build_universal_on_forks.yml | ||
- ansible_collections/arista/avd/** | ||
workflow_dispatch: | ||
branches: [ '**' ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
branches: [ '**' ] |
|
||
jobs: | ||
build_universal_container: | ||
if: github.repository != 'aristanetworks/avd' && ${{ vars.DEBUG_CONTAINER_ACTIONS }} == "true" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where will these containers be uploaded to? It should be the PR repo and not ours.
Change Summary
This PR adds following:
com.arista.license_terms
a limited number of OCI labels:org.opencontainers.image.description
is likely the most critical as it can provide arbitrary instructions, including prod/preview status of the container.