basic commit after fork
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,3 +2,4 @@
|
||||
Gemfile.lock
|
||||
FileList
|
||||
.scannerwork
|
||||
.vscode/
|
||||
|
||||
39
Jenkinsfile
vendored
39
Jenkinsfile
vendored
@@ -1,8 +1,5 @@
|
||||
pipeline {
|
||||
agent {
|
||||
label 'puppet'
|
||||
}
|
||||
|
||||
agent any
|
||||
post {
|
||||
always {
|
||||
deleteDir() /* clean up our workspace */
|
||||
@@ -69,7 +66,7 @@ pipeline {
|
||||
withCredentials([string(credentialsId: 'sonar-token', variable: 'SONAR_TOKEN')]) {
|
||||
sh '''
|
||||
/opt/sonar-scanner/bin/sonar-scanner \
|
||||
-Dsonar.projectKey=resources_cd \
|
||||
-Dsonar.projectKey=confdroid_resources \
|
||||
-Dsonar.sources=. \
|
||||
-Dsonar.host.url=https://sonarqube.confdroid.com \
|
||||
-Dsonar.token=$SONAR_TOKEN
|
||||
@@ -90,16 +87,36 @@ pipeline {
|
||||
sh '''
|
||||
git config user.name "Jenkins Server"
|
||||
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 push -o merge_request.create \
|
||||
-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
|
||||
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_resources.git
|
||||
git -c credential.helper="!f() { echo username=${GITEA_USER}; echo password=${GITEA_TOKEN}; }; f" \
|
||||
push master --mirror
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
# Readme
|
||||
|
||||
[](https://jenkins.confdroid.com/job/resources_cd/)
|
||||
[](https://jenkins.confdroid.com/job/confdroid_resources/)
|
||||
|
||||
[[_TOC_]]
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
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
|
||||
|
||||
@@ -36,7 +36,7 @@ via site.pp or nodes.pp
|
||||
|
||||
```bash
|
||||
node 'example.example.net' {
|
||||
include resources_cd
|
||||
include confdroid_resources
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
## resources_cd::init.pp
|
||||
# Module name: resources_cd
|
||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||
# @summary Class initializes the resources_cd module.
|
||||
## confdroid_resources::init.pp
|
||||
# Module name: confdroid_resources
|
||||
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||
# @summary Class initializes the confdroid_resources module.
|
||||
##############################################################################
|
||||
class resources_cd {
|
||||
include resources_cd::params
|
||||
class confdroid_resources {
|
||||
include confdroid_resources::params
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
## resources_cd::main::config.pp
|
||||
# Module name: resources_cd
|
||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||
# @summary Class manages module logic for the resources_cd module.
|
||||
## confdroid_resources::main::config.pp
|
||||
# Module name: confdroid_resources
|
||||
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||
# @summary Class manages module logic for the confdroid_resources module.
|
||||
##############################################################################
|
||||
class resources_cd::main::config (
|
||||
class confdroid_resources::main::config (
|
||||
|
||||
) inherits resources_cd::params {
|
||||
include resources_cd::main::install
|
||||
) inherits confdroid_resources::params {
|
||||
include confdroid_resources::main::install
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
## resources_cd::main::epel.pp
|
||||
# Module name: resources_cd
|
||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||
## confdroid_resources::main::epel.pp
|
||||
# Module name: confdroid_resources
|
||||
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||
# @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' {
|
||||
yumrepo { 'crb':
|
||||
enabled => '1',
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
## resources_cd::main::install.pp
|
||||
# Module name: resources_cd
|
||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||
# @summary Class install required packages for the resources_cd module.
|
||||
## confdroid_resources::main::install.pp
|
||||
# Module name: confdroid_resources
|
||||
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||
# @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:
|
||||
ensure => $pkg_ensure,
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
## resources_cd::main::yumrepo.pp
|
||||
# Module name: resources_cd
|
||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||
## confdroid_resources::main::yumrepo.pp
|
||||
# Module name: confdroid_resources
|
||||
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||
# @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
|
||||
# Module name: resources_cd
|
||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||
# @summary Class contains all parameters for the resources_cd module.
|
||||
## confdroid_resources::params.pp
|
||||
# Module name: confdroid_resources
|
||||
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||
# @summary Class contains all parameters for the confdroid_resources module.
|
||||
# @param [Array] reqpackages which packages to install
|
||||
# @param [String] pkg_ensure version to install, 'present', 'latest', 'v1.0'
|
||||
# @param [String] rs_enable_epel whether to enable epel
|
||||
##############################################################################
|
||||
class resources_cd::params (
|
||||
class confdroid_resources::params (
|
||||
|
||||
Array $reqpackages = $facts['os']['name'] ? {
|
||||
'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'
|
||||
# includes must be last
|
||||
include resources_cd::main::config
|
||||
include confdroid_resources::main::config
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user