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

add github action matrix #93

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions .github/workflows/concourse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
matrix:
ruby-version: ['3.0']
ansible-version: ['2.8.17', '2.9.17', '2.10.3']
concourseci_version: ['v7.0.0', 'v6.7.5']

steps:
- uses: actions/checkout@v2
Expand All @@ -30,6 +31,7 @@ jobs:
- name: Setup ansible
run: |
sudo apt-get install -y python3-setuptools
pip3 install --upgrade pip
pip3 install ansible==${{matrix.ansible-version}}
export PATH=/home/runner/.local/bin:$PATH

Expand Down
2 changes: 1 addition & 1 deletion .kitchen-cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ provisioner :
name : ansible_push
ansible_config : "tests/ansible.cfg"
extra_vars : "@./test/integration/simple/concourse-vars.yml"
raw_arguments : "--extra-vars='ansible_python_interpreter=/usr/bin/python3'"
raw_arguments : "-e concourseci_version=<%= ENV['concourseci_version'] || 'v7.0.0' %> --extra-vars='ansible_python_interpreter=/usr/bin/python3'"

groups :
concourse-web : ['web-ubuntu1804']
Expand Down
17 changes: 3 additions & 14 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,10 @@ provisioner :
diff : True
sudo : True
extra_vars : "@./test/integration/simple/concourse-vars.yml"
raw_arguments : "-e concourseci_version=<%= ENV['concourseci_version'] || 'v7.0.0' %> --extra-vars='ansible_python_interpreter=/usr/bin/python3'"
# verbose : "vvvvv"

platforms :
### Ubuntu 1604
- name : "ubuntu1604"
driver_config :
image : ubuntu:16.04
platform : ubuntu
provisioner :
groups :
concourse-web :
- 'simple-ubuntu1604'
concourse-worker :
- 'simple-ubuntu1604'
- 'worker-ubuntu1604'
### Ubuntu 1804
- name : "ubuntu1804"
driver_config :
Expand All @@ -52,7 +41,7 @@ platforms :
concourse-worker :
- 'simple-ubuntu1804'
- 'worker-ubuntu1804'
### Ubuntu 2004
# ## Ubuntu 2004
# - name : "ubuntu2004"
# driver_config :
# image : ubuntu:20.04
Expand All @@ -63,7 +52,7 @@ platforms :
# - 'simple-ubuntu2004'
# concourse-worker :
# - 'simple-ubuntu2004'
# - 'worker-ubuntu2004'
# - 'worker-ubuntu2004'
suites:
- name : simple
provisioner :
Expand Down
39 changes: 0 additions & 39 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# Concourse version
concourseci_version : "v5.4.0"
concourseci_version : "v7.0.0"
## Dir structure
concourseci_base_dir : "/opt/concourseci"
concourseci_bin_dir : "{{ concourseci_base_dir }}/bin"
Expand Down
9 changes: 4 additions & 5 deletions tasks/auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

- name: auth | Install httpasswd
apt:
name: "python-passlib,python-bcrypt"
name: "python3-passlib,python3-bcrypt" #"{{ passlib_apt_dependencies }}"
state: "present"
when: ansible_os_family == 'Debian'
when: ansible_os_family == 'Debian'

- name: auth | Check that one local user is added
fail:
msg="At least one local user is needed"
msg: "At least one local user is needed"
when: concourse_local_users | length == 0

- name: auth | Create bcrypt password for local users
Expand All @@ -31,7 +31,7 @@
- name: auth | Add concourse_add_local_user
set_fact:
concourse_facts_local_users:
CONCOURSE_ADD_LOCAL_USER: "{{ list_users.stdout_lines | join(',') }}"
CONCOURSE_ADD_LOCAL_USER : "{{ list_users.stdout_lines | join(',') }}"

- name: auth | Set empty dict concourse_facts_main_users
set_fact:
Expand All @@ -42,4 +42,3 @@
concourse_facts_main_users:
CONCOURSE_MAIN_TEAM_LOCAL_USER: "{% for local_user in concourse_local_users %}{{local_user.user}}{% if not loop.last %},{% endif %}{% endfor %}"
when: concourse_web_options['CONCOURSE_MAIN_TEAM_LOCAL_USER'] is not defined

4 changes: 4 additions & 0 deletions tasks/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
msg: "Configuration for this role has changed. Please read the Readme.md"
when: CONCOURSE_WEB_BIND_IP is defined or CONCOURSE_WEB_TSA_HOST is defined

- name: checks | Display version
ansible.builtin.debug:
msg: "Target version {{concourseci_version}}"

- name: checks | Set downloaded url for concourse version 4.x or lower
set_fact:
concourseci_download_url: "{{ concourseci_download_fr_url }}/{{ version_4_filename }}"
Expand Down
2 changes: 1 addition & 1 deletion test/helper_roles/roles_requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

- name: postgresql
src: git+https://github.com/ANXS/postgresql.git
version: v1.9.0
version: v1.12.0
9 changes: 6 additions & 3 deletions test/integration/simple/simple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,21 @@
gather_facts: False
become: True
tasks:
- name: install python 2
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)
- name: install python 3
raw: test -e /usr/bin/python3 || (apt -y update && apt install -y python3-minimal)
changed_when: False

- name: Install iproute2
- name: Install dep
hosts: all
gather_facts: False
become: True
tasks:
- name: install iproute 2
apt:
name: iproute2
- name: install gnupg
apt:
name: gnupg

- name: Provision Concourse
hosts: all
Expand Down
4 changes: 4 additions & 0 deletions vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ concourseci_download_fr_url : "https://github.com/concourse/concourse/releases/

concourseci_worker_position : "{{ groups[concourseci_worker_group].index(inventory_hostname)| default(0) }}"

passlib_apt_py3_dependencies: "python3-passlib,python3-bcrypt"
passlib_apt_py2_dependencies: python-passlib,python-bcrypt
passlib_apt_dependencies: "{{ passlib_apt_py3_dependencies if 'python3' in ansible_python_interpreter | default('') else passlib_apt_py2_dependencies }}"

## MacOSx stuff
concourseci_launchd_path : "/Library/LaunchDaemons"
concourseci_launchd_web : "com.github.ahelal.concourse.web"
Expand Down