Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • lucasmagalhaes/ics-ans-role-conda
  • alexthibault-ferial/ics-ans-role-conda
  • andersharrisson/ics-ans-role-conda
  • roryclarke/ics-ans-role-conda
  • rosselliot/ics-ans-role-conda
  • ics-ansible-galaxy/ics-ans-role-conda
6 results
Show changes
Commits on Source (11)
---
include: 'https://gitlab.esss.lu.se/ics-infrastructure/gitlab-ci-yml/raw/master/Molecule.gitlab-ci.yml'
run_molecule:
tags:
- $RUNNER_TAG
parallel:
matrix:
- SCENARIO: default
RUNNER_TAG: molecule
- SCENARIO: debian
RUNNER_TAG: molecule
- SCENARIO: ubuntu
RUNNER_TAG: ubuntu_2204
- SCENARIO: ess-linux
RUNNER_TAG: molecule
script:
- molecule test --scenario-name $SCENARIO
---
conda_python_version: 3.9.13
conda_version: 4.12.0
conda_mamba_version: 1.0.0
conda_python_version: 3.10.13
conda_version: 23.11.0
conda_mamba_version: 1.5.5
conda_owner: root
conda_group: root
conda_channel_alias: https://artifactory.esss.lu.se/artifactory/api/conda
......@@ -15,3 +15,4 @@ conda_env_files: []
# Name of the conda environment to activate by default
# If left empty no conda env is activated
conda_default_env: ""
conda_use_only_tar_bz2: false
......@@ -12,6 +12,7 @@ provisioner:
converge: ../default/converge.yml
config_options:
defaults:
callback_whitelist: profile_tasks
gather_timeout: 20
scenario:
name: debian
......@@ -21,5 +22,9 @@ verifier:
driver:
name: docker
platforms:
- name: ics-ans-role-conda-debian
image: debian:9
- name: ics-ans-role-conda-debian10
image: debian:10
- name: ics-ans-role-conda-debian11
image: debian:11
- name: ics-ans-role-conda-debian12
image: debian:12
......@@ -10,6 +10,7 @@ provisioner:
name: ansible
config_options:
defaults:
callback_whitelist: profile_tasks
gather_timeout: 20
inventory:
group_vars:
......
---
- name: Prepare ics-ans-role-conda-rpm
hosts: ics-ans-role-conda-rpm
gather_facts: false
hosts: ics-ans-role-conda-rpm*
gather_facts: true
tasks:
- name: install conda rpm
yum:
......
......@@ -10,7 +10,7 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
def test_conda_version(host):
cmd = host.run("/opt/conda/bin/conda --version 2>&1")
assert cmd.rc == 0
assert cmd.stdout.strip() == "conda 4.12.0"
assert cmd.stdout.strip() == "conda 23.11.0"
def test_conda_path(host):
......@@ -21,7 +21,7 @@ def test_conda_path(host):
def test_mamba_version(host):
cmd = host.run("/opt/conda/bin/mamba --version 2>&1")
assert cmd.rc == 0
assert "mamba 1.0.0" in cmd.stdout.strip()
assert "mamba 1.5.5" in cmd.stdout.strip()
def test_mamba_path(host):
......@@ -32,8 +32,7 @@ def test_mamba_path(host):
def test_condarc_file(host):
condarc = host.file("/opt/conda/.condarc")
if (
host.ansible.get_variables()["inventory_hostname"]
== "ics-ans-role-conda-rpm"
host.ansible.get_variables()["inventory_hostname"].startswith("ics-ans-role-conda-rpm")
):
assert (
condarc.content_string.strip()
......@@ -42,7 +41,7 @@ channels:
- conda-forge
default_channels: []
auto_update_conda: False
use_only_tar_bz2: True"""
use_only_tar_bz2: False"""
)
else:
assert (
......@@ -54,15 +53,14 @@ channels:
- conda-forge
default_channels: []
auto_update_conda: False
use_only_tar_bz2: True"""
use_only_tar_bz2: False"""
)
def test_condaz_default_env_file(host):
condaz_default_env = host.file("/etc/profile.d/condaz_default_env.sh")
if (
host.ansible.get_variables()["inventory_hostname"]
== "ics-ans-role-conda-create-env"
host.ansible.get_variables()["inventory_hostname"].startswith("ics-ans-role-conda-create-env")
) or (
host.ansible.get_variables()["inventory_hostname"]
== "ics-ans-role-conda-create-env-ess-linux"
......@@ -79,8 +77,7 @@ conda activate python36"""
@pytest.mark.parametrize("name", ["/opt/conda", "/opt/conda/envs", "/opt/conda/pkgs"])
def test_conda_owner(host, name):
if (
host.ansible.get_variables()["inventory_hostname"]
== "ics-ans-role-conda-create-env"
host.ansible.get_variables()["inventory_hostname"].startswith("ics-ans-role-conda-create-env")
) or (
host.ansible.get_variables()["inventory_hostname"]
== "ics-ans-role-conda-create-env-ess-linux"
......
......@@ -14,6 +14,7 @@ provisioner:
side_effect: ../default/side_effect.yml
config_options:
defaults:
callback_whitelist: profile_tasks
gather_timeout: 20
inventory:
group_vars:
......
---
dependency:
name: galaxy
lint: |
set -e
yamllint .
ansible-lint
flake8
provisioner:
name: ansible
playbooks:
converge: ../default/converge.yml
config_options:
defaults:
callback_whitelist: profile_tasks
gather_timeout: 20
inventory:
group_vars:
conda_create_env:
conda_env_files:
- "{{ playbook_dir }}/tests/python36_env.yml"
- https://gitlab.esss.lu.se/ics-ansible-galaxy/ics-ans-role-conda/raw/master/molecule/default/tests/python27_env.yml
conda_default_env: python36
conda_owner: vagrant
conda_group: vagrant
conda_rpm:
conda_channels:
- conda-forge
scenario:
name: ubuntu
verifier:
name: testinfra
directory: ../default/tests/
driver:
name: docker
platforms:
- name: ics-ans-role-conda-default-ubuntu20
image: registry.esss.lu.se/ics-docker/ubuntu-systemd:focal
- name: ics-ans-role-conda-create-env-ubuntu20
image: registry.esss.lu.se/ics-docker/ubuntu-systemd:focal
groups:
- conda_create_env
- name: ics-ans-role-conda-rpm-ubuntu20
image: registry.esss.lu.se/ics-docker/ubuntu-systemd:focal
groups:
- conda_rpm
- name: ics-ans-role-conda-default-ubuntu22
image: registry.esss.lu.se/ics-docker/ubuntu-systemd:22.04
- name: ics-ans-role-conda-create-env-ubuntu22
image: registry.esss.lu.se/ics-docker/ubuntu-systemd:22.04
groups:
- conda_create_env
- name: ics-ans-role-conda-rpm-ubuntu22
image: registry.esss.lu.se/ics-docker/ubuntu-systemd:22.04
groups:
- conda_rpm
---
- name: Prepare ics-ans-role-conda-create-env
hosts: ics-ans-role-conda-create-env*
gather_facts: false
tasks:
- name: create vagrant user
user:
name: vagrant
state: present
- name: Prepare ics-ans-role-conda-rpm
hosts: ics-ans-role-conda-rpm*
gather_facts: false
tasks:
- name: create conda directory
file:
name: /opt/conda
state: directory
- name: create dummy .condarc file
file:
path: /opt/conda/.condarc
state: touch
......@@ -6,13 +6,6 @@
- sudo
state: present
- name: install extra required packages (ess-linux)
package:
name:
- tar
state: present
when: ansible_os_family == 'Concurrent CPU SDK'
- name: check if conda is installed
command: "{{ conda_path }}/bin/conda --version 2>&1"
check_mode: false
......
......@@ -5,4 +5,4 @@ channels:
{% endfor %}
default_channels: []
auto_update_conda: False
use_only_tar_bz2: True
use_only_tar_bz2: {{ conda_use_only_tar_bz2 | string }}
---
conda_installer: Mambaforge-4.12.0-2-Linux-x86_64.sh
conda_installer_md5: 1065611da2fda460c15a33e061099b0b
conda_installer: Miniforge3-23.11.0-0-Linux-x86_64.sh
conda_installer_md5: ee57176f95c313b23850e0221498f8e8
conda_installer_url: "https://artifactory.esss.lu.se/artifactory/swi-pkg/conda/{{ conda_installer }}"
conda_path: /opt/conda