Created
April 3, 2018 16:04
-
-
Save maxyko/b82c109876fbe726872866195863538c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- job: | |
name: Deploy_Gitlab | |
project-type: pipeline | |
parameters: | |
- string: | |
name: gitlab_host | |
default: | |
description: | |
- string: | |
name: user | |
default: | |
description: | |
- string: | |
name: domain_name | |
default: | |
description: | |
- string: | |
name: ldap | |
default: | |
description: 'true/false' | |
- string: | |
name: ldap_password | |
default: | |
description: | |
dsl: | | |
import jenkins.model.Jenkins | |
timestamps { | |
node('master') { | |
stage('Checkout ansible-ntp') { | |
dir('ansible-ntp') { | |
git branch: 'develop', credentialsId: 'd37ed06d-4b6c-4b7a-ac4d-8540ea344a33', url: 'https://git.dmp.4tree.de/Tooling/ansible-ntp' | |
} | |
} | |
stage('Checkout ansible-role-gitlab') { | |
dir('ansible-role-gitlab') { | |
git branch: 'develop', credentialsId: 'd37ed06d-4b6c-4b7a-ac4d-8540ea344a33', url: 'https://git.dmp.4tree.de/Tooling/ansible-role-gitlab' | |
} | |
} | |
stage ('execute gitlab ansible roles') { | |
sh ''' | |
sudo rm -rf /etc/ansible/roles/ansible-role-gitlab | |
sudo rm -rf /etc/ansible/roles/ansible-ntp | |
sudo mkdir /etc/ansible/roles/ansible-role-gitlab | |
sudo mkdir /etc/ansible/roles/ansible-ntp | |
sudo cp -rf ${WORKSPACE}/ansible-role-gitlab/* /etc/ansible/roles/ansible-role-gitlab/ | |
sudo cp -rf ${WORKSPACE}/ansible-ntp/* /etc/ansible/roles/ansible-ntp/ | |
cd /etc/ansible/ | |
''' | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment