shipit-engine 0.44.2 → 0.44.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/jobs/shipit/github_sync_job.rb +3 -0
- data/lib/shipit/version.rb +1 -1
- data/test/dummy/config/application.rb +1 -1
- data/test/dummy/db/schema.rb +149 -150
- data/test/jobs/github_sync_job_test.rb +8 -0
- metadata +6 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f7bc398d0d9d1f733ac693eb85fa5a846bdab55917dbcd3523c8f69e3aaf7c19
|
|
4
|
+
data.tar.gz: 9de39080cf3aa2b856089acb23c6dff7d86f8ae05bb33a40daf72bbda1530cc8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5303a01b246deb2246cc6d6a4484a65fc9cee1c9ad02575904550b2184f48b3d9a091fceeeaf0816e428e27fc1484ddd055df30d2a30320394108685f4810103
|
|
7
|
+
data.tar.gz: cf63c0435972965d0e3a6e8a66799b7807d7517922929f440caa0d15a30d806b1dc253e685ca75df402a6efbd321e53788f7591194920ad22fb95bb8371e0b2c
|
|
@@ -67,6 +67,9 @@ module Shipit
|
|
|
67
67
|
yield
|
|
68
68
|
rescue Octokit::NotFound
|
|
69
69
|
stack.mark_as_inaccessible!
|
|
70
|
+
rescue Shipit::GithubOrganizationUnknown => e
|
|
71
|
+
Rails.logger.warn("GithubSyncJob: unknown GitHub organization #{e.message} for stack #{stack.id}")
|
|
72
|
+
stack.mark_as_inaccessible!
|
|
70
73
|
else
|
|
71
74
|
stack.mark_as_accessible!
|
|
72
75
|
end
|
data/lib/shipit/version.rb
CHANGED
data/test/dummy/db/schema.rb
CHANGED
|
@@ -10,75 +10,75 @@
|
|
|
10
10
|
#
|
|
11
11
|
# It's strongly recommended that you check this file into your version control system.
|
|
12
12
|
|
|
13
|
-
ActiveRecord::Schema[
|
|
13
|
+
ActiveRecord::Schema[8.1].define(version: 2025_02_07_203053) do
|
|
14
14
|
create_table "api_clients", force: :cascade do |t|
|
|
15
|
-
t.text "permissions", limit: 65535
|
|
16
|
-
t.integer "creator_id", limit: 4
|
|
17
15
|
t.datetime "created_at", null: false
|
|
18
|
-
t.
|
|
16
|
+
t.integer "creator_id", limit: 4
|
|
19
17
|
t.string "name", limit: 255, default: ""
|
|
18
|
+
t.text "permissions", limit: 65535
|
|
20
19
|
t.integer "stack_id", limit: 4
|
|
20
|
+
t.datetime "updated_at", null: false
|
|
21
21
|
t.index ["creator_id"], name: "index_api_clients_on_creator_id"
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
create_table "check_runs", force: :cascade do |t|
|
|
25
|
-
t.integer "stack_id", null: false
|
|
26
25
|
t.integer "commit_id", null: false
|
|
27
|
-
t.bigint "github_id", null: false
|
|
28
|
-
t.string "name", null: false
|
|
29
26
|
t.string "conclusion", limit: 20
|
|
30
|
-
t.
|
|
27
|
+
t.datetime "created_at", null: false
|
|
31
28
|
t.string "details_url"
|
|
29
|
+
t.bigint "github_id", null: false
|
|
30
|
+
t.datetime "github_updated_at"
|
|
32
31
|
t.string "html_url"
|
|
33
|
-
t.
|
|
32
|
+
t.string "name", null: false
|
|
33
|
+
t.integer "stack_id", null: false
|
|
34
|
+
t.string "title", limit: 1024
|
|
34
35
|
t.datetime "updated_at", null: false
|
|
35
|
-
t.datetime "github_updated_at"
|
|
36
36
|
t.index ["commit_id"], name: "index_check_runs_on_commit_id"
|
|
37
37
|
t.index ["github_id", "commit_id"], name: "index_check_runs_on_github_id_and_commit_id", unique: true
|
|
38
38
|
t.index ["stack_id"], name: "index_check_runs_on_stack_id"
|
|
39
39
|
end
|
|
40
40
|
|
|
41
41
|
create_table "commit_deployment_statuses", force: :cascade do |t|
|
|
42
|
-
t.integer "commit_deployment_id"
|
|
43
|
-
t.string "status"
|
|
44
|
-
t.bigint "github_id"
|
|
45
42
|
t.string "api_url"
|
|
43
|
+
t.integer "commit_deployment_id"
|
|
46
44
|
t.datetime "created_at", null: false
|
|
45
|
+
t.bigint "github_id"
|
|
46
|
+
t.string "status"
|
|
47
47
|
t.datetime "updated_at", null: false
|
|
48
48
|
t.index ["commit_deployment_id"], name: "index_commit_deployment_statuses_on_commit_deployment_id"
|
|
49
49
|
end
|
|
50
50
|
|
|
51
51
|
create_table "commit_deployments", force: :cascade do |t|
|
|
52
|
-
t.integer "commit_id"
|
|
53
|
-
t.integer "task_id"
|
|
54
|
-
t.bigint "github_id"
|
|
55
52
|
t.string "api_url"
|
|
53
|
+
t.integer "commit_id"
|
|
56
54
|
t.datetime "created_at", null: false
|
|
57
|
-
t.
|
|
55
|
+
t.bigint "github_id"
|
|
58
56
|
t.string "sha", limit: 40
|
|
57
|
+
t.integer "task_id"
|
|
58
|
+
t.datetime "updated_at", null: false
|
|
59
59
|
t.index ["commit_id", "task_id"], name: "index_commit_deployments_on_commit_id_and_task_id", unique: true
|
|
60
60
|
t.index ["task_id"], name: "index_commit_deployments_on_task_id"
|
|
61
61
|
end
|
|
62
62
|
|
|
63
63
|
create_table "commits", force: :cascade do |t|
|
|
64
|
-
t.integer "
|
|
64
|
+
t.integer "additions", limit: 4
|
|
65
65
|
t.integer "author_id", limit: 4
|
|
66
|
-
t.integer "committer_id", limit: 4
|
|
67
|
-
t.string "sha", limit: 40, null: false
|
|
68
|
-
t.text "message", limit: 65535, null: false
|
|
69
|
-
t.datetime "created_at"
|
|
70
|
-
t.datetime "updated_at"
|
|
71
|
-
t.boolean "detached", default: false, null: false
|
|
72
66
|
t.datetime "authored_at", null: false
|
|
73
67
|
t.datetime "committed_at", null: false
|
|
74
|
-
t.integer "
|
|
68
|
+
t.integer "committer_id", limit: 4
|
|
69
|
+
t.datetime "created_at"
|
|
75
70
|
t.integer "deletions", limit: 4
|
|
76
|
-
t.
|
|
77
|
-
t.string "pull_request_title", limit: 1024
|
|
78
|
-
t.integer "merge_request_id"
|
|
79
|
-
t.boolean "locked", default: false, null: false
|
|
71
|
+
t.boolean "detached", default: false, null: false
|
|
80
72
|
t.integer "lock_author_id", limit: 4
|
|
73
|
+
t.boolean "locked", default: false, null: false
|
|
74
|
+
t.integer "merge_request_id"
|
|
75
|
+
t.text "message", limit: 65535, null: false
|
|
81
76
|
t.string "pull_request_head_sha", limit: 40
|
|
77
|
+
t.integer "pull_request_number"
|
|
78
|
+
t.string "pull_request_title", limit: 1024
|
|
79
|
+
t.string "sha", limit: 40, null: false
|
|
80
|
+
t.integer "stack_id", limit: 4, null: false
|
|
81
|
+
t.datetime "updated_at"
|
|
82
82
|
t.index ["author_id"], name: "index_commits_on_author_id"
|
|
83
83
|
t.index ["committer_id"], name: "index_commits_on_committer_id"
|
|
84
84
|
t.index ["created_at"], name: "index_commits_on_created_at"
|
|
@@ -87,107 +87,107 @@ ActiveRecord::Schema[7.2].define(version: 2025_02_07_203053) do
|
|
|
87
87
|
end
|
|
88
88
|
|
|
89
89
|
create_table "continuous_delivery_schedules", force: :cascade do |t|
|
|
90
|
+
t.datetime "created_at", null: false
|
|
91
|
+
t.boolean "friday_enabled", default: true, null: false
|
|
92
|
+
t.time "friday_end", default: "2000-01-01 23:59:00", null: false
|
|
93
|
+
t.time "friday_start", default: "2000-01-01 00:00:00", null: false
|
|
94
|
+
t.boolean "monday_enabled", default: true, null: false
|
|
95
|
+
t.time "monday_end", default: "2000-01-01 23:59:00", null: false
|
|
96
|
+
t.time "monday_start", default: "2000-01-01 00:00:00", null: false
|
|
97
|
+
t.boolean "saturday_enabled", default: true, null: false
|
|
98
|
+
t.time "saturday_end", default: "2000-01-01 23:59:00", null: false
|
|
99
|
+
t.time "saturday_start", default: "2000-01-01 00:00:00", null: false
|
|
90
100
|
t.integer "stack_id", null: false
|
|
91
101
|
t.boolean "sunday_enabled", default: true, null: false
|
|
92
|
-
t.time "sunday_start", default: "2000-01-01 00:00:00", null: false
|
|
93
102
|
t.time "sunday_end", default: "2000-01-01 23:59:00", null: false
|
|
94
|
-
t.
|
|
95
|
-
t.
|
|
96
|
-
t.time "
|
|
103
|
+
t.time "sunday_start", default: "2000-01-01 00:00:00", null: false
|
|
104
|
+
t.boolean "thursday_enabled", default: true, null: false
|
|
105
|
+
t.time "thursday_end", default: "2000-01-01 23:59:00", null: false
|
|
106
|
+
t.time "thursday_start", default: "2000-01-01 00:00:00", null: false
|
|
97
107
|
t.boolean "tuesday_enabled", default: true, null: false
|
|
98
|
-
t.time "tuesday_start", default: "2000-01-01 00:00:00", null: false
|
|
99
108
|
t.time "tuesday_end", default: "2000-01-01 23:59:00", null: false
|
|
109
|
+
t.time "tuesday_start", default: "2000-01-01 00:00:00", null: false
|
|
110
|
+
t.datetime "updated_at", null: false
|
|
100
111
|
t.boolean "wednesday_enabled", default: true, null: false
|
|
101
|
-
t.time "wednesday_start", default: "2000-01-01 00:00:00", null: false
|
|
102
112
|
t.time "wednesday_end", default: "2000-01-01 23:59:00", null: false
|
|
103
|
-
t.
|
|
104
|
-
t.time "thursday_start", default: "2000-01-01 00:00:00", null: false
|
|
105
|
-
t.time "thursday_end", default: "2000-01-01 23:59:00", null: false
|
|
106
|
-
t.boolean "friday_enabled", default: true, null: false
|
|
107
|
-
t.time "friday_start", default: "2000-01-01 00:00:00", null: false
|
|
108
|
-
t.time "friday_end", default: "2000-01-01 23:59:00", null: false
|
|
109
|
-
t.boolean "saturday_enabled", default: true, null: false
|
|
110
|
-
t.time "saturday_start", default: "2000-01-01 00:00:00", null: false
|
|
111
|
-
t.time "saturday_end", default: "2000-01-01 23:59:00", null: false
|
|
112
|
-
t.datetime "created_at", null: false
|
|
113
|
-
t.datetime "updated_at", null: false
|
|
113
|
+
t.time "wednesday_start", default: "2000-01-01 00:00:00", null: false
|
|
114
114
|
t.index ["stack_id"], name: "index_continuous_delivery_schedules_on_stack_id", unique: true
|
|
115
115
|
end
|
|
116
116
|
|
|
117
117
|
create_table "deliveries", force: :cascade do |t|
|
|
118
|
-
t.integer "hook_id", limit: 4, null: false
|
|
119
|
-
t.string "status", limit: 50, default: "pending", null: false
|
|
120
|
-
t.string "url", limit: 4096, null: false
|
|
121
118
|
t.string "content_type", limit: 255, null: false
|
|
119
|
+
t.datetime "created_at", null: false
|
|
120
|
+
t.datetime "delivered_at"
|
|
122
121
|
t.string "event", limit: 50, null: false
|
|
122
|
+
t.integer "hook_id", limit: 4, null: false
|
|
123
123
|
t.text "payload", limit: 16777215, null: false
|
|
124
|
+
t.text "response_body", limit: 65535
|
|
124
125
|
t.integer "response_code", limit: 4
|
|
125
126
|
t.text "response_headers", limit: 65535
|
|
126
|
-
t.
|
|
127
|
-
t.datetime "delivered_at"
|
|
128
|
-
t.datetime "created_at", null: false
|
|
127
|
+
t.string "status", limit: 50, default: "pending", null: false
|
|
129
128
|
t.datetime "updated_at", null: false
|
|
129
|
+
t.string "url", limit: 4096, null: false
|
|
130
130
|
t.index ["hook_id", "event", "status"], name: "index_deliveries_on_hook_id_and_event_and_status"
|
|
131
131
|
t.index ["hook_id", "status"], name: "index_deliveries_on_hook_id_and_status"
|
|
132
132
|
end
|
|
133
133
|
|
|
134
134
|
create_table "github_hooks", force: :cascade do |t|
|
|
135
|
-
t.
|
|
136
|
-
t.bigint "github_id"
|
|
137
|
-
t.string "event", limit: 50, null: false
|
|
135
|
+
t.string "api_url", limit: 255
|
|
138
136
|
t.datetime "created_at"
|
|
139
|
-
t.
|
|
137
|
+
t.string "event", limit: 50, null: false
|
|
138
|
+
t.bigint "github_id"
|
|
139
|
+
t.string "organization", limit: 39
|
|
140
140
|
t.string "secret", limit: 255
|
|
141
|
-
t.
|
|
141
|
+
t.integer "stack_id", limit: 4
|
|
142
142
|
t.string "type", limit: 255
|
|
143
|
-
t.
|
|
143
|
+
t.datetime "updated_at"
|
|
144
144
|
t.index ["organization", "event"], name: "index_github_hooks_on_organization_and_event", unique: true
|
|
145
145
|
t.index ["stack_id", "event"], name: "index_github_hooks_on_stack_id_and_event", unique: true
|
|
146
146
|
end
|
|
147
147
|
|
|
148
148
|
create_table "hooks", force: :cascade do |t|
|
|
149
|
-
t.integer "stack_id", limit: 4
|
|
150
|
-
t.string "delivery_url", limit: 4096, null: false
|
|
151
149
|
t.string "content_type", limit: 4, default: "json", null: false
|
|
152
|
-
t.
|
|
150
|
+
t.datetime "created_at", null: false
|
|
151
|
+
t.string "delivery_url", limit: 4096, null: false
|
|
153
152
|
t.string "events", limit: 255, default: "", null: false
|
|
154
153
|
t.boolean "insecure_ssl", default: false, null: false
|
|
155
|
-
t.
|
|
154
|
+
t.string "secret", limit: 255
|
|
155
|
+
t.integer "stack_id", limit: 4
|
|
156
156
|
t.datetime "updated_at", null: false
|
|
157
157
|
t.index ["stack_id"], name: "index_hooks_on_stack_id"
|
|
158
158
|
end
|
|
159
159
|
|
|
160
160
|
create_table "memberships", force: :cascade do |t|
|
|
161
|
-
t.integer "team_id", limit: 4
|
|
162
|
-
t.integer "user_id", limit: 4
|
|
163
161
|
t.datetime "created_at", null: false
|
|
162
|
+
t.integer "team_id", limit: 4
|
|
164
163
|
t.datetime "updated_at", null: false
|
|
164
|
+
t.integer "user_id", limit: 4
|
|
165
165
|
t.index ["team_id", "user_id"], name: "index_memberships_on_team_id_and_user_id", unique: true
|
|
166
166
|
t.index ["user_id"], name: "index_memberships_on_user_id"
|
|
167
167
|
end
|
|
168
168
|
|
|
169
169
|
create_table "merge_requests", force: :cascade do |t|
|
|
170
|
-
t.integer "stack_id", null: false
|
|
171
|
-
t.integer "number", null: false
|
|
172
|
-
t.string "title", limit: 256
|
|
173
|
-
t.integer "github_id", limit: 8
|
|
174
|
-
t.string "api_url", limit: 1024
|
|
175
|
-
t.string "state"
|
|
176
|
-
t.integer "head_id"
|
|
177
|
-
t.boolean "mergeable"
|
|
178
170
|
t.integer "additions", default: 0, null: false
|
|
171
|
+
t.string "api_url", limit: 1024
|
|
172
|
+
t.integer "base_commit_id"
|
|
173
|
+
t.string "base_ref", limit: 1024
|
|
174
|
+
t.string "branch"
|
|
175
|
+
t.datetime "created_at", null: false
|
|
179
176
|
t.integer "deletions", default: 0, null: false
|
|
180
|
-
t.
|
|
181
|
-
t.
|
|
177
|
+
t.integer "github_id", limit: 8
|
|
178
|
+
t.integer "head_id"
|
|
182
179
|
t.datetime "merge_requested_at", null: false
|
|
183
180
|
t.integer "merge_requested_by_id"
|
|
184
|
-
t.
|
|
185
|
-
t.
|
|
186
|
-
t.string "branch"
|
|
187
|
-
t.datetime "revalidated_at"
|
|
181
|
+
t.string "merge_status", limit: 30, null: false
|
|
182
|
+
t.boolean "mergeable"
|
|
188
183
|
t.datetime "merged_at"
|
|
189
|
-
t.
|
|
190
|
-
t.
|
|
184
|
+
t.integer "number", null: false
|
|
185
|
+
t.string "rejection_reason"
|
|
186
|
+
t.datetime "revalidated_at"
|
|
187
|
+
t.integer "stack_id", null: false
|
|
188
|
+
t.string "state"
|
|
189
|
+
t.string "title", limit: 256
|
|
190
|
+
t.datetime "updated_at", null: false
|
|
191
191
|
t.index ["head_id"], name: "index_merge_requests_on_head_id"
|
|
192
192
|
t.index ["merge_requested_by_id"], name: "index_merge_requests_on_merge_requested_by_id"
|
|
193
193
|
t.index ["merge_status"], name: "index_merge_requests_on_merge_status"
|
|
@@ -198,9 +198,9 @@ ActiveRecord::Schema[7.2].define(version: 2025_02_07_203053) do
|
|
|
198
198
|
end
|
|
199
199
|
|
|
200
200
|
create_table "output_chunks", force: :cascade do |t|
|
|
201
|
+
t.datetime "created_at"
|
|
201
202
|
t.integer "task_id", limit: 4
|
|
202
203
|
t.text "text", limit: 16777215
|
|
203
|
-
t.datetime "created_at"
|
|
204
204
|
t.datetime "updated_at"
|
|
205
205
|
t.index ["task_id"], name: "index_output_chunks_on_task_id"
|
|
206
206
|
end
|
|
@@ -213,19 +213,19 @@ ActiveRecord::Schema[7.2].define(version: 2025_02_07_203053) do
|
|
|
213
213
|
end
|
|
214
214
|
|
|
215
215
|
create_table "pull_requests", force: :cascade do |t|
|
|
216
|
-
t.integer "stack_id", null: false
|
|
217
|
-
t.integer "number", null: false
|
|
218
|
-
t.string "title", limit: 256
|
|
219
|
-
t.integer "github_id", limit: 8
|
|
220
|
-
t.string "api_url", limit: 1024
|
|
221
|
-
t.string "state"
|
|
222
216
|
t.integer "additions", default: 0, null: false
|
|
217
|
+
t.string "api_url", limit: 1024
|
|
218
|
+
t.datetime "created_at", null: false
|
|
223
219
|
t.integer "deletions", default: 0, null: false
|
|
224
|
-
t.integer "
|
|
225
|
-
t.text "labels"
|
|
220
|
+
t.integer "github_id", limit: 8
|
|
226
221
|
t.integer "head_id"
|
|
227
|
-
t.
|
|
228
|
-
t.
|
|
222
|
+
t.text "labels"
|
|
223
|
+
t.integer "number", null: false
|
|
224
|
+
t.integer "stack_id", null: false
|
|
225
|
+
t.string "state"
|
|
226
|
+
t.string "title", limit: 256
|
|
227
|
+
t.datetime "updated_at", null: false
|
|
228
|
+
t.integer "user_id"
|
|
229
229
|
t.index ["head_id"], name: "index_pull_requests_on_head_id"
|
|
230
230
|
t.index ["stack_id", "github_id"], name: "index_pull_requests_on_stack_id_and_github_id", unique: true
|
|
231
231
|
t.index ["stack_id", "number"], name: "index_pull_requests_on_stack_id_and_number", unique: true
|
|
@@ -233,55 +233,55 @@ ActiveRecord::Schema[7.2].define(version: 2025_02_07_203053) do
|
|
|
233
233
|
end
|
|
234
234
|
|
|
235
235
|
create_table "release_statuses", force: :cascade do |t|
|
|
236
|
-
t.integer "stack_id", null: false
|
|
237
236
|
t.integer "commit_id", null: false
|
|
238
|
-
t.
|
|
239
|
-
t.string "state", limit: 10, null: false
|
|
237
|
+
t.datetime "created_at", null: false
|
|
240
238
|
t.string "description", limit: 1024
|
|
241
|
-
t.string "target_url", limit: 1024
|
|
242
239
|
t.bigint "github_id"
|
|
243
|
-
t.
|
|
240
|
+
t.integer "stack_id", null: false
|
|
241
|
+
t.string "state", limit: 10, null: false
|
|
242
|
+
t.string "target_url", limit: 1024
|
|
244
243
|
t.datetime "updated_at", null: false
|
|
244
|
+
t.integer "user_id"
|
|
245
245
|
t.index ["commit_id", "github_id"], name: "index_deploy_statuses_on_commit_id_and_github_id"
|
|
246
246
|
t.index ["stack_id", "commit_id"], name: "index_deploy_statuses_on_stack_id_and_commit_id"
|
|
247
247
|
t.index ["user_id"], name: "index_deploy_statuses_on_user_id"
|
|
248
248
|
end
|
|
249
249
|
|
|
250
250
|
create_table "repositories", force: :cascade do |t|
|
|
251
|
-
t.
|
|
251
|
+
t.datetime "created_at", null: false
|
|
252
252
|
t.string "name", limit: 100, null: false
|
|
253
|
-
t.
|
|
254
|
-
t.datetime "updated_at", precision: 6, null: false
|
|
255
|
-
t.boolean "review_stacks_enabled", default: false
|
|
253
|
+
t.string "owner", limit: 39, null: false
|
|
256
254
|
t.string "provisioning_behavior", default: "allow_all"
|
|
257
255
|
t.string "provisioning_label_name"
|
|
256
|
+
t.boolean "review_stacks_enabled", default: false
|
|
257
|
+
t.datetime "updated_at", null: false
|
|
258
258
|
t.index ["owner", "name"], name: "repository_unicity", unique: true
|
|
259
259
|
end
|
|
260
260
|
|
|
261
261
|
create_table "stacks", force: :cascade do |t|
|
|
262
|
-
t.
|
|
263
|
-
t.
|
|
264
|
-
t.datetime "updated_at"
|
|
262
|
+
t.datetime "archived_since"
|
|
263
|
+
t.boolean "awaiting_provision", default: false, null: false
|
|
265
264
|
t.string "branch", limit: 255, null: false
|
|
266
|
-
t.string "deploy_url", limit: 255
|
|
267
|
-
t.string "lock_reason", limit: 4096
|
|
268
|
-
t.integer "tasks_count", limit: 4, default: 0, null: false
|
|
269
|
-
t.boolean "continuous_deployment", default: false, null: false
|
|
270
|
-
t.integer "undeployed_commits_count", limit: 4, default: 0, null: false
|
|
271
265
|
t.text "cached_deploy_spec", limit: 65535
|
|
272
|
-
t.
|
|
266
|
+
t.datetime "continuous_delivery_delayed_since"
|
|
267
|
+
t.boolean "continuous_deployment", default: false, null: false
|
|
268
|
+
t.datetime "created_at"
|
|
269
|
+
t.string "deploy_url", limit: 255
|
|
270
|
+
t.string "environment", limit: 50, default: "production", null: false
|
|
271
|
+
t.integer "estimated_deploy_duration", default: 1, null: false
|
|
273
272
|
t.boolean "ignore_ci"
|
|
274
273
|
t.datetime "inaccessible_since"
|
|
275
|
-
t.
|
|
276
|
-
t.
|
|
274
|
+
t.datetime "last_deployed_at"
|
|
275
|
+
t.integer "lock_author_id", limit: 4
|
|
276
|
+
t.string "lock_reason", limit: 4096
|
|
277
277
|
t.datetime "locked_since"
|
|
278
278
|
t.boolean "merge_queue_enabled", default: false, null: false
|
|
279
|
-
t.datetime "last_deployed_at"
|
|
280
|
-
t.integer "repository_id", null: false
|
|
281
|
-
t.datetime "archived_since"
|
|
282
279
|
t.string "provision_status", default: "deprovisioned", null: false
|
|
280
|
+
t.integer "repository_id", null: false
|
|
281
|
+
t.integer "tasks_count", limit: 4, default: 0, null: false
|
|
283
282
|
t.string "type", default: "Shipit::Stack"
|
|
284
|
-
t.
|
|
283
|
+
t.integer "undeployed_commits_count", limit: 4, default: 0, null: false
|
|
284
|
+
t.datetime "updated_at"
|
|
285
285
|
t.index ["archived_since"], name: "index_stacks_on_archived_since"
|
|
286
286
|
t.index ["awaiting_provision"], name: "index_stacks_on_awaiting_provision"
|
|
287
287
|
t.index ["provision_status"], name: "index_stacks_on_provision_status"
|
|
@@ -291,43 +291,43 @@ ActiveRecord::Schema[7.2].define(version: 2025_02_07_203053) do
|
|
|
291
291
|
end
|
|
292
292
|
|
|
293
293
|
create_table "statuses", force: :cascade do |t|
|
|
294
|
-
t.string "state", limit: 255
|
|
295
|
-
t.string "target_url", limit: 255
|
|
296
|
-
t.text "description", limit: 65535
|
|
297
|
-
t.string "context", limit: 255, default: "default", null: false
|
|
298
294
|
t.integer "commit_id", limit: 4
|
|
295
|
+
t.string "context", limit: 255, default: "default", null: false
|
|
299
296
|
t.datetime "created_at"
|
|
300
|
-
t.
|
|
297
|
+
t.text "description", limit: 65535
|
|
301
298
|
t.integer "stack_id", null: false
|
|
299
|
+
t.string "state", limit: 255
|
|
300
|
+
t.string "target_url", limit: 255
|
|
301
|
+
t.datetime "updated_at"
|
|
302
302
|
t.index ["commit_id"], name: "index_statuses_on_commit_id"
|
|
303
303
|
end
|
|
304
304
|
|
|
305
305
|
create_table "tasks", force: :cascade do |t|
|
|
306
|
-
t.integer "
|
|
307
|
-
t.integer "since_commit_id", limit: 4
|
|
308
|
-
t.integer "until_commit_id", limit: 4
|
|
309
|
-
t.string "status", limit: 10, default: "pending", null: false
|
|
310
|
-
t.datetime "created_at"
|
|
311
|
-
t.datetime "updated_at"
|
|
312
|
-
t.integer "user_id", limit: 4
|
|
313
|
-
t.boolean "rolled_up", default: false, null: false
|
|
314
|
-
t.string "type", limit: 20
|
|
315
|
-
t.integer "parent_id", limit: 4
|
|
306
|
+
t.integer "aborted_by_id"
|
|
316
307
|
t.integer "additions", limit: 4, default: 0
|
|
317
|
-
t.integer "deletions", limit: 4, default: 0
|
|
318
|
-
t.text "definition", limit: 65535
|
|
319
|
-
t.binary "gzip_output"
|
|
320
|
-
t.boolean "rollback_once_aborted", default: false, null: false
|
|
321
|
-
t.text "env"
|
|
322
|
-
t.integer "confirmations", default: 0, null: false
|
|
323
308
|
t.boolean "allow_concurrency", default: false, null: false
|
|
324
|
-
t.
|
|
309
|
+
t.integer "confirmations", default: 0, null: false
|
|
310
|
+
t.datetime "created_at"
|
|
311
|
+
t.text "definition", limit: 65535
|
|
312
|
+
t.integer "deletions", limit: 4, default: 0
|
|
325
313
|
t.datetime "ended_at"
|
|
314
|
+
t.text "env"
|
|
315
|
+
t.binary "gzip_output"
|
|
326
316
|
t.boolean "ignored_safeties", default: false, null: false
|
|
327
|
-
t.integer "aborted_by_id"
|
|
328
|
-
t.integer "rollback_once_aborted_to_id"
|
|
329
|
-
t.integer "retry_attempt", default: 0, null: false
|
|
330
317
|
t.integer "max_retries"
|
|
318
|
+
t.integer "parent_id", limit: 4
|
|
319
|
+
t.integer "retry_attempt", default: 0, null: false
|
|
320
|
+
t.boolean "rollback_once_aborted", default: false, null: false
|
|
321
|
+
t.integer "rollback_once_aborted_to_id"
|
|
322
|
+
t.boolean "rolled_up", default: false, null: false
|
|
323
|
+
t.integer "since_commit_id", limit: 4
|
|
324
|
+
t.integer "stack_id", limit: 4, null: false
|
|
325
|
+
t.datetime "started_at"
|
|
326
|
+
t.string "status", limit: 10, default: "pending", null: false
|
|
327
|
+
t.string "type", limit: 20
|
|
328
|
+
t.integer "until_commit_id", limit: 4
|
|
329
|
+
t.datetime "updated_at"
|
|
330
|
+
t.integer "user_id", limit: 4
|
|
331
331
|
t.index ["rolled_up", "created_at", "status"], name: "index_tasks_on_rolled_up_and_created_at_and_status"
|
|
332
332
|
t.index ["since_commit_id"], name: "index_tasks_on_since_commit_id"
|
|
333
333
|
t.index ["stack_id", "allow_concurrency", "status"], name: "index_active_tasks"
|
|
@@ -340,30 +340,29 @@ ActiveRecord::Schema[7.2].define(version: 2025_02_07_203053) do
|
|
|
340
340
|
end
|
|
341
341
|
|
|
342
342
|
create_table "teams", force: :cascade do |t|
|
|
343
|
-
t.bigint "github_id"
|
|
344
343
|
t.string "api_url", limit: 255
|
|
345
|
-
t.
|
|
344
|
+
t.datetime "created_at", null: false
|
|
345
|
+
t.bigint "github_id"
|
|
346
346
|
t.string "name", limit: 255
|
|
347
347
|
t.string "organization", limit: 39
|
|
348
|
-
t.
|
|
348
|
+
t.string "slug", limit: 255
|
|
349
349
|
t.datetime "updated_at", null: false
|
|
350
350
|
t.index ["organization", "slug"], name: "index_teams_on_organization_and_slug", unique: true
|
|
351
351
|
end
|
|
352
352
|
|
|
353
353
|
create_table "users", force: :cascade do |t|
|
|
354
|
-
t.bigint "github_id"
|
|
355
|
-
t.string "name", limit: 255, null: false
|
|
356
|
-
t.string "email", limit: 255
|
|
357
|
-
t.string "login", limit: 39
|
|
358
354
|
t.string "api_url", limit: 255
|
|
359
|
-
t.datetime "created_at"
|
|
360
|
-
t.datetime "updated_at"
|
|
361
355
|
t.string "avatar_url", limit: 255
|
|
356
|
+
t.datetime "created_at"
|
|
357
|
+
t.string "email", limit: 255
|
|
362
358
|
t.string "encrypted_github_access_token"
|
|
363
359
|
t.string "encrypted_github_access_token_iv"
|
|
360
|
+
t.bigint "github_id"
|
|
361
|
+
t.string "login", limit: 39
|
|
362
|
+
t.string "name", limit: 255, null: false
|
|
363
|
+
t.datetime "updated_at"
|
|
364
364
|
t.index ["github_id"], name: "index_users_on_github_id"
|
|
365
365
|
t.index ["login"], name: "index_users_on_login"
|
|
366
366
|
t.index ["updated_at"], name: "index_users_on_updated_at"
|
|
367
367
|
end
|
|
368
|
-
|
|
369
368
|
end
|
|
@@ -119,6 +119,14 @@ module Shipit
|
|
|
119
119
|
assert_equal true, @stack.reload.inaccessible_since?
|
|
120
120
|
end
|
|
121
121
|
|
|
122
|
+
test "if the GitHub organization is unknown, the stack is marked as inaccessible and a warning is logged" do
|
|
123
|
+
@job.expects(:fetch_missing_commits).raises(Shipit::GithubOrganizationUnknown.new("shopify-playgrounds"))
|
|
124
|
+
Rails.logger.expects(:warn).with("GithubSyncJob: unknown GitHub organization shopify-playgrounds for stack #{@stack.id}")
|
|
125
|
+
@job.perform(stack_id: @stack.id)
|
|
126
|
+
|
|
127
|
+
assert_equal true, @stack.reload.inaccessible_since?
|
|
128
|
+
end
|
|
129
|
+
|
|
122
130
|
test "#perform retries when expected_head_sha is not found in the github response" do
|
|
123
131
|
expected_sha = "abcd1234"
|
|
124
132
|
Stack.any_instance.expects(:github_commits).returns(@github_commits)
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: shipit-engine
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.44.
|
|
4
|
+
version: 0.44.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jean Boussier
|
|
@@ -209,16 +209,16 @@ dependencies:
|
|
|
209
209
|
name: rails
|
|
210
210
|
requirement: !ruby/object:Gem::Requirement
|
|
211
211
|
requirements:
|
|
212
|
-
- - "
|
|
212
|
+
- - ">="
|
|
213
213
|
- !ruby/object:Gem::Version
|
|
214
|
-
version: 8.
|
|
214
|
+
version: 8.1.1
|
|
215
215
|
type: :runtime
|
|
216
216
|
prerelease: false
|
|
217
217
|
version_requirements: !ruby/object:Gem::Requirement
|
|
218
218
|
requirements:
|
|
219
|
-
- - "
|
|
219
|
+
- - ">="
|
|
220
220
|
- !ruby/object:Gem::Version
|
|
221
|
-
version: 8.
|
|
221
|
+
version: 8.1.1
|
|
222
222
|
- !ruby/object:Gem::Dependency
|
|
223
223
|
name: rails_autolink
|
|
224
224
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -1051,7 +1051,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
1051
1051
|
- !ruby/object:Gem::Version
|
|
1052
1052
|
version: '0'
|
|
1053
1053
|
requirements: []
|
|
1054
|
-
rubygems_version: 4.0.
|
|
1054
|
+
rubygems_version: 4.0.8
|
|
1055
1055
|
specification_version: 4
|
|
1056
1056
|
summary: Application deployment software
|
|
1057
1057
|
test_files:
|