Skip to content
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

ci: remove docker vfs workaround , fix yum task (#11) #12

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 2 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,31 +25,9 @@ jobs:
with:
path: ${{ env.galaxy-name }}

- name: Set up Python 3.8
uses: actions/setup-python@v2
- uses: gofrolist/molecule-action@v2
with:
python-version: 3.8

- name: Upgrade pip
run: |
pip install --upgrade pip wheel
pip --version

- name: Install requirements
run: |
pip install -r requirements.txt
working-directory: ${{ env.galaxy-name }}

# See https://github.com/geerlingguy/raspberry-pi-dramble/issues/166
- name: Force GitHub Actions' docker daemon to use vfs.
run: |
sudo systemctl stop docker
echo '{"cgroup-parent":"/actions_job","storage-driver":"vfs"}' | sudo tee /etc/docker/daemon.json
sudo systemctl start docker

- name: Run molecule
run: molecule test
working-directory: ${{ env.galaxy-name }}
molecule_working_dir: ${{ env.galaxy-name }}
env:
MOLECULE_DISTRO: ${{ matrix.distro }}

Expand Down
2 changes: 2 additions & 0 deletions meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
galaxy_info:
role_name: cvmfs_client
namespace: compute_canada
author: Compute Canada CVMFS Team
description: CVMFS client role
company: Compute Canada
Expand Down
7 changes: 1 addition & 6 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,9 @@
hosts: all
become: true

pre_tasks:
- name: Update apt cache.
apt: update_cache=yes cache_valid_time=600
when: ansible_os_family == 'Debian'

roles:
- role: cvmfs_contrib.cvmfs_client
vars:
cvmfs_client_configure_storage: false
cvmfs_cache_size: "1000" # small cache size for CI
cvmfs_cache_size: "1500" # small cache size for CI
cvmfs_http_proxy: "DIRECT"
4 changes: 3 additions & 1 deletion molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ driver:
name: docker
platforms:
- name: instance
image: "geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu1804}-ansible:latest"
image: "geerlingguy/docker-rockylinux8-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
Expand All @@ -18,3 +18,5 @@ provisioner:
name: ansible
playbooks:
converge: converge.yml
options:
diff: True
24 changes: 23 additions & 1 deletion tasks/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,29 @@

- name: Install CVMFS client and configuration packages
yum:
name: "['cvmfs'] + {{ cvmfs_auto_setup_package }} + {{ cvmfs_fuse3_package }} + {{ cvmfs_configuration }}"
name: "{{ ['cvmfs'] + cvmfs_auto_setup_package + cvmfs_fuse3_package + cvmfs_configuration }}"
vars:
cvmfs_auto_setup_package: "{{ ['cvmfs-auto-setup'] if cvmfs_auto_setup|bool else [] }}"
cvmfs_fuse3_package: "{{ ['cvmfs-fuse3'] if cvmfs_use_fuse3|bool else [] }}"
register: yum

- name: Print yum stdout
debug:
var: yum.stdout_lines
- name: Print yum stderr
debug:
var: yum.stderr_lines

- name: TEST install cvmfs-auto-setup
yum:
name: cvmfs-auto-setup
state: present


- debug:
msg: "cvmfs_configuration is {{ cvmfs_configuration }}"

- name: TEST install cvmfs_configuration
yum:
name: "{{ cvmfs_configuration }}"
state: present