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 SLES12 support #77

Open
wants to merge 6 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
4 changes: 2 additions & 2 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
exclude_paths:
- ./.travis.yml
- ./molecule/
rulesdir:
- ~/ansible-lint-rules/rules/
use_default_rules: true
verbosity: 1
verbosity: 1
19 changes: 19 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,22 @@ jobs:
ansible-galaxy install -r requirements.yml
cd ..
ansible-playbook ansible-role-jenkins/playbook.yml
opensuse-leap:
runs-on: ubuntu-22.04
container: opensuse/leap:latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Install ansible
run: |
sudo apt-add-repository --yes --update ppa:ansible/ansible
sudo apt-get update
sudo apt-get install ansible -y
ansible --version
- name: Run playbook
run: |
ansible-galaxy install -r requirements.yml
cd ..
ansible-playbook ansible-role-jenkins/playbook.yml
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Jenkins 2 installation
=========
[![License](https://img.shields.io/badge/license-Apache-green.svg?style=flat)](https://raw.githubusercontent.com/lean-delivery/ansible-role-jenkins/master/LICENSE)
[![Build Status](https://travis-ci.org/lean-delivery/ansible-role-jenkins.svg?branch=master)](https://travis-ci.org/lean-delivery/ansible-role-jenkins)
[![Build Status](https://gitlab.com/lean-delivery/ansible-role-jenkins/badges/master/build.svg)](https://gitlab.com/lean-delivery/ansible-role-jenkins/pipelines)
[![Galaxy](https://img.shields.io/badge/galaxy-lean_delivery.jenkins-blue.svg)](https://galaxy.ansible.com/lean_delivery/jenkins)
![Ansible](https://img.shields.io/ansible/role/d/29895.svg)
Expand Down Expand Up @@ -29,7 +28,7 @@ Requirements
------------

- Minimal Version of the ansible for installation: 2.7
- **Java 8** [![Build Status](https://travis-ci.org/lean-delivery/ansible-role-java.svg?branch=master)](https://travis-ci.org/lean-delivery/ansible-role-java)
- **Java 8**
- **Supported OS**:
- CentOS
- 8
Expand Down
39 changes: 17 additions & 22 deletions molecule/cloud-aws-direct/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,24 @@ dependency:
role-file: requirements.yml
driver:
name: ec2
lint:
name: yamllint
options:
config-file: .yamllint
lint: |
yamllint
ansible-lint
platforms:
- name: test-aws-centos8-jenkins
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.05
security_group_name:
- default
wait_timeout: 1800
ssh_user: centos
groups:
- rhel_family
# - name: test-aws-centos8-jenkins
# 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.05
# security_group_name:
# - default
# wait_timeout: 1800
# ssh_user: centos
# groups:
# - rhel_family

- name: test-aws-Amazon2-jenkins
image: ami-0b898040803850657
Expand Down Expand Up @@ -90,11 +89,7 @@ provisioner:
prepare: ../resources/prepare.yml
destroy: ../resources/provisioning/AWS/destroy.yml
verify: ../resources/tests/verify.yml
lint:
name: ansible-lint
scenario:
name: cloud-aws-direct
verifier:
name: ansible
lint:
name: ansible-lint
4 changes: 4 additions & 0 deletions tasks/configure/Suse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
# included file
- name: Force all notified handlers to run
meta: flush_handlers
6 changes: 6 additions & 0 deletions tasks/repository_install/Suse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
- name: Jenkins Repository
community.general.zypper_repository:
name: jenkins
repo: "{{ jenkins_zypper_repo_url }}"
state: present
1 change: 1 addition & 0 deletions tasks/system/Suse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
---
113 changes: 113 additions & 0 deletions templates/jenkins_system_config/Suse_configuration.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
## Path: Development/Jenkins
## Description: Jenkins Automation Server
## Type: string
## Default: "/var/lib/jenkins"
## ServiceRestart: jenkins
#
# Directory where Jenkins store its configuration and working
# files (checkouts, build reports, artifacts, ...).
#
JENKINS_HOME='{{ jenkins2_home_directory }}'

## Type: string
## Default: "/bin/bash"
## ServiceRestart: jenkins
#
# Shell used to initialize the Jenkins server's environment.
# Setting this option to the path of a shell executable allows
# initialization of the Jenkins server environment using
# standard shell startup scripts.
# Disabling this option causes the Jenkins server to be run
# with a minimal environment.
#
JENKINS_INIT_SHELL="/bin/bash"

## Type: string
## Default: ""
## ServiceRestart: jenkins
#
# Java runtime to run Jenkins
# When left empty, the current system default JRE, as defined
# by update-alternatives(8), is used.
#
JENKINS_JAVA_HOME=""

## Type: string
## Default: "jenkins"
## ServiceRestart: jenkins
#
# Unix user account that runs the Jenkins daemon
# Be careful when you change this, as you need to update
# permissions of $JENKINS_HOME and /var/log/jenkins,
# and if you have already run Jenkins, potentially other
# directories such as /var/cache/jenkins .
#
JENKINS_USER='{{ jenkins2_user }}'

## Type: integer(-20:20)
## Default: 0
## ServiceRestart: jenkins
#
# The nice level at which the Jenkins server (and its build jobs) run.
#
JENKINS_NICE="0"

## Type: string
## Default: "-Djava.awt.headless=true"
## ServiceRestart: jenkins
#
# Options to pass to java when running Jenkins.
#
JENKINS_JAVA_OPTIONS='{{ jenkins2_config_java_options }}{{ (jenkins2_permissive_script_enabled | bool) | ternary(" -Dpermissive-script-security.enabled=no_security","") }}'

## Type: integer(0:65535)
## Default: 8080
## ServiceRestart: jenkins
#
# Port Jenkins is listening on.
# Set to -1 to disable
#
JENKINS_PORT={{ jenkins2_config_http_port }}


## Type: integer(1:9)
## Default: 5
## ServiceRestart: jenkins
#
# Debug level for logs -- the higher the value, the more verbose.
# 5 is INFO.
#
JENKINS_DEBUG_LEVEL={{ jenkins2_config_debug_level }}

## Type: yesno
## Default: no
## ServiceRestart: jenkins
#
# Whether to enable access logging or not.
#
JENKINS_ENABLE_ACCESS_LOG='{{ jenkins2_config_enable_access_log }}'

## Type: integer
## Default: 100
## ServiceRestart: jenkins
#
# Maximum number of HTTP worker threads.
#
JENKINS_HANDLER_MAX={{ jenkins2_config_handler_max }}

## Type: integer
## Default: 20
## ServiceRestart: jenkins
#
# Maximum number of idle HTTP worker threads.
#
JENKINS_HANDLER_IDLE={{ jenkins2_config_handler_idle }}

## Type: string
## Default: ""
## ServiceRestart: jenkins
#
# Pass arbitrary arguments to Jenkins.
# Full option list: java -jar jenkins.war --help
#
JENKINS_ARGS='{{ jenkins2_config_args }}'
6 changes: 6 additions & 0 deletions vars/Suse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
jenkins_requirements: []

jenkins_config_service_path: /etc/sysconfig/jenkins

jenkins_zypper_repo_url: https://pkg.jenkins.io/opensuse-stable/?ssl_verify=no
Loading