groundskeeper-bitcore 0.32.0 → 0.34.0
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/.gitignore +1 -0
- data/README.md +9 -4
- data/config/predeploy.rb +0 -22
- data/lib/groundskeeper/commands.rb +4 -3
- data/lib/groundskeeper/jira.rb +6 -5
- data/lib/groundskeeper/project.rb +0 -21
- data/lib/groundskeeper/version.rb +1 -1
- metadata +2 -4
- data/config/vhost_config.conf.erb +0 -49
- data/config/vhost_config_nginx.conf.erb +0 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c85ed53bac61c994b0e4e1ee83781a57ca26046128412199c0824fd93a95774
|
4
|
+
data.tar.gz: 3a61a6eccc60d1b40a3508b28d10cc888dde680b35e59f074f221d7f53d31aae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d980eba26b5dc7fd0376aa291074de4196ae75576a3460019774d6711672797541abf1d0e0943fc869bc80720c7561bbdb2c8c6ae4baac83a36d76344500b9f
|
7
|
+
data.tar.gz: df07fc3671092395b4797d9a6cd3d4facaa438108841b162e773f693a01dea69bb324c183cd0ddb03d10c80ed0ae24e16ab4f7bb637babe325ac2c6eb26ae08a
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -90,10 +90,15 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
|
90
90
|
`rake test` to run the tests. You can also run `bin/console` for an interactive
|
91
91
|
prompt that will allow you to experiment.
|
92
92
|
|
93
|
-
To install this gem onto your local machine, run `bundle exec rake install`.
|
94
|
-
|
95
|
-
|
96
|
-
|
93
|
+
To install this gem onto your local machine, run `bundle exec rake install`.
|
94
|
+
|
95
|
+
To release a new version, update the version number in `version.rb`, and then run
|
96
|
+
`bundle exec rake release`. You will then need to create a version branch `release/x.x.x` and push to version control.
|
97
|
+
After merge checks pass merge the branch and pull changes into local master branch. Create and push the new tag
|
98
|
+
`git tag x.x.x` and `git push origin master --tags`. Then if you have permissions,
|
99
|
+
push the `.gem` file to [rubygems.org](https://rubygems.org) with
|
100
|
+
`gem push <name of .gem file that is generated`. The file will
|
101
|
+
typically be in the format `groundskeeper-bitcore-x.x.x.gem`.
|
97
102
|
|
98
103
|
## Contributing
|
99
104
|
|
data/config/predeploy.rb
CHANGED
@@ -109,28 +109,7 @@ namespace :deploy_configure do
|
|
109
109
|
end
|
110
110
|
# rubocop:enable Metrics/BlockLength
|
111
111
|
|
112
|
-
# rubocop:disable Metrics/BlockLength
|
113
112
|
namespace :deploy_prepare do
|
114
|
-
desc "Write the virtual host config file. May require an Apache restart."
|
115
|
-
task :create_vhost do
|
116
|
-
load_project
|
117
|
-
vhost_file = vhost_config_file
|
118
|
-
vhost_config = load_template("vhost_config.conf.erb")
|
119
|
-
|
120
|
-
if fetch(:nginx)
|
121
|
-
vhost_file = vhost_nginx_config_file
|
122
|
-
vhost_config = load_template("vhost_config_nginx.conf.erb")
|
123
|
-
command "sudo chown -R deploy:nginx /etc/nginx/sites-available"
|
124
|
-
command "sudo chown -R deploy:nginx /etc/nginx/sites-enabled"
|
125
|
-
end
|
126
|
-
|
127
|
-
if !(File.exist? vhost_file) || FORCE_OVERWRITE
|
128
|
-
comment "Writing virtual host config to #{vhost_file}"
|
129
|
-
command "echo \"#{vhost_config}\" > #{vhost_file}"
|
130
|
-
command "ln -s #{vhost_file} #{vhost_nginx_linked_file}" if fetch(:nginx)
|
131
|
-
end
|
132
|
-
end
|
133
|
-
|
134
113
|
desc "Configure Postgres."
|
135
114
|
task :configure_pg do
|
136
115
|
comment "Configuring Postgres with config #{PG_CONFIG}"
|
@@ -144,4 +123,3 @@ namespace :deploy_prepare do
|
|
144
123
|
command "sudo chgrp -R #{owner} #{fetch :deploy_to}"
|
145
124
|
end
|
146
125
|
end
|
147
|
-
# rubocop:enable Metrics/BlockLength
|
@@ -432,10 +432,11 @@ module Groundskeeper
|
|
432
432
|
version_int = version.minor.to_i
|
433
433
|
current_version_int = current_version.minor.to_i
|
434
434
|
deployed_issues = []
|
435
|
-
((current_version_int
|
436
|
-
version_name = "
|
437
|
-
deployed_issues.append(jira.fetch_issues_by_fix_version(version_name))
|
435
|
+
((current_version_int)..version_int).each do |version_to_deploy|
|
436
|
+
version_name = "0.#{version_to_deploy}.0"
|
437
|
+
deployed_issues.append(jira.fetch_issues_by_fix_version(project: project, version: version_name))
|
438
438
|
end
|
439
|
+
deployed_issues.uniq!
|
439
440
|
|
440
441
|
action = if self.class.stage == PRODUCTION
|
441
442
|
Jira::DEPLOY_TO_PRODUCTION
|
data/lib/groundskeeper/jira.rb
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
require "cgi"
|
4
4
|
require "date"
|
5
5
|
require "jira-ruby"
|
6
|
+
require "active_support/core_ext/object"
|
6
7
|
|
7
8
|
class IssueNotFoundError < StandardError; end
|
8
9
|
|
@@ -67,9 +68,9 @@ module Groundskeeper
|
|
67
68
|
# :nocov:
|
68
69
|
|
69
70
|
# :nocov:
|
70
|
-
def fetch_issues_by_fix_version(version:)
|
71
|
+
def fetch_issues_by_fix_version(project:, version:)
|
71
72
|
search_path = "/rest/api/2/search"
|
72
|
-
query = "fixVersion=\"#{version}\""
|
73
|
+
query = "fixVersion=\"#{project.repo_name} #{version}\""
|
73
74
|
request_url = "#{search_path}?fields=key&jql=#{CGI.escape(query)}"
|
74
75
|
response = client.get(request_url).body
|
75
76
|
|
@@ -140,15 +141,15 @@ module Groundskeeper
|
|
140
141
|
def transition_remote_issues(transition_type, issue_ids)
|
141
142
|
issue_ids.each do |issue_id|
|
142
143
|
client.transition_issue(
|
143
|
-
issue_id: issue_id,
|
144
|
+
issue_id: issue_id[0],
|
144
145
|
transition_id: TRANSITION_IDS[transition_type]
|
145
146
|
)
|
146
147
|
end
|
147
148
|
end
|
148
149
|
|
149
150
|
# :nocov:
|
150
|
-
def fetch_issues_by_fix_version(version)
|
151
|
-
client.fetch_issues_by_fix_version(version: version)
|
151
|
+
def fetch_issues_by_fix_version(project:, version:)
|
152
|
+
client.fetch_issues_by_fix_version(project: project, version: version)
|
152
153
|
end
|
153
154
|
# :nocov:
|
154
155
|
|
@@ -17,9 +17,6 @@ module Groundskeeper
|
|
17
17
|
SENTRY_DSN_KEY = "sentry_dsn"
|
18
18
|
SENTRY_PROJECT_KEY = "sentry_project"
|
19
19
|
SMTP_DOMAIN = "smtp_domain"
|
20
|
-
SSL_CERTIFICATE_FILE_KEY = "SSLCertificateFile"
|
21
|
-
SSL_CERTIFICATE_CHAIN_FILE_KEY = "SSLCertificateChainFile"
|
22
|
-
SSL_CERTIFICATE_KEY_FILE_KEY = "SSLCertificateKeyFile"
|
23
20
|
WHENEVER_KEY = "uses_whenever"
|
24
21
|
|
25
22
|
def self.build(repository_name)
|
@@ -81,24 +78,6 @@ module Groundskeeper
|
|
81
78
|
details[SENTRY_PROJECT_KEY] || ""
|
82
79
|
end
|
83
80
|
|
84
|
-
# :nocov:
|
85
|
-
def ssl_certificate_file(stage)
|
86
|
-
details.dig(SSL_CERTIFICATE_FILE_KEY, stage.to_s) || ""
|
87
|
-
end
|
88
|
-
# :nocov:
|
89
|
-
|
90
|
-
# :nocov:
|
91
|
-
def ssl_certificate_chain_file(stage)
|
92
|
-
details.dig(SSL_CERTIFICATE_CHAIN_FILE_KEY, stage.to_s) || ""
|
93
|
-
end
|
94
|
-
# :nocov:
|
95
|
-
|
96
|
-
# :nocov:
|
97
|
-
def ssl_certificate_key_file(stage)
|
98
|
-
details.dig(SSL_CERTIFICATE_KEY_FILE_KEY, stage.to_s) || ""
|
99
|
-
end
|
100
|
-
# :nocov:
|
101
|
-
|
102
81
|
# :nocov:
|
103
82
|
def uses_whenever?
|
104
83
|
details[WHENEVER_KEY] == true
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: groundskeeper-bitcore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.34.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- RADD
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jira-ruby
|
@@ -207,8 +207,6 @@ files:
|
|
207
207
|
- config/rails_config.rb.erb
|
208
208
|
- config/secrets_config.yml.erb
|
209
209
|
- config/tasks.rb
|
210
|
-
- config/vhost_config.conf.erb
|
211
|
-
- config/vhost_config_nginx.conf.erb
|
212
210
|
- groundskeeper.gemspec
|
213
211
|
- lib/groundskeeper.rb
|
214
212
|
- lib/groundskeeper/application.rb
|
@@ -1,49 +0,0 @@
|
|
1
|
-
<% project = fetch :project -%>
|
2
|
-
<VirtualHost *:80>
|
3
|
-
ServerName <%= fetch :domain %>
|
4
|
-
Redirect permanent / https://<%= fetch :domain -%>/
|
5
|
-
</VirtualHost>
|
6
|
-
|
7
|
-
<VirtualHost *:443>
|
8
|
-
PassengerFriendlyErrorPages off
|
9
|
-
PassengerAppEnv <%= fetch :stage %>
|
10
|
-
PassengerRuby /usr/local/rvm/wrappers/ruby-<%= fetch :rvm_ruby_version -%>/ruby
|
11
|
-
# Always have at least 1 process in existence for the application
|
12
|
-
PassengerMinInstances 1
|
13
|
-
|
14
|
-
ServerName <%= fetch :domain %>
|
15
|
-
|
16
|
-
SSLEngine On
|
17
|
-
SSLCertificateFile <%= project.ssl_certificate_file(fetch(:stage).to_sym) %>
|
18
|
-
SSLCertificateChainFile <%= project.ssl_certificate_chain_file(fetch(:stage).to_sym) %>
|
19
|
-
SSLCertificateKeyFile <%= project.ssl_certificate_key_file(fetch(:stage).to_sym) %>
|
20
|
-
|
21
|
-
DocumentRoot <%= fetch :deploy_to -%>/current/public
|
22
|
-
RailsBaseURI /
|
23
|
-
PassengerDebugLogFile /var/log/httpd/passenger.log
|
24
|
-
|
25
|
-
<Directory <%= fetch :deploy_to -%>/current/public >
|
26
|
-
Allow from all
|
27
|
-
Options -MultiViews
|
28
|
-
</Directory>
|
29
|
-
|
30
|
-
AddOutputFilterByType DEFLATE text/html text/css application/javascript
|
31
|
-
|
32
|
-
RewriteEngine On
|
33
|
-
|
34
|
-
# Show maintenance page if it exists
|
35
|
-
ErrorDocument 503 /system/maintenance.html
|
36
|
-
RewriteCond %{REQUEST_URI} !\.(css|gif|jpg|png)$
|
37
|
-
RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
|
38
|
-
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
|
39
|
-
RewriteRule ^.*$ - [redirect=503,last]
|
40
|
-
|
41
|
-
<Location /assets/>
|
42
|
-
# RFC says only cache for 1 year
|
43
|
-
ExpiresActive On
|
44
|
-
ExpiresDefault \"access plus 1 year\"
|
45
|
-
</Location>
|
46
|
-
</VirtualHost>
|
47
|
-
|
48
|
-
# Start the application before the first access
|
49
|
-
PassengerPreStart https://<%= fetch :domain -%>:443/
|
@@ -1,26 +0,0 @@
|
|
1
|
-
<% project = fetch :project -%>
|
2
|
-
server {
|
3
|
-
listen 80;
|
4
|
-
|
5
|
-
server_name <%= fetch :domain %>;
|
6
|
-
return 301 https://<%= fetch :domain -%>/;
|
7
|
-
}
|
8
|
-
|
9
|
-
server {
|
10
|
-
listen 443 ssl;
|
11
|
-
server_name <%= fetch :domain %>;
|
12
|
-
|
13
|
-
passenger_enabled on;
|
14
|
-
passenger_friendly_error_pages off;
|
15
|
-
passenger_app_env <%= fetch :stage %>;
|
16
|
-
passenger_ruby /usr/local/rvm/gems/ruby-<%= fetch :rvm_ruby_version -%>/wrappers/ruby;
|
17
|
-
passenger_min_instances 1;
|
18
|
-
passenger_base_uri /;
|
19
|
-
|
20
|
-
root <%= fetch :deploy_to -%>/current/public;
|
21
|
-
|
22
|
-
ssl_certificate <%= project.ssl_certificate_file(fetch(:stage).to_sym) %>;
|
23
|
-
ssl_certificate_key <%= project.ssl_certificate_key_file(fetch(:stage).to_sym) %>;
|
24
|
-
ssl_protocols TLSv1.2;
|
25
|
-
ssl_ciphers HIGH:!aNULL:!MD5;
|
26
|
-
}
|