Skip to content

Commit

Permalink
Merge commit '99df9f9b0a1b151be4dff269a2511d4e51b55709'
Browse files Browse the repository at this point in the history
  • Loading branch information
dometto committed May 23, 2024
2 parents 0b00502 + 99df9f9 commit 3ff86f7
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 5 deletions.
11 changes: 11 additions & 0 deletions molecule/ext/molecule-src/.github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
47 changes: 47 additions & 0 deletions molecule/ext/molecule-src/.github/workflows/molecule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: Molecule Run
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
molecule:
runs-on: ubuntu-latest
env:
DOCKER_USER: ${{ github.actor }}
DOCKER_PW: ${{ secrets.GITHUB_TOKEN }}
DOCKER_REGISTRY: ghcr.io
ANSIBLE_FORCE_COLOR: '1'
ANSIBLE_STDOUT_CALLBACK: yaml
MOLECULE_CONFIG: molecule/ext/molecule-src/molecule.yml
REQUIREMENTS_FILE: requirements.txt
PLAYBOOK_DIR: ../../../ # relative to molecule/ext/molecule-src/molecule.yml
CRUN_VER: 1.11.2
steps:
- name: Workaround crun issue on ubuntu # https://github.com/UtrechtUniversity/SRC-catalog-items/issues/3
run: |
mkdir -p "${HOME}/.local/bin"
curl -L "https://github.com/containers/crun/releases/download/${CRUN_VER}/crun-${CRUN_VER}-linux-amd64" -o "${HOME}/.local/bin/crun"
chmod +x "${HOME}/.local/bin/crun"
crun --version
mkdir -p "${HOME}/.config/containers"
cat << EOF > "${HOME}/.config/containers/containers.conf"
[engine.runtimes]
crun = [
"${HOME}/.local/bin/crun",
"/usr/bin/crun"
]
EOF
- name: Checkout
uses: actions/checkout@v4
- run: git clone https://github.com/UtrechtUniversity/SRC-molecule-test.git molecule
- run: mkdir molecule/ext && cd molecule/ext && ln -s ../../ molecule-src
- run: pip install -r ${{ env.REQUIREMENTS_FILE }}
- run: ansible-galaxy install -r requirements.yml
- name: Molecule tests
run: |
molecule -vv -c ${{ env.MOLECULE_CONFIG }} test
2 changes: 1 addition & 1 deletion molecule/ext/molecule-src/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
ansible.builtin.command: >
ansible-playbook -c local -v -b {{ remote_plugin.arguments }} --extra-vars='{{ remote_plugin.parameters }}' /rsc/plugins/{{ item.name}}/{{ item.path }}
register: ansible_on_workspace
changed_when: "'changed=0' not in ansible_on_workspace.stdout_lines[-1]"
changed_when: "ansible_on_workspace.stdout_lines is not defined or 'changed=0' not in ansible_on_workspace.stdout_lines[-1]"
vars:
remote_plugin:
script_type: Ansible PlayBook
Expand Down
8 changes: 4 additions & 4 deletions molecule/ext/molecule-src/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Default requirements file for running SRC molecule tests
molecule~=6.0
molecule-plugins @ git+https://github.com/dometto/molecule-plugins@fix248
molecule~=24.2
molecule-plugins~=23.5
jmespath~=1.0
docker~=6.0
podman~=4.0
docker~=7.0
podman~=5.0

0 comments on commit 3ff86f7

Please sign in to comment.