1
+ <?xml version =' 1.0' encoding =' UTF-8' ?>
2
+ <project >
3
+ <actions />
4
+ <description ></description >
5
+ <keepDependencies >false</keepDependencies >
6
+ <properties >
7
+ <
com .coravy.hudson.plugins.github.GithubProjectProperty
plugin =
" [email protected] " >
8
+ <projectUrl >https://github.com/PrometheusJenkinsTest/prometheus/</projectUrl >
9
+ <displayName ></displayName >
10
+ </com .coravy.hudson.plugins.github.GithubProjectProperty>
11
+ </properties >
12
+ <
scm class =
" hudson.plugins.git.GitSCM" plugin =
" [email protected] " >
13
+ <configVersion >2</configVersion >
14
+ <userRemoteConfigs >
15
+ <hudson .plugins.git.UserRemoteConfig>
16
+ <name >origin</name >
17
+ <refspec >+refs/pull/*:refs/remotes/origin/pr/*</refspec >
18
+ <url >https://github.com/PrometheusJenkinsTest/prometheus.git</url >
19
+ <credentialsId >712d10e9-0d5b-4b49-8e1f-76b8c31cdb8a</credentialsId >
20
+ </hudson .plugins.git.UserRemoteConfig>
21
+ </userRemoteConfigs >
22
+ <branches >
23
+ <hudson .plugins.git.BranchSpec>
24
+ <name >${sha1}</name >
25
+ </hudson .plugins.git.BranchSpec>
26
+ </branches >
27
+ <doGenerateSubmoduleConfigurations >false</doGenerateSubmoduleConfigurations >
28
+ <submoduleCfg class =" list" />
29
+ <extensions />
30
+ </scm >
31
+ <assignedNode >ec2 && linux && ubuntu</assignedNode >
32
+ <canRoam >false</canRoam >
33
+ <disabled >false</disabled >
34
+ <blockBuildWhenDownstreamBuilding >false</blockBuildWhenDownstreamBuilding >
35
+ <blockBuildWhenUpstreamBuilding >false</blockBuildWhenUpstreamBuilding >
36
+ <triggers >
37
+ <
org .jenkinsci.plugins.ghprb.GhprbTrigger
plugin =
" [email protected] " >
38
+ <spec >H/1 * * * *</spec >
39
+ <configVersion >3</configVersion >
40
+ <adminlist >conorbro-test</adminlist >
41
+ <allowMembersOfWhitelistedOrgsAsAdmin >false</allowMembersOfWhitelistedOrgsAsAdmin >
42
+ <orgslist ></orgslist >
43
+ <cron >H/1 * * * *</cron >
44
+ <buildDescTemplate ></buildDescTemplate >
45
+ <onlyTriggerPhrase >false</onlyTriggerPhrase >
46
+ <useGitHubHooks >true</useGitHubHooks >
47
+ <permitAll >false</permitAll >
48
+ <whitelist >conorbro-test</whitelist >
49
+ <autoCloseFailedPullRequests >false</autoCloseFailedPullRequests >
50
+ <displayBuildErrorsOnDownstreamBuilds >false</displayBuildErrorsOnDownstreamBuilds >
51
+ <whiteListTargetBranches >
52
+ <org .jenkinsci.plugins.ghprb.GhprbBranch>
53
+ <branch ></branch >
54
+ </org .jenkinsci.plugins.ghprb.GhprbBranch>
55
+ </whiteListTargetBranches >
56
+ <blackListTargetBranches >
57
+ <org .jenkinsci.plugins.ghprb.GhprbBranch>
58
+ <branch ></branch >
59
+ </org .jenkinsci.plugins.ghprb.GhprbBranch>
60
+ </blackListTargetBranches >
61
+ <gitHubAuthId >3643cc38-7e63-4b3a-8abb-0787f06c1c70</gitHubAuthId >
62
+ <triggerPhrase >.*</triggerPhrase >
63
+ <skipBuildPhrase >.*\[skip\W+ci\].*</skipBuildPhrase >
64
+ <blackListCommitAuthor ></blackListCommitAuthor >
65
+ <blackListLabels ></blackListLabels >
66
+ <whiteListLabels ></whiteListLabels >
67
+ <includedRegions ></includedRegions >
68
+ <excludedRegions ></excludedRegions >
69
+ <extensions >
70
+ <org .jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
71
+ <commitStatusContext ></commitStatusContext >
72
+ <triggeredStatus ></triggeredStatus >
73
+ <startedStatus ></startedStatus >
74
+ <statusUrl ></statusUrl >
75
+ <addTestResults >false</addTestResults >
76
+ </org .jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
77
+ </extensions >
78
+ </org .jenkinsci.plugins.ghprb.GhprbTrigger>
79
+ </triggers >
80
+ <concurrentBuild >false</concurrentBuild >
81
+ <builders >
82
+ <hudson .tasks.Shell>
83
+ <command >#!/bin/bash
84
+
85
+ set -ex
86
+
87
+ go get github.com/prometheus/prometheus/cmd/...
88
+ make build
89
+ cat << EOF > prometheus.yml
90
+ global:
91
+ scrape_interval: 1s
92
+ evaluation_interval: 1s
93
+ scrape_configs:
94
+ - job_name: ' node'
95
+ ec2_sd_configs:
96
+ - region: eu-west-1
97
+ access_key: $AWS_ACCESS_KEY_ID
98
+ secret_key: $AWS_SECRET_ACCESS_KEY
99
+ port: 9100
100
+ EOF
101
+ ./prometheus &
102
+ sleep 10
103
+
104
+ res=`curl -s http://localhost:9090/api/v1/targets | jq -r ' .data.activeTargets[0].discoveredLabels.__meta_ec2_public_dns_name' `
105
+ if [[ $res =~ " ec2" ]]; then
106
+ pkill prometheus
107
+ exit 0
108
+ fi
109
+ pkill prometheus
110
+ exit 1</command >
111
+ </hudson .tasks.Shell>
112
+ </builders >
113
+ <publishers >
114
+ <
hudson .plugins.ws__cleanup.WsCleanup
plugin =
" [email protected] " >
115
+ <patterns class =" empty-list" />
116
+ <deleteDirs >false</deleteDirs >
117
+ <skipWhenFailed >false</skipWhenFailed >
118
+ <cleanWhenSuccess >true</cleanWhenSuccess >
119
+ <cleanWhenUnstable >true</cleanWhenUnstable >
120
+ <cleanWhenFailure >true</cleanWhenFailure >
121
+ <cleanWhenNotBuilt >true</cleanWhenNotBuilt >
122
+ <cleanWhenAborted >true</cleanWhenAborted >
123
+ <notFailBuild >false</notFailBuild >
124
+ <cleanupMatrixParent >false</cleanupMatrixParent >
125
+ <externalDelete ></externalDelete >
126
+ </hudson .plugins.ws__cleanup.WsCleanup>
127
+ </publishers >
128
+ <buildWrappers >
129
+ <
hudson .plugins.timestamper.TimestamperBuildWrapper
plugin =
" [email protected] " />
130
+ <
org .jenkinsci.plugins.golang.GolangBuildWrapper
plugin =
" [email protected] " >
131
+ <goVersion >Go 1.9.3</goVersion >
132
+ </org .jenkinsci.plugins.golang.GolangBuildWrapper>
133
+ </buildWrappers >
134
+ </project >
0 commit comments