Skip to content

Commit

Permalink
split build and run
Browse files Browse the repository at this point in the history
Signed-off-by: greg pereira <[email protected]>
  • Loading branch information
Gregory-Pereira committed May 3, 2024
1 parent e9d5aa8 commit cc84dde
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/training-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ jobs:
- name: Provision
run: |
ansible-playbook ./main/training/provision/playbook.yml \
-vvv \
-i terraform-test-environment-module/hosts.ini \
--private-key=terraform-test-environment-module/${{ steps.terraform-output.outputs.pem_filename }} \
--extra-vars "image_name=${{ matrix.image_name }}" \
--extra-vars "ssh_public_key='${{ steps.terraform-output.outputs.ssh_public_key }}'" \
--extra-vars "registry_user=${{ secrets.REGISTRY_USER }}" \
--extra-vars "registry_password=${{ secrets.REGISTRY_PASSWORD }}"
Expand Down
18 changes: 18 additions & 0 deletions training/provision/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,24 @@
register: build_result
ansible.builtin.shell: |
podman build -t derived_image:latest -f /tmp/Containerfile --authfile=/etc/containers/auth.json .
- name: Check on Derived Image Build
async_status:
jid: "{{ build_result.ansible_job_id }}"
register: job_result
until: job_result.finished
retries: 33
delay: 30

- name: Check images
ansible.builtin.shell: |
podman images --format="{{.Repository}} {{.ID}}" | grep "derived_images" | awk '{print $2}'
- name: Build and Install the Bootc Image
async: 1000
poll: 0
register: build_result
ansible.builtin.shell: |
podman run --rm --privileged --pid=host --security-opt label=type:unconfined_t -v /:/target -v /var/lib/containers:/var/lib/containers derived_image:latest bootc install to-filesystem --karg=console=ttyS0,115200n8 --replace=alongside /target
- name: Check on Build and Install Bootc Image
Expand Down

0 comments on commit cc84dde

Please sign in to comment.