groundskeeper-bitcore 0.31.0 → 0.33.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 +19 -12
- data/lib/groundskeeper/jira.rb +1 -0
- data/lib/groundskeeper/project.rb +0 -21
- data/lib/groundskeeper/semantic_version.rb +4 -0
- 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: 153df8ecf60a6641ad33e45fa3f3cb889a0ab59cdb7b52ce894b86df0713b645
|
4
|
+
data.tar.gz: d3223b8fd86b82f6288c73d1facce11d44d402dfe7cb17c2ec0e7dae26b5c9d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f6847e707ff46d4e4306bae339f01985e4b20a1575319ffd7a5a8f04ef3af145c14eb552db74191f48acc2e602c9634232ec77f276bc3a6c06dbb7176cef2d4
|
7
|
+
data.tar.gz: 977946f4b403c6319bb914d39aac9abf73bd66438ebc6a96c23b579148fc87bb547073c24f26ffc44266be460e4c265d18d2ce066a37111d328b7dde337c9de0
|
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
|
@@ -388,7 +388,7 @@ module Groundskeeper
|
|
388
388
|
end
|
389
389
|
end
|
390
390
|
|
391
|
-
# rubocop:disable Metrics/MethodLength
|
391
|
+
# rubocop:disable Metrics/MethodLength, Metrics/AbcSize
|
392
392
|
def update_deployed_issues
|
393
393
|
tries = 0
|
394
394
|
|
@@ -397,13 +397,14 @@ module Groundskeeper
|
|
397
397
|
)
|
398
398
|
|
399
399
|
begin
|
400
|
-
deployed_version = website.version
|
400
|
+
deployed_version = SemanticVersion.new(website.version)
|
401
|
+
current_version = SemanticVersion.new(version_file.current_version)
|
401
402
|
|
402
|
-
raise VersionError unless deployed_version == ENV[TAG]
|
403
|
+
raise VersionError unless deployed_version.version == ENV[TAG]
|
403
404
|
|
404
405
|
console.say("# deployment successful", :green)
|
405
|
-
transition_remote_issues
|
406
|
-
announce_in_slack deployed_version
|
406
|
+
transition_remote_issues(deployed_version, current_version)
|
407
|
+
announce_in_slack deployed_version.version
|
407
408
|
rescue VersionError
|
408
409
|
tries += 1
|
409
410
|
sleep 5
|
@@ -411,13 +412,13 @@ module Groundskeeper
|
|
411
412
|
# :nocov:
|
412
413
|
console.say(
|
413
414
|
"something went wrong: expected version #{ENV.fetch(TAG, nil)}, " \
|
414
|
-
"found version #{deployed_version} instead",
|
415
|
+
"found version #{deployed_version.version} instead",
|
415
416
|
:red
|
416
417
|
)
|
417
418
|
# :nocov:
|
418
419
|
end
|
419
420
|
end
|
420
|
-
# rubocop:enable Metrics/MethodLength
|
421
|
+
# rubocop:enable Metrics/MethodLength, Metrics/AbcSize
|
421
422
|
|
422
423
|
# :nocov:
|
423
424
|
def release_version
|
@@ -426,10 +427,16 @@ module Groundskeeper
|
|
426
427
|
end
|
427
428
|
# :nocov:
|
428
429
|
|
429
|
-
# rubocop:disable Metrics/MethodLength
|
430
|
-
def transition_remote_issues(version)
|
431
|
-
|
432
|
-
|
430
|
+
# rubocop:disable Metrics/MethodLength, Metrics/AbcSize
|
431
|
+
def transition_remote_issues(version, current_version)
|
432
|
+
version_int = version.minor.to_i
|
433
|
+
current_version_int = current_version.minor.to_i
|
434
|
+
deployed_issues = []
|
435
|
+
((current_version_int + 1)..version_int).each do |version_to_deploy|
|
436
|
+
version_name = "#{repository.name} 0.#{version_to_deploy}.0"
|
437
|
+
deployed_issues.append(jira.fetch_issues_by_fix_version(version_name))
|
438
|
+
end
|
439
|
+
|
433
440
|
action = if self.class.stage == PRODUCTION
|
434
441
|
Jira::DEPLOY_TO_PRODUCTION
|
435
442
|
else
|
@@ -441,7 +448,7 @@ module Groundskeeper
|
|
441
448
|
)
|
442
449
|
jira.transition_remote_issues(action, deployed_issues)
|
443
450
|
end
|
444
|
-
# rubocop:enable Metrics/MethodLength
|
451
|
+
# rubocop:enable Metrics/MethodLength, Metrics/AbcSize
|
445
452
|
|
446
453
|
def announce_in_slack(deployed_version)
|
447
454
|
slack.send_message(
|
data/lib/groundskeeper/jira.rb
CHANGED
@@ -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.33.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-08-12 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
|
-
}
|