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 4, 2024
1 parent e9d5aa8 commit a9c8ce1
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 9 deletions.
1 change: 1 addition & 0 deletions .github/workflows/training-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ jobs:
- name: Provision
run: |
ansible-playbook ./main/training/provision/playbook.yml \
-vv \
-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 }}" \
Expand Down
42 changes: 33 additions & 9 deletions training/provision/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,46 @@
registry: quay.io
authfile: /etc/containers/auth.json

- name: Build and Install the Bootc Image
- name: Build and the Derived Image
async: 1000
poll: 0
register: build_result
ansible.builtin.shell: |
podman build -t derived_image:latest -f /tmp/Containerfile --authfile=/etc/containers/auth.json .
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
- name: Check on Derived Image Build
async_status:
jid: "{{ build_result.ansible_job_id }}"
register: job_result
until: job_result.finished
retries: 100
delay: 10
retries: 33
delay: 30

- name: Check images
ansible.builtin.shell: |
podman images -a
# - name: Check images
# ansible.builtin.shell: |
# podman images --format='{{ '{{' }} .Repository {{ '}}' }} {{ '{{' }} .ID {{ '}}' }}' | grep "derived_images" | awk '{print $2}'



# - name: Bootc Install
# 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 Bootc Install
# async_status:
# jid: "{{ build_result.ansible_job_id }}"
# register: job_result
# until: job_result.finished
# retries: 100
# delay: 10

- name: Restart instance
ansible.builtin.reboot:
test_command: which ilab
# - name: Restart instance
# ansible.builtin.reboot:
# test_command: which ilab

0 comments on commit a9c8ce1

Please sign in to comment.