basic commit after fork
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,3 +2,4 @@
|
|||||||
Gemfile.lock
|
Gemfile.lock
|
||||||
FileList
|
FileList
|
||||||
.scannerwork
|
.scannerwork
|
||||||
|
.vscode/
|
||||||
|
|||||||
39
Jenkinsfile
vendored
39
Jenkinsfile
vendored
@@ -1,8 +1,5 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent {
|
agent any
|
||||||
label 'puppet'
|
|
||||||
}
|
|
||||||
|
|
||||||
post {
|
post {
|
||||||
always {
|
always {
|
||||||
deleteDir() /* clean up our workspace */
|
deleteDir() /* clean up our workspace */
|
||||||
@@ -69,7 +66,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=resources_cd \
|
-Dsonar.projectKey=confdroid_resources \
|
||||||
-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,16 +87,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 -o merge_request.create \
|
git push origin HEAD:master
|
||||||
-o merge_request.target=master \
|
|
||||||
-o merge_request.title="Auto-merge for build $BUILD_NUMBER" \
|
|
||||||
-o merge_request.description="Automated changes from Jenkins build $BUILD_NUMBER" \
|
|
||||||
-o merge_request.merge_when_pipeline_succeeds=true \
|
|
||||||
origin jenkins-build-$BUILD_NUMBER
|
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
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_resources.git
|
||||||
|
git -c credential.helper="!f() { echo username=${GITEA_USER}; echo password=${GITEA_TOKEN}; }; f" \
|
||||||
|
push master --mirror
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
# Readme
|
# Readme
|
||||||
|
|
||||||
[](https://jenkins.confdroid.com/job/resources_cd/)
|
[](https://jenkins.confdroid.com/job/confdroid_resources/)
|
||||||
|
|
||||||
[[_TOC_]]
|
[[_TOC_]]
|
||||||
|
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
Rocky Linux uses yum repos to define its download sources.
|
Rocky Linux uses yum repos to define its download sources.
|
||||||
|
|
||||||
`resources_cd` is a Puppet module to automate installation and configuration of common yum repos.
|
`confdroid_resources` is a Puppet module to automate installation and configuration of common yum repos.
|
||||||
|
|
||||||
## WARNING
|
## WARNING
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@ via site.pp or nodes.pp
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
node 'example.example.net' {
|
node 'example.example.net' {
|
||||||
include resources_cd
|
include confdroid_resources
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
## resources_cd::init.pp
|
## confdroid_resources::init.pp
|
||||||
# Module name: resources_cd
|
# Module name: confdroid_resources
|
||||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||||
# @summary Class initializes the resources_cd module.
|
# @summary Class initializes the confdroid_resources module.
|
||||||
##############################################################################
|
##############################################################################
|
||||||
class resources_cd {
|
class confdroid_resources {
|
||||||
include resources_cd::params
|
include confdroid_resources::params
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
## resources_cd::main::config.pp
|
## confdroid_resources::main::config.pp
|
||||||
# Module name: resources_cd
|
# Module name: confdroid_resources
|
||||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||||
# @summary Class manages module logic for the resources_cd module.
|
# @summary Class manages module logic for the confdroid_resources module.
|
||||||
##############################################################################
|
##############################################################################
|
||||||
class resources_cd::main::config (
|
class confdroid_resources::main::config (
|
||||||
|
|
||||||
) inherits resources_cd::params {
|
) inherits confdroid_resources::params {
|
||||||
include resources_cd::main::install
|
include confdroid_resources::main::install
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
## resources_cd::main::epel.pp
|
## confdroid_resources::main::epel.pp
|
||||||
# Module name: resources_cd
|
# Module name: confdroid_resources
|
||||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||||
# @summary Class manages yum repo for epel.
|
# @summary Class manages yum repo for epel.
|
||||||
##############################################################################
|
##############################################################################
|
||||||
class resources_cd::main::epel (
|
class confdroid_resources::main::epel (
|
||||||
|
|
||||||
) inherits resources_cd::params {
|
) inherits confdroid_resources::params {
|
||||||
if $facts['os']['name'] == 'Rocky' and $facts['os']['release']['major'] == '9' {
|
if $facts['os']['name'] == 'Rocky' and $facts['os']['release']['major'] == '9' {
|
||||||
yumrepo { 'crb':
|
yumrepo { 'crb':
|
||||||
enabled => '1',
|
enabled => '1',
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
## resources_cd::main::install.pp
|
## confdroid_resources::main::install.pp
|
||||||
# Module name: resources_cd
|
# Module name: confdroid_resources
|
||||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||||
# @summary Class install required packages for the resources_cd module.
|
# @summary Class install required packages for the confdroid_resources module.
|
||||||
##############################################################################
|
##############################################################################
|
||||||
class resources_cd::main::install (
|
class confdroid_resources::main::install (
|
||||||
|
|
||||||
) inherits resources_cd::params {
|
) inherits confdroid_resources::params {
|
||||||
package { $reqpackages:
|
package { $reqpackages:
|
||||||
ensure => $pkg_ensure,
|
ensure => $pkg_ensure,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
## resources_cd::main::yumrepo.pp
|
## confdroid_resources::main::yumrepo.pp
|
||||||
# Module name: resources_cd
|
# Module name: confdroid_resources
|
||||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||||
# @summary Class manages yum repos for Rocky.
|
# @summary Class manages yum repos for Rocky.
|
||||||
##############################################################################
|
##############################################################################
|
||||||
class resources_cd::main::yumrepo (
|
class confdroid_resources::main::yumrepo (
|
||||||
|
|
||||||
) inherits resources_cd::params {
|
) inherits confdroid_resources::params {
|
||||||
#
|
#
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
## resources_cd::params.pp
|
## confdroid_resources::params.pp
|
||||||
# Module name: resources_cd
|
# Module name: confdroid_resources
|
||||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||||
# @summary Class contains all parameters for the resources_cd module.
|
# @summary Class contains all parameters for the confdroid_resources module.
|
||||||
# @param [Array] reqpackages which packages to install
|
# @param [Array] reqpackages which packages to install
|
||||||
# @param [String] pkg_ensure version to install, 'present', 'latest', 'v1.0'
|
# @param [String] pkg_ensure version to install, 'present', 'latest', 'v1.0'
|
||||||
# @param [String] rs_enable_epel whether to enable epel
|
# @param [String] rs_enable_epel whether to enable epel
|
||||||
##############################################################################
|
##############################################################################
|
||||||
class resources_cd::params (
|
class confdroid_resources::params (
|
||||||
|
|
||||||
Array $reqpackages = $facts['os']['name'] ? {
|
Array $reqpackages = $facts['os']['name'] ? {
|
||||||
'Rocky' => ['yum', 'yum-utils'],
|
'Rocky' => ['yum', 'yum-utils'],
|
||||||
@@ -17,5 +17,5 @@ class resources_cd::params (
|
|||||||
) {
|
) {
|
||||||
$epel_from_url = 'https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm'
|
$epel_from_url = 'https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm'
|
||||||
# includes must be last
|
# includes must be last
|
||||||
include resources_cd::main::config
|
include confdroid_resources::main::config
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user