Skip to content

Commit

Permalink
refactoring: EPMLDI-1748 (#94)
Browse files Browse the repository at this point in the history
* Test refactored code

Signed-off-by: Timur Gadiev <[email protected]>

* Add centos8 tests

Signed-off-by: Timur Gadiev <[email protected]>

* Fix packages

Signed-off-by: Timur Gadiev <[email protected]>

* Fix ubuntu

Signed-off-by: Timur Gadiev <[email protected]>

* Fix trailing space

Signed-off-by: Timur Gadiev <[email protected]>

* Test fixed ubuntu

Signed-off-by: Timur Gadiev <[email protected]>

* Test python-pip Ubuntu

Signed-off-by: Timur Gadiev <[email protected]>

* Fix adoptopenjdk

Signed-off-by: Timur Gadiev <[email protected]>

* Test requirements

Signed-off-by: Timur Gadiev <[email protected]>

* Fix epel

Signed-off-by: Timur Gadiev <[email protected]>

* Fix requirements

Signed-off-by: Timur Gadiev <[email protected]>

* Test debug

Signed-off-by: Timur Gadiev <[email protected]>

* Fix epel

Signed-off-by: Timur Gadiev <[email protected]>

* Fix pip Ubuntu

Signed-off-by: Timur Gadiev <[email protected]>

* Test ubuntu

Signed-off-by: Timur Gadiev <[email protected]>

* Test ubuntu 18

Signed-off-by: Timur Gadiev <[email protected]>

* Test alternate prepare

Signed-off-by: Timur Gadiev <[email protected]>

* Fix trailing spaces

Signed-off-by: Timur Gadiev <[email protected]>

* Remove raw python install

Signed-off-by: Timur Gadiev <[email protected]>

* Remove upgrade pip

Signed-off-by: Timur Gadiev <[email protected]>

* Add executable

Signed-off-by: Timur Gadiev <[email protected]>

* Test full java 12 and openjdk-ga

Signed-off-by: Timur Gadiev <[email protected]>

* Test inventory vars

Signed-off-by: Timur Gadiev <[email protected]>

* Fix group vars

Signed-off-by: Timur Gadiev <[email protected]>

* Add ansible_python_interpreter: /usr/bin/python3

Signed-off-by: Timur Gadiev <[email protected]>

* Add extra_args

Signed-off-by: Timur Gadiev <[email protected]>

* Add aws profile

Signed-off-by: Timur Gadiev <[email protected]>

* Add ansible_python_interpreter

Signed-off-by: Timur Gadiev <[email protected]>

* Enable all tests

Signed-off-by: Timur Gadiev <[email protected]>

* Update scenarios

Signed-off-by: Timur Gadiev <[email protected]>

* Fix debian test

Signed-off-by: Timur Gadiev <[email protected]>

* Make separate tasks for paths settings

Signed-off-by: Timur Gadiev <[email protected]>
  • Loading branch information
tgadiev authored and pavelpikta committed Oct 17, 2019
1 parent beb41b8 commit 38ebbb5
Show file tree
Hide file tree
Showing 29 changed files with 402 additions and 202 deletions.
6 changes: 3 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ AWS java-6:
tags:
- aws

AWS java-7:
.AWS java-7:
variables:
AWS_REGION: us-east-1
stage: deployment test
Expand Down Expand Up @@ -78,7 +78,7 @@ AWS openjdk-13 Windows chocolatey:
tags:
- aws

AWS java-11:
.AWS java-11:
variables:
AWS_REGION: us-east-1
stage: deployment test
Expand Down Expand Up @@ -132,7 +132,7 @@ AWS openjdk-ga Windows:
tags:
- aws

AWS java-11 Windows:
.AWS java-11 Windows:
variables:
AWS_REGION: us-east-1
stage: deployment test
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Requirements
- 8
- EL 6: repositories, tarball
- EL 7: repositories, tarball
- EL 8: repositories, tarball
- Ubuntu bionic: repositories, tarball
- Debian stretch: repositories, tarball
- Windows: tarball
Expand All @@ -59,12 +60,14 @@ Requirements
- 12
- EL 6: tarball
- EL 7: tarball
- EL 8: tarball
- Ubuntu bionic: tarball
- Debian stretch: tarball
- Windows: tarball
- 13
- EL 6: tarball, openjdk-fallback
- EL 7: tarball, openjdk-fallback
- EL 8: tarball, openjdk-fallback
- Ubuntu bionic: tarball, openjdk-fallback
- Debian stretch: tarball, openjdk-fallback
- Windows: tarball, openjdk-fallback
Expand Down Expand Up @@ -98,6 +101,7 @@ Requirements
- EL
- 6
- 7
- 8
- Windows
- all

Expand Down
4 changes: 4 additions & 0 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ galaxy_info:
versions:
- "6"
- "7"
- "8"
- name: "Amazon"
versions:
- "2017.12"
Expand All @@ -35,7 +36,10 @@ galaxy_info:
- "java"
- "oracle"
- "jdk"
- "jre"
- "openjdk"
- "adoptopenjdk"
- "zulu"
- "sapjvm"
- "windows"

Expand Down
6 changes: 3 additions & 3 deletions molecule/cloud-aws-adoptopenjdk-11/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ platforms:
- jdk
- repositories

- name: test-aws-centos7-adoptopenjdk-openj9-jre-repositories-11
image: ami-9887c6e7
platform: centos7
- name: test-aws-centos8-adoptopenjdk-openj9-jre-repositories-11
image: ami-0ed2ad9dc845b42b6
platform: centos8
instance_type: m5.large
region: us-east-1
vpc_subnet_id: subnet-0f2b9cd66faea38af
Expand Down
38 changes: 20 additions & 18 deletions molecule/cloud-aws-adoptopenjdk-11/prepare.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
---
- name: Prepare Ubuntu / Debian
- name: Include common prepare
import_playbook: ../resources/provisioning/AWS/prepare.yml

- name: Prepare Debian
hosts: debian_family
gather_facts: false
tasks:
- name: Install python for Ansible
raw: test -e /usr/bin/python || (apt install -y python-minimal)

- name: Add universe repository for bionic
apt_repository:
repo: deb http://archive.ubuntu.com/ubuntu bionic universe
state: present
when: ansible_distribution_release == 'bionic'
become: true

- name: Install python packages
apt:
name:
- python-setuptools
state: present
register: status
until: status is succeeded
become: true
changed_when: false
register: update_result
retries: 10
delay: 5
until: update_result.rc == 0

- name: Prepare RHEL
hosts: rhel_family
gather_facts: false
tasks:
- name: Install python for Ansible
raw: test -e /usr/bin/python || (yum install -y python2 python-simplejson)
become: true
changed_when: false

- name: gather facts
setup:

- name: 'Enable EPEL repository'
- name: Enable EPEL repository
yum:
name: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-\
{{ ansible_distribution_major_version }}.noarch.rpm"
Expand Down
32 changes: 32 additions & 0 deletions molecule/cloud-aws-adoptopenjdk-12/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,26 @@ lint:
options:
config-file: .yamllint
platforms:
- name: test-aws-centos8-adoptopenjdk-hotspot-jre-repositories-12
image: ami-0ed2ad9dc845b42b6
platform: centos8
instance_type: m5.large
region: us-east-1
vpc_subnet_id: subnet-0f2b9cd66faea38af
assign_public_ip: false
spot_price: 0.04
security_group_name:
- default
wait_timeout: 1800
ssh_user: centos
groups:
- rhel_family
- adoptopenjdk
- hotspot
- jre
- repositories
- pip3

- name: test-aws-centos7-adoptopenjdk-openj9-jdk-tarball-12
image: ami-9887c6e7
platform: centos7
Expand All @@ -28,6 +48,7 @@ platforms:
- openj9
- jdk
- adoptopenjdk_fallback
- pip2

- name: test-aws-Debian9-adoptopenjdk-openj9-jre-tarball-12
image: ami-003f19e0e687de1cd
Expand All @@ -47,6 +68,7 @@ platforms:
- openj9
- jre
- adoptopenjdk_fallback
- pip2

- name: test-aws-ubuntu18-adoptopenjdk-hotspot-jdk-repositories-12
image: ami-012fd5eb46f56731f
Expand All @@ -66,6 +88,7 @@ platforms:
- hotspot
- jdk
- repositories
- pip3

- name: test-aws-Debian9-adoptopenjdk-hotspot-jre-repositories-12
image: ami-003f19e0e687de1cd
Expand All @@ -85,6 +108,7 @@ platforms:
- hotspot
- jre
- repositories
- pip2

- name: test-aws-Debian9-adoptopenjdk-s3-12
image: ami-003f19e0e687de1cd
Expand All @@ -103,6 +127,7 @@ platforms:
- debian_family
- adoptopenjdk
- s3
- pip2

provisioner:
name: ansible
Expand All @@ -112,6 +137,13 @@ provisioner:
callback_whitelist: profile_tasks,timer
inventory:
group_vars:
pip2:
pip_executable: pip
python_executable: python
pip3:
pip_executable: pip3
python_executable: python3
ansible_python_interpreter: /usr/bin/python3
adoptopenjdk:
java_distribution: adoptopenjdk
java_major_version: 12
Expand Down
55 changes: 28 additions & 27 deletions molecule/cloud-aws-adoptopenjdk-12/prepare.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
---
- name: Prepare Ubuntu / Debian
- name: Include common prepare
import_playbook: ../resources/provisioning/AWS/prepare.yml

- name: Prepare Debian
hosts: debian_family
gather_facts: false
tasks:
- name: Install python for Ansible
raw: test -e /usr/bin/python || (apt install -y python-minimal)

- name: Add universe repository for bionic
apt_repository:
repo: deb http://archive.ubuntu.com/ubuntu bionic universe
state: present
when: ansible_distribution_release == 'bionic'
become: true

- name: Install python packages
apt:
name:
- python-setuptools
state: present
register: status
until: status is succeeded
become: true
changed_when: false
register: update_result
retries: 10
delay: 5
until: update_result.rc == 0

- name: Prepare RHEL
hosts: rhel_family
gather_facts: false
tasks:
- name: Install python for Ansible
raw: test -e /usr/bin/python || (yum install -y python2 python-simplejson)
become: true
changed_when: false

- name: gather facts
setup:

- name: 'Enable EPEL repository'
- name: Enable EPEL repository
yum:
name: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-\
{{ ansible_distribution_major_version }}.noarch.rpm"
Expand All @@ -35,32 +37,31 @@

- name: Prepare host to S3 transport
hosts: s3
gather_facts: true
tasks:
- name: 'Install pip package'

- name: Install pip package
package:
name: python-pip
name: '{{ python_executable }}-pip'
state: present
register: status
until: status is succeeded
become: true

- name: 'Install boto module'
- name: Install boto module
pip:
name:
- 'pip'
- 'botocore'
- 'boto'
- 'boto3'
- botocore
- boto
- boto3
state: present
executable: '{{ pip_executable }}'
extra_args: --upgrade
register: status
until: status is succeeded
become: true

- name: Prepare host to S3 transport
hosts: localhost
gather_facts: true
vars:
transport_s3_bucket: java-molecule-s3-test
transport_s3_path: /java/adoptopenjdk/OpenJDK12U-jdk_x64_linux_hotspot_12.0.1_12.tar.gz
Expand Down
Loading

0 comments on commit 38ebbb5

Please sign in to comment.