Skip to content

Commit

Permalink
refactoring (#1964)
Browse files Browse the repository at this point in the history
* refactoring

* fix

* update

* fix

* add ansible version tests

* update
  • Loading branch information
dzmitry-rudnouski authored Jul 5, 2021
1 parent 2566147 commit 10a237e
Show file tree
Hide file tree
Showing 38 changed files with 91 additions and 773 deletions.
16 changes: 0 additions & 16 deletions .github/prepare/action.yml

This file was deleted.

83 changes: 68 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,41 @@ jobs:
yamllint . -c .yamllint
ansible-lint . -c .ansible-lint
molecule:
sonar-latest:
needs: lint
runs-on: ubuntu-latest
container: leandelivery/docker-ansible-ci:ansible-2.9
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Prepare
run: |
ansible --version
ansible-lint --version
molecule --version
rm -rf molecule/resources/provisioning
git clone https://github.com/lean-delivery/ansible-molecule-drivers.git molecule/resources/provisioning
pip install jmespath
- name: Molecule
run: molecule test -s default

ubuntu1804-sonar-old-versions:
needs: lint
strategy:
matrix:
scenario:
- default
- sonarqube-8.8.0
- sonarqube-8.7.1
- sonarqube-8.6.1
- sonarqube-8.5.1
- sonarqube-8.4.2
- sonarqube-8.3.1
- sonarqube-8.2
- sonarqube-8.1
- sonarqube-8.0
- sonarqube-7.9.6
sonar_version:
- '8.8.0.42792'
- '8.7.1.42226'
- '8.6.1.40680'
- '8.5.1.38104'
- '8.4.2.36762'
- '8.3.1.34397'
- '8.2.0.32929'
- '8.1.0.31237'
- '8.0'
- '7.9.6'
fail-fast: false
runs-on: ubuntu-latest
container: leandelivery/docker-ansible-ci:ansible-2.9
Expand All @@ -53,6 +72,40 @@ jobs:
with:
fetch-depth: 0
- name: Prepare
uses: ./.github/prepare
run: |
ansible --version
ansible-lint --version
molecule --version
rm -rf molecule/resources/provisioning
git clone https://github.com/lean-delivery/ansible-molecule-drivers.git molecule/resources/provisioning
pip install jmespath
- name: Molecule
run: molecule test -s base
env:
SONAR_VERSION: ${{ matrix.sonar_version }}

ubuntu1804-ansible-versions:
needs: lint
strategy:
matrix:
ansible_version:
- 2.9
- 3
fail-fast: false
runs-on: ubuntu-latest
container: leandelivery/docker-ansible-ci:ansible-${{ matrix.ansible_version }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Prepare
run: |
ansible --version
ansible-lint --version
molecule --version
rm -rf molecule/resources/provisioning
git clone https://github.com/lean-delivery/ansible-molecule-drivers.git molecule/resources/provisioning
pip install jmespath
- name: Molecule
run: molecule test -s ${{ matrix.scenario }}
run: molecule test -s base
9 changes: 0 additions & 9 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,3 @@ AWS sonarqube:
- molecule test -s cloud-aws-direct
tags:
- aws

.EPC sonarqube:
variables:
EPC_REGION: EPAM-BY2
stage: deployment test
script:
- molecule test -s cloud-epc-delegated
tags:
- delegated
19 changes: 8 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ See Jenkins pipeline example here: https://raw.githubusercontent.com/lean-delive
Requirements
--------------

- **Minimal Ansible version**: 2.9
- **Supported Ansible versions**:
- 2.9
- 3 (2.10)
- **Supported SonarQube versions**:
- 7.0 - 7.8
- 7.9 - 7.9.6 LTS
- 7.9.6 LTS
- 8.0 - 8.9.1.44547
- **Supported Java**:
- Oracle JRE 8, 11 (SonarQube 7.9+ requries Java 11+ to run)
- OpenJDK 8, 11 (SonarQube 7.9+ requries Java 11+ to run)
- 11
- **Supported databases**
- PostgreSQL
- MySQL (not recommended)
Expand All @@ -83,10 +83,8 @@ Java, database, web server with self-signed certificate should be installed prel
Role Variables
--------------

- `sonar_major_version` - major number of SonarQube version\
default: 8
- `sonar_minor_version` - minor number of SonarQube version\
default: 9.1.44547
- `sonar_version` - SonarQube version\
default: 8.9.1.44547
- `sonar_path` - installation directory\
default: /opt/sonarqube
- `sonar_user` - user for installing SonarQube\
Expand Down Expand Up @@ -250,8 +248,7 @@ Example Playbook
ssl_certs_path_group: nginx
ssl_certs_common_name: sonarqube.example.com
# sonarqube
sonar_major_version: 8
sonar_minor_version: 9.1.44547 # see versions here https://sonarsource.bintray.com/Distribution/sonarqube
sonar_version: 8.9.1.44547 # see versions here https://sonarsource.bintray.com/Distribution/sonarqube
sonar_check_url: 'http://{{ ansible_fqdn }}:9000'
sonar_proxy_server_name: sonarqube.example.com
sonar_install_optional_plugins: true
Expand Down
4 changes: 1 addition & 3 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
# defaults file for sonarqube
sonar_major_version: 8
sonar_minor_version: 9.1.44547
sonar_version: '{{ sonar_major_version }}.{{ sonar_minor_version }}'
sonar_version: 8.9.1.44547

sonar_path: /opt/sonarqube
sonar_user: sonar
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,13 @@ provisioner:
group_vars:
python3:
ansible_python_interpreter: /usr/bin/python3
host_vars:
test-docker-ubuntu1804-sonarqube:
sonar_version: ${SONAR_VERSION:-7.9.6}
playbooks:
prepare: ../resources/prepare.yml
verify: ../resources/tests/verify.yml
scenario:
name: sonarqube-8.0
name: base
verifier:
name: ansible
File renamed without changes.
47 changes: 0 additions & 47 deletions molecule/cloud-epc-delegated/molecule.yml

This file was deleted.

42 changes: 0 additions & 42 deletions molecule/sonarqube-7.9.6/molecule.yml

This file was deleted.

13 changes: 0 additions & 13 deletions molecule/sonarqube-7.9.6/playbook.yml

This file was deleted.

17 changes: 0 additions & 17 deletions molecule/sonarqube-8.0/Dockerfile.j2

This file was deleted.

13 changes: 0 additions & 13 deletions molecule/sonarqube-8.0/playbook.yml

This file was deleted.

17 changes: 0 additions & 17 deletions molecule/sonarqube-8.1/Dockerfile.j2

This file was deleted.

42 changes: 0 additions & 42 deletions molecule/sonarqube-8.1/molecule.yml

This file was deleted.

Loading

0 comments on commit 10a237e

Please sign in to comment.