forked from EESSI/filesystem-layer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request EESSI#29 from bedroge/ansible_ci
CI for testing compatibility layer installation playbook
- Loading branch information
Showing
6 changed files
with
71 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM awesomebytes/gentoo_prefix_boostrapped | ||
|
||
USER root | ||
RUN apt-get install -y python3-pip | ||
RUN pip3 install ansible | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# action.yml | ||
name: 'Install EESSI compatibility layer' | ||
description: 'Use Ansible playbook to install the EESSI compatibility layer inside a Gentoo Prefix Docker container' | ||
inputs: | ||
gentoo-prefix-path: | ||
description: 'Path to the Gentoo Prefix installation' | ||
required: true | ||
default: '/tmp/gentoo' | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' | ||
args: | ||
- ${{ inputs.gentoo-prefix-path }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash -l | ||
|
||
cat << EOF > hosts | ||
[cvmfsstratum0servers] | ||
127.0.0.1 | ||
EOF | ||
|
||
ansible-playbook --connection=local --inventory=hosts -e ansible_python_interpreter=python3 -e gentoo_prefix_path=$1 ${GITHUB_WORKSPACE}/ansible/playbooks/install.yml | ||
|
||
# A successful installation should at least have Lmod and archspec, | ||
# so let's check if we can use them. | ||
source $1/usr/lmod/lmod/init/profile | ||
module avail | ||
$1/usr/bin/archspec cpu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Install compatibility layer | ||
|
||
# Controls when the action will run. Triggers the workflow on push or pull request | ||
# events but only for the master branch | ||
on: | ||
push: | ||
branches: [ master ] | ||
paths: | ||
- 'ansible/playbooks/**' | ||
pull_request: | ||
branches: [ master ] | ||
paths: | ||
- 'ansible/playbooks/**' | ||
|
||
jobs: | ||
install_compat_layer: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Run install.yml playbook in Docker container | ||
uses: ./.github/actions/install_compatibility_layer | ||
with: | ||
gentoo-prefix-path: '/tmp/gentoo' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters