summaryrefslogtreecommitdiff
path: root/Jenkinsfile
blob: d6b64cae2158ea92b35fe8615b6ba6537ed34913 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
pipeline {
    agent {
        label "master"
    }
    triggers {
        cron("H 16 * * *")
    }
    environment {
        ANSIBLE_STDOUT_CALLBACK = "actionable"
        ANSIBLE_FORCE_COLOR = "True"
    }
    stages {
        stage("Fetch data") {
            agent { label "guixsd" }
            steps {
                ansiColor("xterm") {
                    sh (["ansible",
                         "--limit", "'majordomo:!router-miran1.intr:!vpn-dh.majordomo.ru:!router4.intr:!deprecated'"
                         , "-m", "setup",
                         "--tree", "/home/oleg/ansible-out/out",
                         "majordomo"].join(" "))
                }
            }
        }
        // TODO: Fix Generate reports stage
        // stage("Generate reports") {
        //     agent { label "guixsd" }
        //     steps {
        //         dir("/home/oleg/ansible-out") {
        //             sh "env PATH=/home/oleg/bin:$PATH /home/oleg/.local/bin/ansible-cmdb -t html_fancy_split -p local_js=1 /home/oleg/ansible-out/out"
        //         }
        //     }
        // }
    }
}