Skip to content

Commit

Permalink
chore: added ci
Browse files Browse the repository at this point in the history
  • Loading branch information
sidohaakma committed Feb 22, 2021
1 parent 2406411 commit f332622
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
53 changes: 53 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
pipeline {
agent {
kubernetes {
inheritsFrom 'ansible'
}
}
stages {
stage('Prepare [ build env ]') {
steps {
container('centos-8') {
sh 'yum install -y epel-release'
sh 'yum install -y ansible'
}
}
}
stage('Build [ pull request ]') {
when {
changeRequest()
}
steps {
container('centos-8') {
dir(armadillo1) {
ansible-galaxy install -r requirements.yml
ansiblePlaybook(
inventory: 'inventory_ci.ini',
playbook: 'playbook.yml',
extras: '-e ci="true"'
)
}
}

}
}
stage('Build [ master ]') {
when {
branch 'master'
}
steps {
milestone 1
container('centos-8') {
dir(armadillo1) {
ansible-galaxy install -r requirements.yml
ansiblePlaybook(
inventory: 'inventory_ci.ini',
playbook: 'playbook.yml',
extras: '-e ci="true"'
)
}
}
}
}
}
}
2 changes: 2 additions & 0 deletions inventory_ci.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[ci]
127.0.0.1 ansible_connection=local

0 comments on commit f332622

Please sign in to comment.