foreman_pipeline 0.0.8 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. checksums.yaml +5 -13
  2. data/app/assets/javascripts/foreman_pipeline/jenkins-instances/jenkins-instances.module.js +11 -14
  3. data/app/assets/javascripts/foreman_pipeline/jenkins-instances/views/jenkins-instances-table-collapsed.html +3 -4
  4. data/app/assets/javascripts/foreman_pipeline/jenkins-instances/views/jenkins-instances-table-full.html +5 -7
  5. data/app/assets/javascripts/foreman_pipeline/jenkins-users/details/views/jenkins-user-info.html +3 -3
  6. data/app/assets/javascripts/foreman_pipeline/jobs/details/views/job-details-hostgroups.html +10 -10
  7. data/app/assets/javascripts/foreman_pipeline/jobs/details/views/job-details-jenkins-projects.html +53 -61
  8. data/app/assets/javascripts/foreman_pipeline/jobs/jobs.module.js +27 -27
  9. data/app/assets/javascripts/foreman_pipeline/jobs/views/jobs-table-collapsed.html +3 -4
  10. data/app/assets/javascripts/foreman_pipeline/jobs/views/jobs-table-full.html +13 -15
  11. data/app/lib/actions/foreman_pipeline/jenkins_instance/abstract_jenkins_instance_action.rb +1 -2
  12. data/app/lib/actions/foreman_pipeline/job/create_activation_key.rb +6 -7
  13. data/app/lib/actions/foreman_pipeline/job/create_host.rb +1 -2
  14. data/app/lib/actions/foreman_pipeline/job/redeploy.rb +2 -2
  15. data/app/lib/actions/foreman_pipeline/job/wait_until_provisioned.rb +43 -0
  16. data/app/models/foreman_pipeline/authorization/base_model.rb +0 -1
  17. data/app/models/foreman_pipeline/jenkins_instance.rb +2 -2
  18. data/app/models/foreman_pipeline/job.rb +1 -2
  19. data/app/models/foreman_pipeline/job_jenkins_project.rb +1 -1
  20. data/lib/foreman_pipeline/engine.rb +21 -8
  21. data/lib/foreman_pipeline/monkeys.rb +8 -0
  22. data/lib/foreman_pipeline/plugin.rb +5 -3
  23. data/lib/foreman_pipeline/skip_tests.rb +79 -0
  24. data/lib/foreman_pipeline/version.rb +1 -1
  25. metadata +18 -72
  26. data/app/lib/actions/foreman_pipeline/jenkins/wait_host_ready.rb +0 -36
  27. data/app/lib/actions/foreman_pipeline/job/suspend_until_provisioned.rb +0 -13
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZjU5NWJlYzAzODFmNjc1YzYwNDAyYjRmMzg2OTc0NDM5MDdkNmNlOA==
5
- data.tar.gz: !binary |-
6
- ZTE5YjkzZGRhYmY1YjRmNGZiYTAyZTBhYTZmNmI1YWQxODY1ZjIyNw==
2
+ SHA1:
3
+ metadata.gz: a501654448d142e85190824d0cf06d6eaeeba27e
4
+ data.tar.gz: 845841c7a98e4eb04a0567da42eb05202685cc74
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- ZDhlODMyN2ZlYTJjYTc3MGQ0YzZmMDIzNzI0ZGFmMjllZThmNDA3YzcwYTc2
10
- YzhkNTQ2MmIzZTQxYjMzOThiOGFjNzNlMTgwNTQ5NDliNWU3YzQyMDRkN2Jl
11
- Zjg0YjY2ZjllOWMxN2ZiMzQyZjVhMTRmNzdkZDUxYmQyZDE5NGM=
12
- data.tar.gz: !binary |-
13
- MjE0Y2JhYjVhYzdlMTg4NjZhOWIxZTJiNzI4YWQ3MTllNzkyODM3Yzc4OTk4
14
- OGExNGNmMWQ2NzU2ODc2NTQ0OWU2NTZkMzkyZGU2ZGY4M2UwZGEyMDkxZTdj
15
- YmUwODQ5NDgyNzk2MGFmMmU0NTYwMzI3ZjI0NjZjYzE0NDNkZDA=
6
+ metadata.gz: 79621a0bd84aa2a81bb5cf3245bf700d470a6d8d7506be2b54e0bb187fbdc7ecf1f7a726751ee45a125ee53048b8d9df722d2db5b8996d8892aea080f460952f
7
+ data.tar.gz: ede06ced9a323bc299e83956c4c35c0d8e03fde98e4a92f5f2db90fa6b7efff1188184a8150befa808c69ec5f7ab4e510ef9d344389b71c6af4dad2f4190c254
@@ -9,14 +9,14 @@ angular.module('ForemanPipeline.jenkins-instances').config(['$stateProvider', fu
9
9
  $stateProvider.state('jenkins-instances', {
10
10
  abstract: true,
11
11
  controller: 'JenkinsInstancesController',
12
- templateUrl: 'foreman_pipeline/jenkins-instances/views/jenkins-instances.html'
12
+ templateUrl: 'jenkins-instances/views/jenkins-instances.html'
13
13
  })
14
14
  .state('jenkins-instances.index', {
15
15
  url: '/jenkins_instances',
16
16
  permission: 'view_jenkins_instances',
17
17
  views: {
18
18
  'table': {
19
- templateUrl: 'foreman_pipeline/jenkins-instances/views/jenkins-instances-table-full.html'
19
+ templateUrl: 'jenkins-instances/views/jenkins-instances-table-full.html'
20
20
  }
21
21
  }
22
22
  })
@@ -26,18 +26,17 @@ angular.module('ForemanPipeline.jenkins-instances').config(['$stateProvider', fu
26
26
  collapsed: true,
27
27
  views: {
28
28
  'table': {
29
- templateUrl: 'foreman_pipeline/jenkins-instances/views/jenkins-instances-table-collapsed.html'
29
+ templateUrl: 'jenkins-instances/views/jenkins-instances-table-collapsed.html'
30
30
  },
31
31
  'action-panel': {
32
32
  controller: 'NewJenkinsInstanceController',
33
- templateUrl: 'foreman_pipeline/jenkins-instances/new/views/new-jenkins-instance.html'
33
+ templateUrl: 'jenkins-instances/new/views/new-jenkins-instance.html'
34
34
  },
35
35
  'jenkins-instance-form@jenkins-instances.new': {
36
36
  controller: 'NewJenkinsInstanceController',
37
- templateUrl: 'foreman_pipeline/jenkins-instances/new/views/new-jenkins-instance-form.html'
37
+ templateUrl: 'jenkins-instances/new/views/new-jenkins-instance-form.html'
38
38
  }
39
39
  }
40
-
41
40
  })
42
41
  .state('jenkins-instances.details', {
43
42
  abstract: true,
@@ -46,11 +45,11 @@ angular.module('ForemanPipeline.jenkins-instances').config(['$stateProvider', fu
46
45
  collapsed: true,
47
46
  views: {
48
47
  'table': {
49
- templateUrl: 'foreman_pipeline/jenkins-instances/views/jenkins-instances-table-collapsed.html'
48
+ templateUrl: 'jenkins-instances/views/jenkins-instances-table-collapsed.html'
50
49
  },
51
50
  'action-panel': {
52
51
  controller: 'JenkinsInstanceDetailsController',
53
- templateUrl: 'foreman_pipeline/jenkins-instances/details/views/jenkins-instance-details.html'
52
+ templateUrl: 'jenkins-instances/details/views/jenkins-instance-details.html'
54
53
  }
55
54
  }
56
55
  })
@@ -59,7 +58,7 @@ angular.module('ForemanPipeline.jenkins-instances').config(['$stateProvider', fu
59
58
  permission: 'edit_jenkins_instances',
60
59
  collapsed: true,
61
60
  controller: 'JenkinsInstanceDetailsInfoController',
62
- templateUrl: 'foreman_pipeline/jenkins-instances/details/views/jenkins-instance-details-info.html'
61
+ templateUrl: 'jenkins-instances/details/views/jenkins-instance-details-info.html'
63
62
  })
64
63
 
65
64
  .state('jenkins-instances.details.users', {
@@ -72,22 +71,20 @@ angular.module('ForemanPipeline.jenkins-instances').config(['$stateProvider', fu
72
71
  permission: 'view_jenkins_users',
73
72
  collapsed: true,
74
73
  controller: 'JenkinsInstanceDetailsJenkinsUsersController',
75
- templateUrl: 'foreman_pipeline/jenkins-instances/details/views/jenkins-instance-details-users.html'
74
+ templateUrl: 'jenkins-instances/details/views/jenkins-instance-details-users.html'
76
75
  })
77
76
  .state('jenkins-instances.details.users.new', {
78
77
  url: '/jenkins_users/new',
79
78
  permission: 'create_jenkins_users',
80
79
  collapsed: true,
81
80
  controller: 'NewJenkinsUserController',
82
- templateUrl: 'foreman_pipeline/jenkins-users/new/views/new-jenkins-user.html'
81
+ templateUrl: 'jenkins-users/new/views/new-jenkins-user.html'
83
82
  })
84
83
  .state('jenkins-instances.details.users.info', {
85
84
  url: '/jenkins_users/:jenkinsUserId',
86
85
  permission: 'edit_jenkins_users',
87
86
  collapsed: true,
88
87
  controller: 'JenkinsUserInfoController',
89
- templateUrl: 'foreman_pipeline/jenkins-users/details/views/jenkins-user-info.html'
88
+ templateUrl: 'jenkins-users/details/views/jenkins-user-info.html'
90
89
  })
91
-
92
-
93
90
  }]);
@@ -1,14 +1,13 @@
1
1
  <table class="table table-striped" ng-class="{'table-mask': jenkinsTable.working}">
2
2
  <thead>
3
- <tr bst-table-head row-select>
4
- <th bst-table-column sortable><span translate>Name</span></th>
3
+ <tr bst-table-head>
4
+ <th bst-table-column="name" sortable><span translate>Name</span></th>
5
5
  </tr>
6
6
  </thead>
7
7
 
8
8
  <tbody>
9
9
  <tr bst-table-row
10
10
  ng-repeat="jenkins in jenkinsTable.rows"
11
- row-select="jenkins"
12
11
  active-row="stateIncludes('jenkins-instance.details', {jenkinsInstanceId: jenkins.id})">
13
12
  <td bst-table-cell>
14
13
  <a ui-sref="jenkins-instances.details.info({jenkinsInstanceId: jenkins.id})">
@@ -17,4 +16,4 @@
17
16
  </td>
18
17
  </tr>
19
18
  </tbody>
20
- </table>
19
+ </table>
@@ -2,7 +2,7 @@
2
2
  ng-class="{'table-mask' : jenkinsTable.working}"
3
3
  ng-show="jenkinsTable.rows.length > 0">
4
4
  <thead>
5
- <tr bst-table-head row-select>
5
+ <tr bst-table-head>
6
6
  <th bst-table-column="name" sortable><span translate>Name</span></th>
7
7
  <th bst-table-column="url"><span translate>URL</span></th>
8
8
  </tr>
@@ -12,19 +12,17 @@
12
12
  <div data-extend-template="layouts/select-all-results.html"></div>
13
13
 
14
14
  <tbody>
15
- <tr bst-table-row ng-repeat="jenkins in jenkinsTable.rows" row-select="jenkins">
16
-
15
+ <tr bst-table-row ng-repeat="jenkins in jenkinsTable.rows">
16
+
17
17
  <td bst-table-cell>
18
18
  <a ui-sref="jenkins-instances.details.info({jenkinsInstanceId: jenkins.id})">
19
- <div>{{ jenkins.name }}</div>
19
+ <div>{{ jenkins.name }}</div>
20
20
  </a>
21
21
  </td>
22
22
 
23
23
  <td bst-table-cell>
24
- <div>{{ jenkins.url }}</div>
24
+ <div>{{ jenkins.url }}</div>
25
25
  </td>
26
-
27
26
  </tr>
28
27
  </tbody>
29
-
30
28
  </table>
@@ -28,10 +28,10 @@
28
28
  on-save="save(jenkinsUser)">
29
29
  </span>
30
30
  </div>
31
-
31
+
32
32
  <p class="alert alert-info" translate>
33
33
  The token is not displayed for security reasons. Type in the new one or leave blank to keep the current token.
34
- </p>
34
+ </p>
35
35
 
36
36
  </section>
37
- </div>
37
+ </div>
@@ -1,13 +1,13 @@
1
1
  <span page-title ng-model="job">{{ 'Job: ' | translate }} {{ job.name }}</span>
2
2
 
3
- <div class="details details-full">
3
+ <section class="details details-full">
4
4
  <div bst-alerts success-messages="successMessages" error-messages="errorMessages"></div>
5
5
 
6
6
  <h4>
7
7
  <span translate>Current Hostgroup: </span>
8
8
  <a ng-click="transitionToHostgroup(job.hostgroup)" ng-show="job.hostgroup.name">
9
9
  <span class="no-capitalize" ng-bind="job.hostgroup.name"></span>
10
- </a>
10
+ </a>
11
11
  <span class="no-capitalize" ng-show="!job.hostgroup.name" translate>none</span>
12
12
  </h4>
13
13
 
@@ -21,8 +21,8 @@
21
21
 
22
22
  <p class="alert alert-info"
23
23
  ng-hide="hostgroupsTable.working"
24
- translate> No Hostgroups to show.
25
- </p>
24
+ translate> No Hostgroups to show.
25
+ </p>
26
26
  </div>
27
27
 
28
28
  <section ng-show="hostgroupsTable.rows.length > 0">
@@ -40,8 +40,8 @@
40
40
  ng-hide="edit_jobs"
41
41
  ng-disabled="!hostgroupsTable.chosenRow || hostgroupsTable.working"
42
42
  ng-click="setHostgroup()">
43
- <i class="fa fa-pencil" ng-hide="hostgroupsTable.working"></i>
44
- <i class="fa fa-spinner fa-spin" ng-show="hostgroupsTable.working"></i>
43
+ <i class="fa fa-pencil" ng-hide="hostgroupsTable.working"></i>
44
+ <i class="fa fa-spinner fa-spin" ng-show="hostgroupsTable.working"></i>
45
45
  {{ 'Set Hostgroup' | translate }}
46
46
  </button>
47
47
  </div>
@@ -50,7 +50,7 @@
50
50
  <div bst-table="hostgroupsTable" class="nutupane">
51
51
  <div bst-container-scroll bst-infinite-scroll="hostgroupsTable.nextPage()">
52
52
 
53
- <table
53
+ <table
54
54
  ng-class="{'table-mask': hostgroupsTable.working}"
55
55
  class="table table-striped table-full">
56
56
 
@@ -63,7 +63,7 @@
63
63
 
64
64
  <tbody>
65
65
  <tr bst-table-row ng-repeat="hostgroup in hostgroupsTable.rows | filter:hostgroupFilter" row-choice="hostgroup">
66
-
66
+
67
67
  <td bst-table-cell>
68
68
  <a ng-click="transitionToHostgroup(hostgroup)">
69
69
  {{ hostgroup.name }}
@@ -73,9 +73,9 @@
73
73
 
74
74
  </tr>
75
75
  </tbody>
76
-
76
+
77
77
  </table>
78
78
  </div>
79
79
  </div>
80
80
  </section>
81
- </div>
81
+ </section>
@@ -6,70 +6,62 @@
6
6
  <h4>
7
7
  <span translate>Current Jenkins Projects: </span>
8
8
  </h4>
9
-
10
- <input type="text"
11
- class="form-control filter-input"
12
- placeholder="{{ 'Filter' | translate }}"
13
- ng-model="jenkinsFilter"/>
14
-
15
-
16
- <span class="pull-right">
17
- <button class="btn btn-default"
18
- ng-disabled="projectsTable.numSelected === 0 || projectsTable.working"
19
- ng-show="isState('jobs.details.jenkins-projects.list') && permitted('edit_jobs', job) && projectsTable.rows.length > 0"
20
- ng-click="removeProjects()">
21
- <i class="fa fa-minus" ng-hide="projectsTable.working"></i>
22
- <i class="fa fa-spinner fa-spin" ng-show="projectsTable.working"></i>
23
- <span translate>Remove Projects</span>
24
- </button>
25
-
26
- <button class="btn btn-default"
27
- ng-show="isState('jobs.details.jenkins-projects.list')
28
- && permitted('edit_jobs', job)
29
- && job.jenkins_instance !== null
30
- && job.jenkins_user !== null"
31
- ui-sref="jobs.details.jenkins-projects.discovery({jobId: job.id})"
32
- translate>
33
- <i class="fa fa-eye"></i>
34
- Find more...
35
- </button>
36
- </span>
37
9
 
38
-
39
-
40
-
41
- <table bst-table="projectsTable"
42
- class="table table-striped"
43
- ng-show="projectsTable.rows.length > 0 && !projectsTable.working"
44
- ng-class="{'table-mask': projectsTable.working}">
45
- <thead>
46
- <tr bst-table-head row-select="jenkinsProject">
47
- <th bst-table-column="name" translate>Name</th>
48
- </tr>
49
- </thead>
10
+ </br>
50
11
 
51
- <tbody>
52
- <tr bst-table-row ng-repeat="jenkinsProject in projectsTable.rows | filter:jenkinsFilter" row-select="jenkinsProject">
53
- <td bst-table-cell>
54
- <a href="" ui-sref="jobs.details.jenkins-projects.parameters({ projectId: jenkinsProject.id })">
55
- {{ jenkinsProject.name }}
56
- </a>
57
- </td>
58
- </tr>
59
- </tbody>
12
+ <div class="details-header row">
13
+ <div class="col-sm-3">
14
+ <input type="text"
15
+ class="form-control filter-input"
16
+ placeholder="{{ 'Filter' | translate }}"
17
+ ng-model="jenkinsFilter"/>
18
+ </div>
60
19
 
61
- </table>
62
20
 
63
- </section>
21
+ <div class="fr select-action">
22
+ <button class="btn btn-default"
23
+ ng-disabled="projectsTable.numSelected === 0 || projectsTable.working"
24
+ ng-show="isState('jobs.details.jenkins-projects.list') && permitted('edit_jobs', job) && projectsTable.rows.length > 0"
25
+ ng-click="removeProjects()">
26
+ <i class="fa fa-minus" ng-hide="projectsTable.working"></i>
27
+ <i class="fa fa-spinner fa-spin" ng-show="projectsTable.working"></i>
28
+ <span translate>Remove Projects</span>
29
+ </button>
30
+
31
+ <button class="btn btn-default"
32
+ ng-show="isState('jobs.details.jenkins-projects.list')
33
+ && permitted('edit_jobs', job)
34
+ && job.jenkins_instance !== null
35
+ && job.jenkins_user !== null"
36
+ ui-sref="jobs.details.jenkins-projects.discovery({jobId: job.id})"
37
+ translate>
38
+ <i class="fa fa-eye"></i>
39
+ Find more...
40
+ </button>
41
+ </div>
42
+ </div>
43
+
44
+ <table bst-table="projectsTable"
45
+ class="table table-striped"
46
+ ng-show="projectsTable.rows.length > 0 && !projectsTable.working"
47
+ ng-class="{'table-mask': projectsTable.working}">
48
+ <thead>
49
+ <tr bst-table-head row-select="jenkinsProject">
50
+ <th bst-table-column="name" translate>Name</th>
51
+ </tr>
52
+ </thead>
64
53
 
65
- <div ng-show="projectsTable.rows.length === 0">
66
- <div class="loading-mask loading-mask-panel" ng-show="projectsTable.working">
67
- <i class="fa fa-spinner fa-spin"></i>
68
- {{ "Loading..." | translate }}
69
- </div>
54
+ <tbody>
55
+ <tr bst-table-row ng-repeat="jenkinsProject in projectsTable.rows | filter:jenkinsFilter" row-select="jenkinsProject">
56
+ <td bst-table-cell>
57
+ <a href="" ui-sref="jobs.details.jenkins-projects.parameters({ projectId: jenkinsProject.id })">
58
+ {{ jenkinsProject.name }}
59
+ </a>
60
+ </td>
61
+ </tr>
62
+ </tbody>
63
+
64
+ </table>
65
+
66
+ </section>
70
67
 
71
- <p class="alert alert-info"
72
- ng-hide="projectsTable.working"
73
- translate> No Jenkins Projects to show.
74
- </p>
75
- </div>
@@ -9,16 +9,16 @@ angular.module('ForemanPipeline.jobs').config(['$stateProvider', function ($stat
9
9
  $stateProvider.state('jobs', {
10
10
  abstract: true,
11
11
  controller: 'JobsController',
12
- templateUrl: 'foreman_pipeline/jobs/views/jobs.html'
12
+ templateUrl: 'jobs/views/jobs.html'
13
13
  })
14
14
  .state('jobs.index', {
15
- url: '/jobs',
16
- permission: 'view_jobs',
17
- views: {
18
- 'table': {
19
- templateUrl: 'foreman_pipeline/jobs/views/jobs-table-full.html'
20
- }
21
- }
15
+ url: '/jobs',
16
+ permission: 'view_jobs',
17
+ views: {
18
+ 'table': {
19
+ templateUrl: 'jobs/views/jobs-table-full.html'
20
+ }
21
+ }
22
22
  })
23
23
  .state('jobs.new', {
24
24
  url: '/jobs/new',
@@ -26,15 +26,15 @@ angular.module('ForemanPipeline.jobs').config(['$stateProvider', function ($stat
26
26
  collapsed: true,
27
27
  views: {
28
28
  'table': {
29
- templateUrl: 'foreman_pipeline/jobs/views/jobs-table-collapsed.html'
29
+ templateUrl: 'jobs/views/jobs-table-collapsed.html'
30
30
  },
31
31
  'action-panel': {
32
32
  controller: 'NewJobController',
33
- templateUrl: 'foreman_pipeline/jobs/new/views/new-job.html'
33
+ templateUrl: 'jobs/new/views/new-job.html'
34
34
  },
35
35
  'job-form@jobs.new': {
36
36
  controller: 'NewJobController',
37
- templateUrl: 'foreman_pipeline/jobs/new/views/new-job-form.html'
37
+ templateUrl: 'jobs/new/views/new-job-form.html'
38
38
  }
39
39
  }
40
40
  })
@@ -45,11 +45,11 @@ angular.module('ForemanPipeline.jobs').config(['$stateProvider', function ($stat
45
45
  collapsed: true,
46
46
  views: {
47
47
  'table': {
48
- templateUrl: 'foreman_pipeline/jobs/views/jobs-table-collapsed.html'
48
+ templateUrl: 'jobs/views/jobs-table-collapsed.html'
49
49
  },
50
50
  'action-panel': {
51
51
  controller: 'JobDetailsController',
52
- templateUrl: 'foreman_pipeline/jobs/details/views/job-details.html'
52
+ templateUrl: 'jobs/details/views/job-details.html'
53
53
  }
54
54
  }
55
55
  })
@@ -58,22 +58,22 @@ angular.module('ForemanPipeline.jobs').config(['$stateProvider', function ($stat
58
58
  permission: 'edit_jobs',
59
59
  collapsed: true,
60
60
  controller: 'JobDetailsInfoController',
61
- templateUrl: 'foreman_pipeline/jobs/details/views/job-details-info.html'
61
+ templateUrl: 'jobs/details/views/job-details-info.html'
62
62
  })
63
63
  .state('jobs.details.content-views', {
64
64
  url: '/content_views',
65
65
  permission: 'edit_jobs',
66
66
  collapsed: true,
67
67
  controller: 'JobDetailsContentViewsController',
68
- templateUrl: 'foreman_pipeline/jobs/details/views/job-details-content-views.html'
68
+ templateUrl: 'jobs/details/views/job-details-content-views.html'
69
69
  })
70
-
70
+
71
71
  .state('jobs.details.hostgroups', {
72
72
  url: '/hostgroups',
73
73
  permission: 'edit_jobs',
74
74
  collapsed: true,
75
75
  controller: 'JobDetailsHostgroupsController',
76
- templateUrl: 'foreman_pipeline/jobs/details/views/job-details-hostgroups.html'
76
+ templateUrl: 'jobs/details/views/job-details-hostgroups.html'
77
77
  })
78
78
 
79
79
  .state('jobs.details.resources', {
@@ -81,7 +81,7 @@ angular.module('ForemanPipeline.jobs').config(['$stateProvider', function ($stat
81
81
  collapsed: true,
82
82
  permission: 'edit_jobs',
83
83
  controller: 'JobDetailsResourcesController',
84
- templateUrl: 'foreman_pipeline/jobs/details/views/job-details-resources.html'
84
+ templateUrl: 'jobs/details/views/job-details-resources.html'
85
85
  })
86
86
 
87
87
  .state('jobs.details.environments', {
@@ -94,7 +94,7 @@ angular.module('ForemanPipeline.jobs').config(['$stateProvider', function ($stat
94
94
  collapsed: true,
95
95
  permission: 'edit_jobs',
96
96
  controller: 'JobDetailsEnvironmentsController',
97
- templateUrl: 'foreman_pipeline/jobs/details/views/job-details-environments.html'
97
+ templateUrl: 'jobs/details/views/job-details-environments.html'
98
98
  })
99
99
 
100
100
  .state('jobs.details.environments.to-environments', {
@@ -102,7 +102,7 @@ angular.module('ForemanPipeline.jobs').config(['$stateProvider', function ($stat
102
102
  collapsed: true,
103
103
  permission: 'edit_jobs',
104
104
  controller: 'JobDetailsToEnvironmentsController',
105
- templateUrl: 'foreman_pipeline/jobs/details/views/job-details-to-environments.html'
105
+ templateUrl: 'jobs/details/views/job-details-to-environments.html'
106
106
  })
107
107
 
108
108
  .state('jobs.details.jenkins-instances', {
@@ -110,12 +110,12 @@ angular.module('ForemanPipeline.jobs').config(['$stateProvider', function ($stat
110
110
  collapsed: true,
111
111
  permission: 'edit_jobs',
112
112
  controller: 'JobDetailsJenkinsController',
113
- templateUrl: 'foreman_pipeline/jobs/details/views/job-details-jenkins.html'
113
+ templateUrl: 'jobs/details/views/job-details-jenkins.html'
114
114
  })
115
115
  .state('jobs.details.jenkins-projects', {
116
116
  abstract: true,
117
117
  collapsed: true,
118
- templateUrl: 'foreman_pipeline/jobs/details/project-discovery/views/job-jenkins-projects.html'
118
+ templateUrl: 'jobs/details/project-discovery/views/job-jenkins-projects.html'
119
119
  })
120
120
 
121
121
  .state('jobs.details.jenkins-projects.list', {
@@ -123,20 +123,20 @@ angular.module('ForemanPipeline.jobs').config(['$stateProvider', function ($stat
123
123
  collapsed: true,
124
124
  permission: 'edit_jobs',
125
125
  controller: 'JobDetailsJenkinsProjectsController',
126
- templateUrl: 'foreman_pipeline/jobs/details/views/job-details-jenkins-projects.html'
126
+ templateUrl: 'jobs/details/views/job-details-jenkins-projects.html'
127
127
  })
128
128
  .state('jobs.details.jenkins-projects.discovery', {
129
129
  url: '/jenkins_projects/discovery',
130
130
  collapsed: true,
131
131
  permission: 'edit_jobs',
132
132
  controller: 'JobProjectsDiscoveryController',
133
- templateUrl: 'foreman_pipeline/jobs/details/project-discovery/views/job-projects-discovery.html'
133
+ templateUrl: 'jobs/details/project-discovery/views/job-projects-discovery.html'
134
134
  })
135
135
  .state('jobs.details.jenkins-projects.parameters', {
136
136
  url: '/jenkins_projects/:projectId',
137
137
  collapsed: true,
138
138
  permission: 'edit_jobs',
139
- controller: 'JobProjectsParametersController',
140
- templateUrl: 'foreman_pipeline/jobs/details/project-discovery/views/job-projects-parameters.html'
139
+ controller: 'JobProjectsParametersController',
140
+ templateUrl: 'jobs/details/project-discovery/views/job-projects-parameters.html'
141
141
  })
142
- }]);
142
+ }]);
@@ -1,14 +1,13 @@
1
1
  <table class="table table-striped" ng-class="{'table-mask': jobsTable.working}">
2
2
  <thead>
3
- <tr bst-table-head row-select>
4
- <th bst-table-column sortable><span translate>Name</span></th>
3
+ <tr bst-table-head>
4
+ <th bst-table-column="name" sortable><span translate>Name</span></th>
5
5
  </tr>
6
6
  </thead>
7
7
 
8
8
  <tbody>
9
9
  <tr bst-table-row
10
10
  ng-repeat="job in jobsTable.rows"
11
- row-select="job"
12
11
  active-row="stateIncludes('jobs.details', {jobId: job.id})">
13
12
  <td bst-table-cell>
14
13
  <a ui-sref="jobs.details.info({jobId: job.id})">
@@ -17,4 +16,4 @@
17
16
  </td>
18
17
  </tr>
19
18
  </tbody>
20
- </table>
19
+ </table>
@@ -3,25 +3,23 @@
3
3
  You currently do not have any Jobs. You can add Jobs using the button on the right.
4
4
  </span>
5
5
  </p>
6
-
7
6
  <table class="table table-striped"
8
- ng-class="{'table-mask' : jobsTable.working}"
9
- ng-show="jobsTable.rows.length > 0">
7
+ ng-class="{'table-mask' : jobsTable.working}"
8
+ ng-show="jobsTable.rows.length > 0">
10
9
  <thead>
11
- <tr bst-table-head row-select>
10
+ <tr bst-table-head>
12
11
  <th bst-table-column="name" sortable><span translate>Name</span></th>
13
12
  <th bst-table-column="content_view"><span translate>Content View</span></th>
14
13
  <th bst-table-column="hostgroup"><span translate>Hostgroup</span></th>
15
14
  <th bst-table-column="environment"><span translate>Environment</span></th>
16
15
  <th bst-table-column="jenkinsInstance"><span translate>Jenkins Instance</span></th>
17
-
18
16
  </tr>
19
17
  </thead>
20
18
 
21
19
  <div data-extend-template="layouts/select-all-results.html"></div>
22
20
 
23
21
  <tbody>
24
- <tr bst-table-row ng-repeat="job in jobsTable.rows" row-select="job">
22
+ <tr bst-table-row ng-repeat="job in jobsTable.rows">
25
23
  <td bst-table-cell>
26
24
  <a ui-sref="jobs.details.info({jobId: job.id})">
27
25
  <div>{{ job.name }}</div>
@@ -29,7 +27,7 @@
29
27
  </td>
30
28
  <td bst-table-cell>
31
29
  <a ng-show="{{ job.content_view !== null }}"
32
- ui-sref="content-views.details.info({ contentViewId: job.content_view.id })">
30
+ ui-sref="content-views.details.info({ contentViewId: job.content_view.id })">
33
31
  <div>{{ job.content_view.name }}</div>
34
32
  </a>
35
33
  <div ng-show="{{ job.content_view === null }}" translate>none</div>
@@ -39,28 +37,28 @@
39
37
  ng-click="transitionToHostgroup(job.hostgroup)">
40
38
  <div>{{ job.hostgroup.name }}</div>
41
39
  </a>
42
-
40
+
43
41
  <div ng-show="{{ job.hostgroup === null }}" translate>none</div>
44
-
42
+
45
43
  </td>
46
44
  <td bst-table-cell>
47
45
  <a ng-show="{{ job.environment !== null }}"
48
46
  ui-sref="environments.environment.details({ environmentId: job.environment.id })">
49
47
  <div>{{ job.environment.name }}</div>
50
48
  </a>
51
-
49
+
52
50
  <div ng-show="{{ job.environment === null }}" translate>none</div>
53
-
51
+
54
52
  </td>
55
53
  <td bst-table-cell>
56
54
  <a ng-show="{{ job.jenkins_instance !== null }}"
57
55
  ui-sref="jenkins-instances.details.info({ jenkinsInstanceId: job.jenkins_instance.id })">
58
56
  <div>{{ job.jenkins_instance.name }}</div>
59
57
  </a>
60
-
58
+
61
59
  <div ng-show="{{ job.jenkins_instance === null }}" translate>none</div>
62
-
60
+
63
61
  </td>
64
62
  </tr>
65
- </tbody>
66
- </table>
63
+ </tbody>
64
+ </table>
@@ -6,11 +6,10 @@ module Actions
6
6
  module JenkinsInstance
7
7
  class AbstractJenkinsInstanceAction < Actions::EntryAction
8
8
  include Mixins::SshExtension
9
-
9
+
10
10
  def parse_jenkins_hostname
11
11
  URI(input.fetch(:jenkins_url)).host
12
12
  end
13
-
14
13
  end
15
14
  end
16
15
  end
@@ -6,13 +6,12 @@ module Actions
6
6
 
7
7
  def run
8
8
  output[:new_key] = ::Katello::ActivationKey.create(
9
- name: "key-for-#{input[:name]}",
10
- organization_id: input[:organization_id],
11
- environment_id: input[:environment_id],
12
- content_view_id: input[:content_view_id],
13
- user_id: ::User.current.id,
14
- cp_id: input[:cp_id]
15
- )
9
+ :name => "key-for-#{input[:name]}",
10
+ :organization_id => input[:organization_id],
11
+ :environment_id => input[:environment_id],
12
+ :content_view_id => input[:content_view_id],
13
+ :user_id => ::User.current.id,
14
+ :cp_id => input[:cp_id])
16
15
  end
17
16
  end
18
17
  end
@@ -77,9 +77,8 @@ module Actions
77
77
  end
78
78
 
79
79
  def jenkins_pubkey_param_for(host)
80
- ::HostParameter.create(:name => 'foreman_pipeline_jenkins_pubkey', :value => jenkins_pubkey, :host => host)
80
+ ::HostParameter.create(:name => 'foreman_pipeline_jenkins_pubkey', :value => jenkins_pubkey, :reference_id => host.id)
81
81
  end
82
-
83
82
  end
84
83
  end
85
84
  end
@@ -20,10 +20,10 @@ module Actions
20
20
  :activation_key => create_key.output[:new_key],
21
21
  :jenkins_instance_id => job.jenkins_instance_id})
22
22
 
23
- suspend_until = plan_action(SuspendUntilProvisioned, 'host_id' => create_host.output[:host][:id])
23
+ wait_until = plan_action(WaitUntilProvisioned, :host_id => create_host.output[:host][:id])
24
24
 
25
25
  plan_self(:create_host => create_host.output[:host],
26
- :installed_at => suspend_until.output[:object][:installed_at],
26
+ :installed_at => wait_until.output[:host][:installed_at],
27
27
  :new_key => create_key.output[:new_key])
28
28
 
29
29
  end
@@ -0,0 +1,43 @@
1
+ module Actions
2
+ module ForemanPipeline
3
+ module Job
4
+ class WaitUntilProvisioned < Actions::Base
5
+ include ::Dynflow::Action::Cancellable
6
+ include ::Dynflow::Action::Polling
7
+
8
+ def done?
9
+ external_task[:build]
10
+ end
11
+
12
+ def timeout
13
+ input[:timeout] || 2 * 60 * 60 # 2 hours default
14
+ end
15
+
16
+ def invoke_external_task
17
+ schedule_timeout(timeout) unless timeout <= 0
18
+ build_status
19
+ end
20
+
21
+ def poll_external_task
22
+ fail(_("'%s' is a required parameter") % 'host_id') unless input.key?(:host_id)
23
+ host = Host.find(input[:host_id])
24
+ create_output(host)
25
+ build_status(host)
26
+ end
27
+
28
+ def poll_interval
29
+ 30
30
+ end
31
+
32
+ def create_output(host)
33
+ output[:host] = host
34
+ end
35
+
36
+ def build_status(host = nil)
37
+ status = (!host.nil? && (host.reports.count > 1) && !host.reports.last.error?)
38
+ { :build => status }
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
@@ -22,7 +22,6 @@ module ForemanPipeline
22
22
  authorized(normalize_name("view"))
23
23
  end
24
24
 
25
- # TODO: remove argument
26
25
  def normalize_name(action_string)
27
26
  (action_string + self.class.name.demodulize.pluralize).underscore.to_sym
28
27
  end
@@ -14,11 +14,11 @@ module ForemanPipeline
14
14
  has_many :jobs, :class_name => "ForemanPipeline::Job", :dependent => :nullify
15
15
  belongs_to :jenkins_user, :class_name => "ForemanPipeline::JenkinsUser"
16
16
 
17
- FILEPATH_REGEX = /^(\/|~)[a-z0-9\-_.\/]*[^\/]$/i
17
+ FILEPATH_REGEX = /\A(\/|~)[a-z0-9\-_.\/]*[^\/]\z/i
18
18
 
19
19
  validates :name, :presence => true
20
20
  validates :cert_path, :format => {:with => FILEPATH_REGEX }
21
- validates :url, :uniqueness => true, :format => { :with => /^(http|https):\/\/\S+:\d{1,4}$/}
21
+ validates :url, :uniqueness => true, :format => { :with => /\A(http|https):\/\/\S+:\d{1,4}\z/}
22
22
  validates :organization, :presence => true
23
23
  validates :jenkins_home, :format => { :with => FILEPATH_REGEX }
24
24
 
@@ -14,8 +14,7 @@ module ForemanPipeline
14
14
  belongs_to :environment, :class_name => 'Katello::KTEnvironment'
15
15
 
16
16
  has_many :job_jenkins_projects, :dependent => :destroy
17
- has_many :jenkins_projects, :through => :job_jenkins_projects, :class_name => 'ForemanPipeline::JenkinsProject', :dependent => :restrict
18
-
17
+ has_many :jenkins_projects, :through => :job_jenkins_projects, :class_name => 'ForemanPipeline::JenkinsProject'
19
18
  has_many :content_view_repositories, :class_name=> 'Katello::ContentViewRepository',
20
19
  :primary_key => :content_view_id, :foreign_key => :content_view_id
21
20
  has_many :repositories, :through => :content_view_repositories
@@ -20,7 +20,7 @@ module ForemanPipeline
20
20
  end
21
21
 
22
22
  def remove_orphaned_projects
23
- JenkinsProject.find(:all).map { |p| p.destroy if p.jobs.empty? }
23
+ JenkinsProject.all.map { |p| p.destroy if p.jobs.empty? }
24
24
  end
25
25
 
26
26
  end
@@ -1,11 +1,16 @@
1
+ require 'foreman_pipeline/monkeys'
2
+ require 'bastion'
3
+ require 'katello'
4
+ require 'net/ssh'
5
+ require 'net/scp'
6
+
1
7
  module ForemanPipeline
2
8
  class Engine < ::Rails::Engine
3
9
  isolate_namespace ForemanPipeline
4
- require 'foreman_deployments'
5
- require 'bastion'
6
- require 'katello'
7
- require 'net/ssh'
8
- require 'net/scp'
10
+
11
+ initializer 'foreman_pipeline.assets_dispatcher', :before => :build_middleware_stack do |app|
12
+ app.middleware.use ::ActionDispatch::Static, "#{ForemanPipeline::Engine.root}/app/assets/javascripts/foreman_pipeline"
13
+ end
9
14
 
10
15
  initializer 'foreman_pipeline.mount_engine', :after => :build_middleware_stack do |app|
11
16
  app.routes_reloader.paths << "#{ForemanPipeline::Engine.root}/config/mount_engine.rb"
@@ -19,17 +24,24 @@ module ForemanPipeline
19
24
  app.config.autoload_paths += Dir["#{config.root}/app/views/foreman"]
20
25
  end
21
26
 
22
- initializer 'foreman_pipeline.register_plugin', :after => :finisher_hook do
27
+ initializer 'foreman_pipeline.register_plugin', :before => :finisher_hook do
23
28
  require 'foreman_pipeline/plugin'
24
29
  require 'foreman_pipeline/permissions'
25
30
  require 'foreman_pipeline/roles'
31
+ require 'foreman_pipeline/skip_tests'
26
32
  end
27
33
 
28
- initializer 'foreman_pipeline.assets', :group => :all do |app|
34
+ initializer 'foreman_pipeline.assets.precompile' do |app|
35
+ app.config.assets.precompile += %w(foreman_pipeline/foreman_pipeline.js
36
+ foreman_pipeline/foreman_pipeline.css)
37
+ end
38
+
39
+ initializer 'foreman_pipeline.configure_assets', :group => :assets do |app|
29
40
  SETTINGS[:foreman_pipeline] = {
30
41
  :assets => {
31
42
  :precompile => [
32
- 'foreman_pipeline/foreman_pipeline.js'
43
+ 'foreman_pipeline/foreman_pipeline.js',
44
+ 'foreman_pipeline/foreman_pipeline.css'
33
45
  ]
34
46
  }
35
47
  }
@@ -68,6 +80,7 @@ module ForemanPipeline
68
80
  ::ComputeResource.send :include, ForemanPipeline::Concerns::ComputeResourceExtension
69
81
  end
70
82
 
83
+
71
84
  rake_tasks do
72
85
  load "#{ForemanPipeline::Engine.root}/lib/foreman_pipeline/tasks/foreman_pipeline_seed.rake"
73
86
  load "#{ForemanPipeline::Engine.root}/lib/foreman_pipeline/tasks/foreman_pipeline_test.rake"
@@ -0,0 +1,8 @@
1
+ module ActiveRecord
2
+ class Base
3
+ # adding to_hash to enable for using in dynflog actions' output
4
+ def to_hash
5
+ attributes
6
+ end
7
+ end
8
+ end
@@ -1,5 +1,5 @@
1
1
  Foreman::Plugin.register :foreman_pipeline do
2
- requires_foreman '>= 1.9'
2
+ requires_foreman '>= 1.11'
3
3
 
4
4
  sub_menu :top_menu, :foreman_pipeline_menu, :caption => N_('Pipeline') do
5
5
  menu :top_menu,
@@ -7,12 +7,14 @@ Foreman::Plugin.register :foreman_pipeline do
7
7
  :caption => N_("Jobs"),
8
8
  :url => '/jobs',
9
9
  :url_hash => {:controller => 'foreman_pipeline/api/jobs', :action => 'index'},
10
- :engine => ForemanPipeline::Engine
10
+ :engine => ForemanPipeline::Engine,
11
+ :turbolinks => false
11
12
  menu :top_menu,
12
13
  :jenkins_instances,
13
14
  :caption => N_("Jenkins Instances"),
14
15
  :url => '/jenkins_instances',
15
16
  :url_hash => {:controller => 'foreman_pipeline/api/jenkins_instances', :action => 'index'},
16
- :engine => ForemanPipeline::Engine
17
+ :engine => ForemanPipeline::Engine,
18
+ :turbolinks => false
17
19
  end
18
20
  end
@@ -0,0 +1,79 @@
1
+ require 'foreman_pipeline/plugin'
2
+
3
+ #skipping Bastion routes as they have no permissions
4
+ tests_to_skip = {
5
+ "AccessPermissionsTest" => ["route bastion/bastion/index should have a permission that grants access",
6
+ "route bastion/bastion/index_ie should have a permission that grants access",
7
+ "route katello/api/v2/host_packages/auto_complete_search should have a permission that grants access"],
8
+ #skipping seeds tests because katello adds its settings and we get 'unexpected invocation' for mock object
9
+ "SeedsTest" => ["all access permissions are created by permissions seed",
10
+ "doesn't add a template back that was deleted",
11
+ "doesn't add a template back that was renamed",
12
+ "don't seed location when a location already exists",
13
+ "don't seed organization when an org already exists",
14
+ "is idempotent",
15
+ "no audits are recorded",
16
+ "populates bookmarks",
17
+ "populates config templates",
18
+ "populates features",
19
+ "populates hidden admin users",
20
+ "populates installation media",
21
+ "populates partition tables",
22
+ "seed location when environment",
23
+ "seed location when environment SEED_LOCATION specified",
24
+ "seed organization when environment SEED_ORGANIZATION specified",
25
+ "viewer role contains all view permissions"],
26
+ "SeedsTest::populating an initial admin user" => ["with defaults",
27
+ "with environment overrides"],
28
+ "LocationTest" => ["selected_or_inherited_ids for inherited location",
29
+ "used_and_selected_or_inherited_ids for inherited location"],
30
+ "OrganizationTest" => ["name can be the same if parent is different",
31
+ ".my_organizations returns user's associated orgs and children"],
32
+ #parent_id for organization is disabled by default
33
+ "TaxonomixTest" => [".used_organization_ids can work with array of organizations"],
34
+ #bunch of broken tests, various causes
35
+ "UserTest" => ["when a user logs in, last login time should be updated",
36
+ "return organization and child ids for non-admin user",
37
+ "#ensure_last_admin_is_not_deleted with non-admins",
38
+ "can search users by role id"],
39
+ "UsergroupTest" => ["delete user if not in LDAP directory",
40
+ "add user if in LDAP directory",
41
+ "hosts should be retrieved from recursive/complex usergroup definitions",
42
+ "cannot be destroyed when in use by a host",
43
+ "add_users is case insensitive and does not add nonexistent users",
44
+ "remove users removes user list and is case insensitive"],
45
+
46
+ "Api::TestableControllerTest::errors" => ["top level key is error, no metadata included"],
47
+ "Api::V1::ComputeResourcesControllerTest" => ["should get index of owned"],
48
+ "Api::V1::ConfigTemplatesControllerTest" => ["should get template detail", "should create valid"],
49
+ "Api::V1::HostsControllerTest" => ["should not list a host out of users hosts scope"],
50
+ "Api::V1::ReportsControllerTest" => ["should get last report", "should get last report for given host only"],
51
+ "Api::V1::RolesControllerTest" => ["should get index"],
52
+ "Api::V1::SmartProxiesControllerTest" => ["should get index filtered by type"],
53
+ "Api::V2::HostsControllerTest::BMC proxy operations" => ["power call to interface",
54
+ "wrong power call fails gracefully",
55
+ "boot call to interface",
56
+ "wrong boot call to interface fails gracefully"],
57
+ "Api::V2::HostsControllerTest" => ["should show specific status hosts",
58
+ "should show hosts vm attributes",
59
+ "should disassociate host",
60
+ "should run puppet for specific host",
61
+ "non-admin user with power_host permission can boot a vm",
62
+ "template should return rendered template",
63
+ "wrong template name should return not found",
64
+ "test_rebuild_config_optimistic",
65
+ "test_rebuild_config_pessimistic"],
66
+ "Api::V2::LocationsControllerTest" => ["object name on show can be specified"],
67
+ "Containers::StepsControllerTest" => ["image show doesnot load katello"],
68
+ "HostsControllerTest::submit actions with multiple hosts" => ["destroy"],
69
+ "LocationsControllerTest" => ["should delete null location",
70
+ "should clear the session if the user deleted their current location",
71
+ "should clone location with assocations"],
72
+ "OrganizationsControllerTest" => ["should get edit",
73
+ "should delete null organization",
74
+ "should clear the session if the user deleted their current organization",
75
+ "should clone organization with assocations"],
76
+ "UnattendedControllerTest" => ["template with hostgroup should be identified as hostgroup provisioning"]
77
+ }
78
+
79
+ Foreman::Plugin.find(:foreman_pipeline).send :tests_to_skip, tests_to_skip
@@ -1,3 +1,3 @@
1
1
  module ForemanPipeline
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.10"
3
3
  end
metadata CHANGED
@@ -1,99 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_pipeline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ondřej Pražák
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-15 00:00:00.000000000 Z
11
+ date: 2016-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: foreman_deployments
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ~>
18
- - !ruby/object:Gem::Version
19
- version: 0.0.1
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ~>
25
- - !ruby/object:Gem::Version
26
- version: 0.0.1
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: jenkins_api_client
29
15
  requirement: !ruby/object:Gem::Requirement
30
16
  requirements:
31
- - - ~>
17
+ - - "~>"
32
18
  - !ruby/object:Gem::Version
33
- version: 1.4.0
19
+ version: '1.4'
34
20
  type: :runtime
35
21
  prerelease: false
36
22
  version_requirements: !ruby/object:Gem::Requirement
37
23
  requirements:
38
- - - ~>
24
+ - - "~>"
39
25
  - !ruby/object:Gem::Version
40
- version: 1.4.0
41
- - !ruby/object:Gem::Dependency
42
- name: katello
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ! '>='
46
- - !ruby/object:Gem::Version
47
- version: 2.4.0.rc2
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ! '>='
53
- - !ruby/object:Gem::Version
54
- version: 2.4.0.rc2
26
+ version: '1.4'
55
27
  - !ruby/object:Gem::Dependency
56
28
  name: bastion
57
29
  requirement: !ruby/object:Gem::Requirement
58
30
  requirements:
59
- - - ~>
60
- - !ruby/object:Gem::Version
61
- version: '2.0'
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ~>
67
- - !ruby/object:Gem::Version
68
- version: '2.0'
69
- - !ruby/object:Gem::Dependency
70
- name: net-ssh
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ~>
31
+ - - "~>"
74
32
  - !ruby/object:Gem::Version
75
- version: '2.9'
33
+ version: '3.0'
76
34
  type: :runtime
77
35
  prerelease: false
78
36
  version_requirements: !ruby/object:Gem::Requirement
79
37
  requirements:
80
- - - ~>
38
+ - - "~>"
81
39
  - !ruby/object:Gem::Version
82
- version: '2.9'
83
- - !ruby/object:Gem::Dependency
84
- name: net-scp
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ~>
88
- - !ruby/object:Gem::Version
89
- version: '1.1'
90
- type: :runtime
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ~>
95
- - !ruby/object:Gem::Version
96
- version: '1.1'
40
+ version: '3.0'
97
41
  description: Jenkins is able to deploy artifacts onto newly provisioned host by Foreman
98
42
  email:
99
43
  - oprazak@redhat.com
@@ -188,7 +132,6 @@ files:
188
132
  - app/lib/actions/foreman_pipeline/jenkins/list.rb
189
133
  - app/lib/actions/foreman_pipeline/jenkins/wait_and_poll.rb
190
134
  - app/lib/actions/foreman_pipeline/jenkins/wait_for_build.rb
191
- - app/lib/actions/foreman_pipeline/jenkins/wait_host_ready.rb
192
135
  - app/lib/actions/foreman_pipeline/jenkins_instance/abstract_jenkins_instance_action.rb
193
136
  - app/lib/actions/foreman_pipeline/jenkins_instance/create_jenkins_instance_keys.rb
194
137
  - app/lib/actions/foreman_pipeline/job/create_activation_key.rb
@@ -203,7 +146,7 @@ files:
203
146
  - app/lib/actions/foreman_pipeline/job/redeploy.rb
204
147
  - app/lib/actions/foreman_pipeline/job/repo_sync_job_hook.rb
205
148
  - app/lib/actions/foreman_pipeline/job/run_job_manually.rb
206
- - app/lib/actions/foreman_pipeline/job/suspend_until_provisioned.rb
149
+ - app/lib/actions/foreman_pipeline/job/wait_until_provisioned.rb
207
150
  - app/lib/actions/foreman_pipeline/mixins/ssh_extension.rb
208
151
  - app/lib/actions/foreman_pipeline/mixins/uri_extension.rb
209
152
  - app/lib/foreman_pipeline/api/rendering.rb
@@ -289,6 +232,7 @@ files:
289
232
  - db/migrate/20150923073033_drop_orphaned_table.rb
290
233
  - lib/foreman_pipeline.rb
291
234
  - lib/foreman_pipeline/engine.rb
235
+ - lib/foreman_pipeline/monkeys.rb
292
236
  - lib/foreman_pipeline/permissions.rb
293
237
  - lib/foreman_pipeline/permissions/jenkins_instance_permissions.rb
294
238
  - lib/foreman_pipeline/permissions/jenkins_project_params_permissions.rb
@@ -298,6 +242,7 @@ files:
298
242
  - lib/foreman_pipeline/permissions/job_permissions.rb
299
243
  - lib/foreman_pipeline/plugin.rb
300
244
  - lib/foreman_pipeline/roles.rb
245
+ - lib/foreman_pipeline/skip_tests.rb
301
246
  - lib/foreman_pipeline/tasks/foreman_pipeline_seed.rake
302
247
  - lib/foreman_pipeline/tasks/foreman_pipeline_test.rake
303
248
  - lib/foreman_pipeline/version.rb
@@ -317,17 +262,17 @@ require_paths:
317
262
  - lib
318
263
  required_ruby_version: !ruby/object:Gem::Requirement
319
264
  requirements:
320
- - - ! '>='
265
+ - - ">="
321
266
  - !ruby/object:Gem::Version
322
267
  version: '0'
323
268
  required_rubygems_version: !ruby/object:Gem::Requirement
324
269
  requirements:
325
- - - ! '>='
270
+ - - ">="
326
271
  - !ruby/object:Gem::Version
327
272
  version: '0'
328
273
  requirements: []
329
274
  rubyforge_project:
330
- rubygems_version: 2.4.3
275
+ rubygems_version: 2.4.6
331
276
  signing_key:
332
277
  specification_version: 4
333
278
  summary: Makes Foreman talk to Jenkins CI server.
@@ -335,6 +280,7 @@ test_files:
335
280
  - test/factories/hostgroup_factory.rb
336
281
  - test/factories/jenkins_instance_related_factory.rb
337
282
  - test/foreman_pipeline_plugin_test_helper.rb
338
- - test/unit/sanity_test.rb
339
283
  - test/unit/jenkins_instance_test.rb
284
+ - test/unit/sanity_test.rb
340
285
  - test/unit/job_test.rb
286
+ has_rdoc:
@@ -1,36 +0,0 @@
1
- module Actions
2
- module ForemanPipeline
3
- module Jenkins
4
- class WaitHostReady < WaitAndPoll
5
- include Mixins::SshExtension
6
-
7
- private
8
-
9
- def poll_external_task
10
- status = nil
11
- ip = Socket::getaddrinfo(input[:jenkins_instance_hostname], 'www', nil, Socket::SOCK_STREAM)[0][3]
12
- Net::SSH.start(ip, 'root', :keys => [input.fetch(:cert_path)]) do |ssh|
13
- status = ssh_exec!(ssh, command)
14
- end
15
- output[:jenkins_ip] = ip
16
- output[:status] = status
17
- status[2].to_i == 0
18
- end
19
-
20
- def command
21
- c = []
22
- c << "sudo -u jenkins ssh -i #{input[:jenkins_home]}/.ssh/#{input[:jenkins_instance_hostname]} -o StrictHostKeyChecking=no root@#{input[:host_ip]}"
23
- c << "'echo"
24
- c << echo
25
- c << "'"
26
- c.join(" ")
27
- end
28
-
29
- def echo
30
- '"host ready yet?"'
31
- end
32
-
33
- end
34
- end
35
- end
36
- end
@@ -1,13 +0,0 @@
1
- module Actions
2
- module ForemanPipeline
3
- module Job
4
- class SuspendUntilProvisioned < ::ForemanDeployments::Tasks::WaitUntilBuiltTaskDefinition::Action
5
- include ::Dynflow::Action::Cancellable
6
-
7
- def done?
8
- output[:task][:build]
9
- end
10
- end
11
- end
12
- end
13
- end