Skip to content

Commit

Permalink
Remove extra quote from ssh_public_key
Browse files Browse the repository at this point in the history
Nice find by Xiaofeng!

Signed-off-by: Colin Walters <[email protected]>
  • Loading branch information
cgwalters authored and lmilbaum committed May 5, 2024
1 parent 9636f3d commit 88792bc
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 18 deletions.
22 changes: 10 additions & 12 deletions .github/workflows/training-e2e.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: traning E2E

on:
# schedule: # schedule the job to run every day at midnight
# - cron: '0 * * * *'
schedule: # schedule the job to run every day at midnight
- cron: '0 12 * * *'

# For testing purposes, will remove
pull_request:
Expand Down Expand Up @@ -86,7 +86,6 @@ jobs:
- name: Provision
run: |
ansible-playbook ./main/training/tests/provision/playbook.yml \
-v \
-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 All @@ -99,17 +98,16 @@ jobs:
- name: Wait for 4 minutes
run: sleep 240

# - name: Setup tmate session
# uses: mxschmitt/[email protected]
# timeout-minutes: 15
# with:
# detached: true
# limit-access-to-actor: true

- name: Run e2e tests
- name: Setup tmate session
uses: mxschmitt/[email protected]
timeout-minutes: 15
with:
detached: true
limit-access-to-actor: false
- name: Run tests
run: |
ansible-playbook ./main/training/tests/e2e-tests/playbook.yml \
-vvvv \
-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
22 changes: 17 additions & 5 deletions training/tests/e2e-tests/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,20 @@
- name: Gather facts for first time
ansible.builtin.setup:

- name: Clone repository
git:
repo: https://github.com/instructlab/instructlab.git
dest: /tmp/instructlab
version: d905a25bed58b3649e7d7eef74257eea79be6e94
- name: Get test script
ansible.builtin.get_url:
url: https://raw.githubusercontent.com/instructlab/instructlab/main/scripts/basic-workflow-tests.sh
dest: /tmp/basic-workflow-tests.sh
mode: 755

- name: Run tests
ansible.builtin.shell: /tmp/basic-workflow-tests.sh
register: out

- name: Test Results - stdout
debug:
msg: "{{out.stdout_lines}}"

- name: Test Results - stderr
debug:
msg: "{{out.stderr_lines}}"
2 changes: 1 addition & 1 deletion training/tests/provision/templates/Containerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM quay.io/ai-lab/{{ image_name }}:latest
ARG sshpubkey

RUN set -eu && mkdir /usr/etc-system && \
echo 'AuthorizedKeysFile /usr/etc-system/%u.keys' >> /etc/ssh/sshd_config.d/30-auth-system.conf && \
echo 'AuthorizedKeysFile /usr/etc-system/%u.keys' > /etc/ssh/sshd_config.d/30-auth-system.conf && \
echo $sshpubkey > /usr/etc-system/root.keys && \
chmod 0600 /usr/etc-system/root.keys

Expand Down

0 comments on commit 88792bc

Please sign in to comment.