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

fix(.github/workflows): update all the workflows #610

Merged
merged 5 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
22 changes: 3 additions & 19 deletions .github/workflows/ansible-lint-sap_general_preconfigure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,8 @@ on:

jobs:
ansible-lint:
runs-on: ubuntu-latest

steps:
- name: Check out the code
uses: actions/checkout@main

- name: Set up Python 3
uses: actions/setup-python@main
call-ansible-lint-with-role:
uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main
with:
python-version: '3.9'

- name: Install test dependencies
run: |
pip3 install ansible==7.5.0
pip3 install ansible-compat==3.0.2
pip3 install ansible-core==2.14.5
pip3 install ansible-lint==6.8.6
role: sap_general_preconfigure

- name: Run ansible-lint
working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_general_preconfigure
run: ansible-lint
22 changes: 3 additions & 19 deletions .github/workflows/ansible-lint-sap_ha_install_hana_hsr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,8 @@ on:

jobs:
ansible-lint:
runs-on: ubuntu-latest

steps:
- name: Check out the code
uses: actions/checkout@main

- name: Set up Python 3
uses: actions/setup-python@main
call-ansible-lint-with-role:
uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main
with:
python-version: '3.9'

- name: Install test dependencies
run: |
pip3 install ansible==7.5.0
pip3 install ansible-compat==3.0.2
pip3 install ansible-core==2.14.5
pip3 install ansible-lint==6.8.6
role: sap_ha_install_hana_hsr

- name: Run ansible-lint
working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_ha_install_hana_hsr
run: ansible-lint
21 changes: 3 additions & 18 deletions .github/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,9 @@ on:

jobs:
ansible-lint:
runs-on: ubuntu-latest

steps:
- name: Check out the code
uses: actions/checkout@main

- name: Set up Python 3
uses: actions/setup-python@main
call-ansible-lint-with-role:
uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main
with:
python-version: '3.9'
role: sap_ha_pacemaker_cluster

- name: Install test dependencies
run: |
pip3 install ansible==7.5.0
pip3 install ansible-compat==3.0.2
pip3 install ansible-core==2.14.5
pip3 install ansible-lint==6.8.6

- name: Run ansible-lint
working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_ha_pacemaker_cluster
run: ansible-lint
22 changes: 3 additions & 19 deletions .github/workflows/ansible-lint-sap_hana_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,8 @@ on:

jobs:
ansible-lint:
runs-on: ubuntu-latest

steps:
- name: Check out the code
uses: actions/checkout@main

- name: Set up Python 3
uses: actions/setup-python@main
call-ansible-lint-with-role:
uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main
with:
python-version: '3.9'

- name: Install test dependencies
run: |
pip3 install ansible==7.5.0
pip3 install ansible-compat==3.0.2
pip3 install ansible-core==2.14.5
pip3 install ansible-lint==6.8.6
role: sap_hana_install

- name: Run ansible-lint
working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_hana_install
run: ansible-lint
23 changes: 3 additions & 20 deletions .github/workflows/ansible-lint-sap_hana_preconfigure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,7 @@ on:

jobs:
ansible-lint:
runs-on: ubuntu-latest

steps:
- name: Check out the code
uses: actions/checkout@main

- name: Set up Python 3
uses: actions/setup-python@main
call-ansible-lint-with-role:
uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main
with:
python-version: '3.9'

- name: Install test dependencies
run: |
pip3 install ansible==7.5.0
pip3 install ansible-compat==3.0.2
pip3 install ansible-core==2.14.5
pip3 install ansible-lint==6.8.6

- name: Run ansible-lint
working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_hana_preconfigure
run: ansible-lint
role: sap_hana_preconfigure
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,8 @@ on:

jobs:
ansible-lint:
runs-on: ubuntu-latest

steps:
- name: Check out the code
uses: actions/checkout@main

- name: Set up Python 3
uses: actions/setup-python@main
call-ansible-lint-with-role:
uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main
with:
python-version: '3.9'

- name: Install test dependencies
run: |
pip3 install ansible==7.5.0
pip3 install ansible-compat==3.0.2
pip3 install ansible-core==2.14.5
pip3 install ansible-lint==6.8.6
role: sap_hypervisor_node_preconfigure

- name: Run ansible-lint
working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_hypervisor_node_preconfigure
run: ansible-lint
23 changes: 3 additions & 20 deletions .github/workflows/ansible-lint-sap_install_media_detect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,7 @@ on:

jobs:
ansible-lint:
runs-on: ubuntu-latest

steps:
- name: Check out the code
uses: actions/checkout@main

- name: Set up Python 3
uses: actions/setup-python@main
call-ansible-lint-with-role:
uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main
with:
python-version: '3.9'

- name: Install test dependencies
run: |
pip3 install ansible==7.5.0
pip3 install ansible-compat==3.0.2
pip3 install ansible-core==2.14.5
pip3 install ansible-lint==6.8.6

