Compare commits
4 Commits
1.0.1
...
3eed4ba4fe
| Author | SHA1 | Date | |
|---|---|---|---|
| 3eed4ba4fe | |||
| 1af997a6d5 | |||
| adbced0d81 | |||
|
|
7d84294e7d |
29
.gitignore
vendored
29
.gitignore
vendored
@@ -3,3 +3,32 @@
|
|||||||
Gemfile.lock
|
Gemfile.lock
|
||||||
FileList
|
FileList
|
||||||
.scannerwork
|
.scannerwork
|
||||||
|
.vscode
|
||||||
|
.idea
|
||||||
|
*.log
|
||||||
|
*.tmp
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
*.bak
|
||||||
|
*.backup
|
||||||
|
*.orig
|
||||||
|
*.rej
|
||||||
|
*.sublime-project
|
||||||
|
*.sublime-workspace
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
*.gem
|
||||||
|
*.rbc
|
||||||
|
.bundle
|
||||||
|
vendor/bundle
|
||||||
|
vendor/cache
|
||||||
|
vendor/gems
|
||||||
|
vendor/ruby
|
||||||
|
log/*
|
||||||
|
tmp/*
|
||||||
|
!.keep
|
||||||
|
coverage/*
|
||||||
|
spec/reports/*
|
||||||
|
test/reports/*
|
||||||
|
doc/*
|
||||||
|
pkg/*
|
||||||
|
|||||||
31
Jenkinsfile
vendored
31
Jenkinsfile
vendored
@@ -1,7 +1,5 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent {
|
agent any
|
||||||
label 'puppet'
|
|
||||||
}
|
|
||||||
|
|
||||||
post {
|
post {
|
||||||
always {
|
always {
|
||||||
@@ -69,7 +67,7 @@ pipeline {
|
|||||||
withCredentials([string(credentialsId: 'sonar-token', variable: 'SONAR_TOKEN')]) {
|
withCredentials([string(credentialsId: 'sonar-token', variable: 'SONAR_TOKEN')]) {
|
||||||
sh '''
|
sh '''
|
||||||
/opt/sonar-scanner/bin/sonar-scanner \
|
/opt/sonar-scanner/bin/sonar-scanner \
|
||||||
-Dsonar.projectKey=php_cd \
|
-Dsonar.projectKey=confdroid_php \
|
||||||
-Dsonar.sources=. \
|
-Dsonar.sources=. \
|
||||||
-Dsonar.host.url=https://sonarqube.confdroid.com \
|
-Dsonar.host.url=https://sonarqube.confdroid.com \
|
||||||
-Dsonar.token=$SONAR_TOKEN
|
-Dsonar.token=$SONAR_TOKEN
|
||||||
@@ -90,11 +88,36 @@ pipeline {
|
|||||||
sh '''
|
sh '''
|
||||||
git config user.name "Jenkins Server"
|
git config user.name "Jenkins Server"
|
||||||
git config user.email jenkins@confdroid.com
|
git config user.email jenkins@confdroid.com
|
||||||
|
git rm -r --cached .vscode || echo "No .vscode to remove from git"
|
||||||
git add -A && git commit -am "Recommit for updates in build $BUILD_NUMBER" || echo "No changes to commit"
|
git add -A && git commit -am "Recommit for updates in build $BUILD_NUMBER" || echo "No changes to commit"
|
||||||
git push origin HEAD:master
|
git push origin HEAD:master
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
stage('Mirror to Gitea') {
|
||||||
|
steps {
|
||||||
|
withCredentials([usernamePassword(
|
||||||
|
credentialsId: 'Jenkins-gitea',
|
||||||
|
usernameVariable: 'GITEA_USER',
|
||||||
|
passwordVariable: 'GITEA_TOKEN')]) {
|
||||||
|
script {
|
||||||
|
// Checkout from GitLab (already done implicitly)
|
||||||
|
sh '''
|
||||||
|
git checkout master
|
||||||
|
git pull origin master
|
||||||
|
git branch -D development
|
||||||
|
git branch -D jenkins-build-$BUILD_NUMBER
|
||||||
|
git rm -f Jenkinsfile
|
||||||
|
git rm -r --cached .vscode || echo "No .vscode to remove from git"
|
||||||
|
git commit --amend --no-edit --allow-empty
|
||||||
|
git remote add master https://sourcecode.confdroid.com/confdroid/confdroid_php.git
|
||||||
|
git -c credential.helper="!f() { echo username=${GITEA_USER}; echo password=${GITEA_TOKEN}; }; f" \
|
||||||
|
push master --mirror
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
24
README.md
24
README.md
@@ -1,14 +1,27 @@
|
|||||||
# Readme
|
# Readme
|
||||||
|
|
||||||
[](https://jenkins.confdroid.com/job/php_cd/)|
|
[](https://jenkins.confdroid.com/job/confdroid_php/)
|
||||||
|
[](https://sonarqube.confdroid.com/dashboard?id=confdroid_php)
|
||||||
|
[](https://sonarqube.confdroid.com/dashboard?id=confdroid_php)
|
||||||
|
|
||||||
|
|
||||||
|
- [Readme](#readme)
|
||||||
|
- [Synopsis](#synopsis)
|
||||||
|
- [WARNING](#warning)
|
||||||
|
- [Features](#features)
|
||||||
|
- [Support](#support)
|
||||||
|
- [Parameter Inheritance](#parameter-inheritance)
|
||||||
|
- [Module Deployment](#module-deployment)
|
||||||
|
- [Tests](#tests)
|
||||||
|
- [Contact Us](#contact-us)
|
||||||
|
- [Disclaimer](#disclaimer)
|
||||||
|
|
||||||
[[_TOC_]]
|
|
||||||
|
|
||||||
## Synopsis
|
## Synopsis
|
||||||
|
|
||||||
Php is a widely used open source scripting language for web services.
|
Php is a widely used open source scripting language for web services.
|
||||||
|
|
||||||
`php_cd` manages php installations for use with other modules like `wordpress_cd`
|
`confdroid_php` manages plain php installations for use with other modules like `confdroid_nagios`. PHP is installed and properly configured to allow multiple applications with different settings to run in parallel. Custom php.ini settings should be configured with the application in question.
|
||||||
|
|
||||||
## WARNING
|
## WARNING
|
||||||
|
|
||||||
@@ -16,6 +29,11 @@ Php is a widely used open source scripting language for web services.
|
|||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
|
- install php
|
||||||
|
- manage required directories including selinux contexts and permissions
|
||||||
|
- manage reuired files including selinux contexts and permissions
|
||||||
|
|
||||||
|
|
||||||
## Support
|
## Support
|
||||||
|
|
||||||
* Rocky 9
|
* Rocky 9
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
## php_cd::init.pp
|
## confdroid_php::init.pp
|
||||||
# Module name: php_cd
|
# Module name: confdroid_php
|
||||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||||
# @summary Class initializes the php_cd module
|
# @summary Class initializes the confdroid_php module
|
||||||
##############################################################################
|
##############################################################################
|
||||||
class php_cd {
|
class confdroid_php {
|
||||||
include php_cd::params
|
include confdroid_php::params
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
## php_cd::main::config.pp
|
## confdroid_php::main::config.pp
|
||||||
# Module name: php_cd
|
# Module name: confdroid_php
|
||||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||||
# @summary Class manages the module logic
|
# @summary Class manages the module logic
|
||||||
##############################################################################
|
##############################################################################
|
||||||
class php_cd::main::config (
|
class confdroid_php::main::config (
|
||||||
|
|
||||||
) inherits php_cd::params {
|
) inherits confdroid_php::params {
|
||||||
include php_cd::main::files
|
include confdroid_php::main::files
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
## php_cd::main::dirs.pp
|
## confdroid_php::main::dirs.pp
|
||||||
# Module name: php_cd
|
# Module name: confdroid_php
|
||||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||||
# @summary Class manages directory structure
|
# @summary Class manages directory structure
|
||||||
##############################################################################
|
##############################################################################
|
||||||
class php_cd::main::dirs (
|
class confdroid_php::main::dirs (
|
||||||
|
|
||||||
) inherits php_cd::params {
|
) inherits confdroid_php::params {
|
||||||
require php_cd::main::install
|
require confdroid_php::main::install
|
||||||
|
|
||||||
file { $php_lib_dir:
|
file { $php_lib_dir:
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
## php_cd::main::files.pp
|
## confdroid_php::main::files.pp
|
||||||
# Module name: php_cd
|
# Module name: confdroid_php
|
||||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||||
# @summary Class manages file aspects
|
# @summary Class manages file aspects
|
||||||
##############################################################################
|
##############################################################################
|
||||||
class php_cd::main::files (
|
class confdroid_php::main::files (
|
||||||
|
|
||||||
) inherits php_cd::params {
|
) inherits confdroid_php::params {
|
||||||
require php_cd::main::dirs
|
require confdroid_php::main::dirs
|
||||||
|
|
||||||
file { $php_ini_file:
|
file { $php_ini_file:
|
||||||
ensure => file,
|
ensure => file,
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
## php_cd::main::install.pp
|
## confdroid_php::main::install.pp
|
||||||
# Module name: php_cd
|
# Module name: confdroid_php
|
||||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||||
# @summary Class manages installation aspects
|
# @summary Class manages installation aspects
|
||||||
##############################################################################
|
##############################################################################
|
||||||
class php_cd::main::install (
|
class confdroid_php::main::install (
|
||||||
|
|
||||||
) inherits php_cd::params {
|
) inherits confdroid_php::params {
|
||||||
package { $reqpackages:
|
package { $reqpackages:
|
||||||
ensure => $pkg_ensure,
|
ensure => $pkg_ensure,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
## php_cd::params.pp
|
## confdroid_php::params.pp
|
||||||
# Module name: php_cd
|
# Module name: confdroid_php
|
||||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||||
# @summary Class contains all class parameters for this module
|
# @summary Class contains all class parameters for this module
|
||||||
# @param [String] reqpackages which packages to install
|
# @param [String] reqpackages which packages to install
|
||||||
# @param [String] pkg_ensure which version of packages to install
|
# @param [String] pkg_ensure which version of packages to install
|
||||||
##############################################################################
|
##############################################################################
|
||||||
class php_cd::params (
|
class confdroid_php::params (
|
||||||
|
|
||||||
String $reqpackages = 'php',
|
String $reqpackages = 'php',
|
||||||
String $pkg_ensure = 'latest',
|
String $pkg_ensure = 'present',
|
||||||
|
|
||||||
) {
|
) {
|
||||||
# Facts
|
# Facts
|
||||||
@@ -26,8 +26,8 @@ class php_cd::params (
|
|||||||
|
|
||||||
# Files
|
# Files
|
||||||
$php_ini_file = '/etc/php.ini'
|
$php_ini_file = '/etc/php.ini'
|
||||||
$php_ini_erb = 'php_cd/php.ini.erb'
|
$php_ini_erb = 'confdroid_php/php.ini.erb'
|
||||||
|
|
||||||
# includes must be last
|
# includes must be last
|
||||||
include php_cd::main::config
|
include confdroid_php::main::config
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user