- name: Run ansible-lint
working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_install_media_detect
run: ansible-lint
role: sap_install_media_detect
23 changes: 3 additions & 20 deletions .github/workflows/ansible-lint-sap_maintain_etc_hosts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,7 @@ on:

jobs:
ansible-lint:
runs-on: ubuntu-latest

steps:
- name: Check out the code
uses: actions/checkout@main

- name: Set up Python 3
uses: actions/setup-python@main
call-ansible-lint-with-role:
uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main
with:
python-version: '3.9'

- name: Install test dependencies
run: |
pip3 install ansible==7.5.0
pip3 install ansible-compat==3.0.2
pip3 install ansible-core==2.14.5
pip3 install ansible-lint==6.8.6

- name: Run ansible-lint
working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_maintain_etc_hosts
run: ansible-lint
role: sap_maintain_etc_hosts
22 changes: 3 additions & 19 deletions .github/workflows/ansible-lint-sap_netweaver_preconfigure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,8 @@ on:

jobs:
ansible-lint:
runs-on: ubuntu-latest

steps:
- name: Check out the code
uses: actions/checkout@main

- name: Set up Python 3
uses: actions/setup-python@main
call-ansible-lint-with-role:
uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main
with:
python-version: '3.9'

- name: Install test dependencies
run: |
pip3 install ansible==7.5.0
pip3 install ansible-compat==3.0.2
pip3 install ansible-core==2.14.5
pip3 install ansible-lint==6.8.6
role: sap_netweaver_preconfigure

- name: Run ansible-lint
working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_netweaver_preconfigure
run: ansible-lint
36 changes: 36 additions & 0 deletions .github/workflows/ansible-lint-sap_reusable_workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---

# Workflow for ansible-lint of a role

name: ansible-lint reusable workflow for role

on:
workflow_call:
inputs:
role:
required: true
type: string

jobs:
ansible-lint:
runs-on: ubuntu-latest

steps:
- name: Check out the code
uses: actions/checkout@v4

- name: Set up Python 3
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install test dependencies
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use the versions of [this task](https://github.com/sap-linuxlab/community.sap_install/blob/5ee5cbe030ad152edfe96567155812f9abcdc25f/.github/workflows/ansible-lint.yml#L26) until the end of the 2024 or until there is a major new ansible-lint requirement for Ansible-Galaxy or Automation Hub before that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we open a new issue or discussion to have a memo about this?

run: |
pip3 install ansible==7.5.0
pip3 install ansible-compat==3.0.2
pip3 install ansible-core==2.14.5
pip3 install ansible-lint==6.8.6

- name: Run ansible-lint
working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/${{ inputs.role }}
run: ansible-lint
22 changes: 3 additions & 19 deletions .github/workflows/ansible-lint-sap_storage_setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,8 @@ on:

jobs:
ansible-lint:
runs-on: ubuntu-latest

steps:
- name: Check out the code
uses: actions/checkout@main

- name: Set up Python 3
uses: actions/setup-python@main
call-ansible-lint-with-role:
uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main
with:
python-version: '3.9'

- name: Install test dependencies
run: |
pip3 install ansible==7.5.0
pip3 install ansible-compat==3.0.2
pip3 install ansible-core==2.14.5
pip3 install ansible-lint==6.8.6
role: sap_storage_setup

- name: Run ansible-lint
working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_storage_setup
run: ansible-lint
22 changes: 3 additions & 19 deletions .github/workflows/ansible-lint-sap_swpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,8 @@ on:

jobs:
ansible-lint:
runs-on: ubuntu-latest

steps:
- name: Check out the code
uses: actions/checkout@main

- name: Set up Python 3
uses: actions/setup-python@main
call-ansible-lint-with-role:
uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main
with:
python-version: '3.9'

- name: Install test dependencies
run: |
pip3 install ansible==7.5.0
pip3 install ansible-compat==3.0.2
pip3 install ansible-core==2.14.5
pip3 install ansible-lint==6.8.6
role: sap_swpm

- name: Run ansible-lint
working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_swpm
run: ansible-lint
24 changes: 4 additions & 20 deletions .github/workflows/ansible-lint-sap_vm_preconfigure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,8 @@ on:

jobs:
ansible-lint:
runs-on: ubuntu-latest

steps:
- name: Check out the code
uses: actions/checkout@main

- name: Set up Python 3
uses: actions/setup-python@main
call-ansible-lint-with-role:
uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main
with:
python-version: '3.12'

- name: Install test dependencies
run: |
pip3 install ansible==9.1.0
pip3 install ansible-compat==4.1.10
pip3 install ansible-core==2.16.2
pip3 install ansible-lint==6.22.1

- name: Run ansible-lint
working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/sap_vm_preconfigure
run: ansible-lint
role: sap_vm_preconfigure

4 changes: 2 additions & 2 deletions .github/workflows/ansible-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:

steps:
- name: Check out the code
uses: actions/checkout@main
uses: actions/checkout@v4

- name: Set up Python 3
uses: actions/setup-python@main
uses: actions/setup-python@v5
with:
python-version: '3.12'

Expand Down
Loading