stack_car 0.8.0 → 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +5 -5
  2. data/.gitlab-ci.yml +17 -12
  3. data/README.md +122 -1
  4. data/lib/stack_car/cli.rb +253 -41
  5. data/lib/stack_car/dot_rc.rb +25 -0
  6. data/lib/stack_car/version.rb +1 -1
  7. data/lib/stack_car.rb +1 -0
  8. data/stack_car.gemspec +2 -0
  9. data/templates/.dockerignore.erb +2 -2
  10. data/templates/.env.development.erb +2 -0
  11. data/templates/.env.erb +29 -16
  12. data/templates/.gitlab/issue_templates/Bug.md +46 -0
  13. data/templates/.gitlab/issue_templates/Feature.md +41 -0
  14. data/templates/.gitlab/issue_templates/Question.md +18 -0
  15. data/templates/.gitlab/merge_request_templates/Bug.md +36 -0
  16. data/templates/.gitlab/merge_request_templates/Feature.md +36 -0
  17. data/templates/.gitlab-ci.yml.erb +98 -65
  18. data/templates/.sops.yaml.erb +3 -0
  19. data/templates/Dockerfile.erb +26 -7
  20. data/templates/README.md +81 -7
  21. data/templates/chart/.gitignore +3 -0
  22. data/templates/chart/.helmignore +23 -0
  23. data/templates/chart/Chart.yaml.tt +30 -0
  24. data/templates/chart/README.md +223 -0
  25. data/templates/chart/bin/check_sidekiq.rb +0 -0
  26. data/templates/chart/bin/decrypt +17 -0
  27. data/templates/chart/bin/deploy +14 -0
  28. data/templates/chart/bin/encrypt +15 -0
  29. data/templates/chart/bin/remove +15 -0
  30. data/templates/chart/sample-values.yaml.tt +153 -0
  31. data/templates/chart/templates/_helpers.tpl.tt +85 -0
  32. data/templates/chart/templates/rails-env-cm.yaml.tt +47 -0
  33. data/templates/chart/templates/rails-env-secret.yaml +10 -0
  34. data/templates/chart/templates/rails-pvc-shared.yml +20 -0
  35. data/templates/chart/templates/setup-job.yaml +73 -0
  36. data/templates/chart/templates/web-deploy.yaml +67 -0
  37. data/templates/chart/templates/web-ing-wildcard.yaml +20 -0
  38. data/templates/chart/templates/web-ing.yaml +20 -0
  39. data/templates/chart/templates/web-svc.yaml +20 -0
  40. data/templates/chart-fcrepo/fcrepo-deploy.yaml +63 -0
  41. data/templates/chart-fcrepo/fcrepo-env-cm.yaml +8 -0
  42. data/templates/chart-fcrepo/fcrepo-env-secret.yaml.tt +10 -0
  43. data/templates/chart-fcrepo/fcrepo-pvc.yaml +20 -0
  44. data/templates/chart-fcrepo/fcrepo-svc.yaml +19 -0
  45. data/templates/chart-sidekiq/sidekiq-deploy.yaml +80 -0
  46. data/templates/database.yml.erb +10 -11
  47. data/templates/decrypt-secrets +22 -0
  48. data/templates/development.rb.erb +90 -0
  49. data/templates/docker-compose.yml.erb +52 -18
  50. data/templates/encrypt-secrets +19 -0
  51. data/templates/env.conf.erb +11 -11
  52. data/templates/nginx.sh.erb +17 -0
  53. data/templates/production.rb.erb +117 -0
  54. metadata +71 -12
  55. data/templates/Dockerfile.base.erb +0 -48
  56. data/templates/Dockerfile.builder.erb +0 -13
  57. data/templates/docker-compose.ci.yml.erb +0 -87
  58. data/templates/docker-compose.production.yml.erb +0 -26
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+ require 'pathname'
3
+ module StackCar
4
+ class DotRc
5
+ include Thor::Shell
6
+
7
+ def initialize
8
+ @file = find_file
9
+ say_status :load, 'not found', :red && return unless @file
10
+ say_status :load, @file
11
+ load(@file)
12
+ end
13
+
14
+ def find_file
15
+ path = nil
16
+ Pathname(Dir.pwd).ascend do |p|
17
+ if File.directory?(p) && File.exist?(File.join(p, '.stack_car_rc'))
18
+ path = File.join(p, '.stack_car_rc')
19
+ break
20
+ end
21
+ end
22
+ path
23
+ end
24
+ end
25
+ end
@@ -1,3 +1,3 @@
1
1
  module StackCar
2
- VERSION = "0.8.0"
2
+ VERSION = "0.14.0"
3
3
  end
data/lib/stack_car.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require "stack_car/version"
2
2
  require "stack_car/cli"
3
+ require "stack_car/dot_rc"
3
4
 
4
5
  module StackCar
5
6
  # Your code goes here...
data/stack_car.gemspec CHANGED
@@ -20,11 +20,13 @@ Gem::Specification.new do |spec|
20
20
  spec.require_paths = ["lib"]
21
21
 
22
22
  spec.add_development_dependency "bundler", "~> 1.13"
23
+ spec.add_development_dependency "byebug"
23
24
  spec.add_development_dependency "rake", "~> 10.0"
24
25
  spec.add_development_dependency "rspec", "~> 3.0"
25
26
  spec.add_development_dependency "yard"
26
27
  spec.add_development_dependency "yard-thor"
27
28
  spec.add_development_dependency "pry"
28
29
  spec.add_runtime_dependency "dotenv", "~> 2.2"
30
+ spec.add_runtime_dependency "json", "~> 2.3"
29
31
  spec.add_runtime_dependency "thor", "~> 0.19"
30
32
  end
@@ -2,9 +2,9 @@
2
2
  .convox
3
3
  .env
4
4
  .env.*
5
- node_modules
6
- .git
5
+ .ruby-*
7
6
  db/*.sqlite3
8
7
  db/*.sqlite3-journal
9
8
  log/*
9
+ node_modules
10
10
  tmp
@@ -1 +1,3 @@
1
1
  # Items in this file override those in .env and are good for developer system specific preferences
2
+ # if not using dory uncomment the next line
3
+ WEB_PORT=3000:80
data/templates/.env.erb CHANGED
@@ -1,18 +1,37 @@
1
+ APP_NAME=<%= @project_name %>
2
+ PASSENGER_APP_ENV=development
3
+ REGISTRY_HOST=registry.gitlab.com
4
+ REGISTRY_URI=/CHANGEME/<%= @project_name %>
5
+
6
+ # SMTP Mailer variables
7
+ # To enable mailer:
8
+ # - Uncomment and edit SMTP vars
9
+ # - Uncomment SMTP Mailer section in respective config/environments file
10
+ # SMTP_USER_NAME=CHANGEME
11
+ # SMTP_PASSWORD=CHANGEME
12
+ # SMTP_ADDRESS=CHANGEME
13
+ # SMTP_DOMAIN=CHANGEME
14
+ # SMTP_PORT=CHANGEME
15
+ # SMTP_TYPE=CHANGEME
16
+ <% if options[:hyku] %>
17
+ # SETTINGS__MULTITENANCY__ADMIN_HOST=CHANGEME
18
+ <% end %>
19
+ TAG=dev
1
20
  <% if options[:postgres] -%>
2
- POSTGRES_DB=<%= @project_name %>
3
- POSTGRES_USER=postgres
4
- POSTGRES_PASSWORD=DatabaseFTW
5
- POSTGRES_HOST=postgres
6
- DB_ADAPTER=postgresql
21
+ DATABASE_NAME=<%= @project_name %>
22
+ DATABASE_USER=postgres
23
+ DATABASE_PASSWORD=DatabaseFTW
24
+ DATABASE_HOST=postgres
25
+ DATABASE_ADAPTER=postgresql
7
26
  TEST_DB=<%= @project_name %>_test
8
27
  <% end -%>
9
28
  <% if options[:mysql] -%>
10
- MYSQL_DATABASE=<%= @project_name %>
11
- MYSQL_USER=root
12
- MYSQL_PASSWORD=DatabaseFTW
29
+ DATABASE_NAME=<%= @project_name %>
30
+ DATABASE_USER=<%= @project_name %>
31
+ DATABASE_PASSWORD=DatabaseFTW
13
32
  MYSQL_ROOT_PASSWORD=DatabaseFTW
14
- MYSQL_HOST=mysql
15
- DB_ADAPTER=mysql2
33
+ DATABASE_HOST=mysql
34
+ DATABASE_ADAPTER=mysql2
16
35
  TEST_DB=<%= @project_name %>_test
17
36
  <% end -%>
18
37
  <% if options[:elasticsearch] -%>
@@ -22,9 +41,3 @@ ES_URL=http://elasticsearch:9200
22
41
  SITE_URI=https://CHANGEME.com
23
42
  DEPLOY_HOOK=CHANGEME
24
43
  <% end -%>
25
- REGISTRY_HOST=registry.gitlab.com
26
- REGISTRY_URI=/CHANGEME/<%= @project_name %>
27
- TAG=dev
28
- VIRTUAL_PORT=80
29
- PASSENGER_APP_ENV=development
30
- DOCKER_PORT=3000:80
@@ -0,0 +1,46 @@
1
+ # Summary
2
+
3
+ A short description of the bug. Use # to link to the parent issue or merge request
4
+
5
+ # Observed Behavior
6
+
7
+ The current, bugged behavior.
8
+
9
+ # Expected Behavior
10
+
11
+ How it should behave once it's fixed. What "done" looks like.
12
+
13
+ # Screenshots or Video
14
+
15
+ Include screenshots or videos that demonstrate the bug
16
+
17
+ # Other Information
18
+
19
+ Any other logs, related issues, merge requests, wireframes, documentation, slack conversations or anything else that would help the developer try to find and fix this issue, or provide context.
20
+
21
+ # Acceptance Criteria
22
+
23
+ This is what done looks like. A higher level checklist of the goals and functionality after this bug is fixed
24
+
25
+ * [ ] I see these views
26
+ * [ ] When a user does this, that happens
27
+
28
+ # Steps to Reproduce / Testing Instructions
29
+
30
+ How did you trigger this bug? Include links to the page where the error occured, if applicable.
31
+
32
+ * [ ] As a (logged in/admin/etc) User
33
+ * [ ] With these other conditions
34
+ * [ ] I did these things
35
+ * [ ] And observed this behavior
36
+
37
+ ## Further information
38
+
39
+ Edit in any later issues or merge requests that are conencted to this issue, for future reference
40
+
41
+ ### Implementation suggestions
42
+
43
+ Are nice, but should probably go in a comment. e.g. gems, unrelated issues that dealt with similar problems, stack overflow links.
44
+
45
+ /label ~"Needs Rework", ~"Ready for Development"
46
+ <!-- By default, should bugs go to Ready for development, to be on the development board, or be like normal issues and go to the planning board> -->
@@ -0,0 +1,41 @@
1
+ # Summary
2
+
3
+ A short description of the feature
4
+
5
+ # User Stories
6
+
7
+ What problem is this feature going to solve?
8
+
9
+ # Screenshots or Video
10
+
11
+ Include any relevant media such as wireframes, screenshots, or videos
12
+
13
+ # Relationships
14
+
15
+ Are there any other issues or merge requests that are related to this feature (use # to generate a quick link). In particular, is this part of a larger epic, or does it depend on any other tickets being resolved first? Do you need anything else or are you making any other assumptions for this feature?
16
+
17
+ # Acceptance Criteria
18
+
19
+ This is what done looks like. A higher level checklist of the goals and functionality of this feature
20
+
21
+ * [ ] I see these views
22
+ * [ ] When a user does this, that happens
23
+
24
+ # Testing Instructions
25
+
26
+ Steps to demonstrate this feature is properly working. Include a video, if possible. The How to the Acceptance Criteria's What
27
+
28
+ * [ ] As a (user/admin)
29
+ * [ ] Go here and do these things
30
+ * [ ] To see this happen
31
+
32
+
33
+ ## Further information
34
+
35
+ Edit in any later issues or merge requests that are conencted to this issue, for future reference
36
+
37
+ ### Implimentation Suggestions
38
+
39
+ Any development details that would be helpful when working on this feature e.g. gems, unrelated issues that dealt with similar problems, stack overflow links.
40
+
41
+ /label ~Icebox
@@ -0,0 +1,18 @@
1
+ # Summary
2
+ A short description of the question.
3
+
4
+ ## Who has this information
5
+ Consider using @ to tag them, if they're in this repository
6
+
7
+ # Additional information
8
+ More details about what needs to be answered
9
+ * [ ] Checkboxes are helpful
10
+ * [ ] To make sure all answers are enumerated
11
+
12
+ # Other links
13
+ Pictures, videos, links to issues, or anything else that might be helpful to provide context for the question
14
+
15
+ /label ~"Planning in Progress"
16
+
17
+ /assign me
18
+ <!-- this might cause inboxes to explode, but presumably the one creating a question ticket would be the one who was taking ownership for it, and would be the one responsible for cleaning it up once the question was answered -->
@@ -0,0 +1,36 @@
1
+ # Summary
2
+ A short description of the bug
3
+
4
+ # Related Issue
5
+ Use # to add a quick link to the parent issue(s), or ! for parent merge requests. Also, go to the issue and edit it to mention this MR.
6
+
7
+ # Expected Behavior
8
+
9
+ Demo how this merge request is working in the app. Consult the steps for reproducing the bug in the issue.
10
+
11
+ # Screenshots / Video
12
+ Include screenshots or video demonstrating how this bug fix works
13
+
14
+ # Dependencies
15
+
16
+ Are there any other outstanding issues which need to be resolved before this can be merged?
17
+
18
+ # Special Attention / Side Effects
19
+
20
+ Is there anything you would like to have special scrutiny given to during code review? Will the changes in this merge request potentially impact any thing else that isn't explicitly part of this bug fix?
21
+
22
+ # Testing / Reproduction instructions
23
+
24
+ Step by step instructions on how to test this bug fix. Include links and username/passswords if necessary. Videos are especially helpful. Also, name any spec files that should be run for this bug fix, or to test any side effects from this bug fix.
25
+
26
+ 1. Go here
27
+ 2. Do this
28
+ 3. Observe this behavior
29
+
30
+ # Deployment
31
+
32
+ Where is this deployed? Are there any additional steps to get this working on staging/production? (e.g. setting up enviromental variables)
33
+
34
+ # Other Information
35
+
36
+ Any other logs, related issues, merge requests, wireframes, documentation, slack conversations or anything else that would help the developer try to find and fix this issue, or provide context.
@@ -0,0 +1,36 @@
1
+ # Summary
2
+ A short description of the feature
3
+
4
+ # Related Issue
5
+ Use # to add a quick link to the parent issue(s), or ! for parent merge requests. Also, go to that issue and edit the description to mention this MR.
6
+
7
+ # Expected Behavior
8
+
9
+ Demo how this merge request is working in the app. Consult the acceptance criteria in the issue.
10
+
11
+ # Screenshots / Video
12
+ Include screenshots or video demonstrating how this feature works
13
+
14
+ # Dependencies
15
+
16
+ Are there any other outstanding issues which need to be resolved before this can be merged?
17
+
18
+ # Special Attention / Side Effects
19
+
20
+ Is there anything you would like to have special scrutiny given to during code review? Will the changes in this merge request potentially impact any thing else that isn't explicitly part of this feature?
21
+
22
+ # Testing / Reproduction instructions
23
+
24
+ Step by step instructions on how to test this feature. Include links and username/passswords if necessary. Videos are especially helpful. Also, name any spec files that should be run for this feature, or to test any side effects from this feature.
25
+
26
+ 1. Go here
27
+ 2. Do this
28
+ 3. Observe this behavior
29
+
30
+ # Deployment
31
+
32
+ Where is this deployed? Are there any additional steps to get this working on staging/production? (e.g. setting up enviromental variables)
33
+
34
+ # Other Information
35
+
36
+ Any other logs, related issues, merge requests, wireframes, documentation, slack conversations or anything else that would help the developer try to find and fix this issue, or provide context.
@@ -1,71 +1,97 @@
1
- image: $CI_REGISTRY_IMAGE/builder:latest
2
- services:
3
- - docker:dind
4
- <% if options[:postgres] -%>
5
- - postgres:latest
6
- <% end -%>
7
- <% if options[:mysql] -%>
8
- - mysql:latest
9
- <% end -%>
10
- <% if options[:solr] -%>
11
- - solr:latest
12
- <% end -%>
13
- <% if options[:elasticsearch] -%>
14
- - elasticsearch:latest
15
- <% end -%>
16
- <% if options[:redis] -%>
17
- - redis:latest
18
- <% end -%>
19
-
20
1
  stages:
21
- - build
22
- - test
23
- - review
24
- - staging
25
- - production
26
-
27
- variables:
28
- <% if options[:postgres] -%>
29
- POSTGRES_DB: <%= @project_name %>
30
- POSTGRES_USER: postgres
31
- POSTGRES_PASSWORD: password
32
- POSTGRES_HOST: postgres
33
- <% end -%>
34
- <% if options[:mysql] -%>
35
- MYSQL_DATABASE: <%= @project_name %>
36
- MYSQL_ROOT_PASSWORD: password
37
- MYSQL_USER: <%= @project_name %>_test
38
- MYSQL_PASSWORD: password
39
- MYSQL_HOST: mysql
40
- <% end -%>
41
- TEST_DB: <%= @project_name %>
42
- DOCKER_DRIVER: overlay
43
- REGISTRY_HOST: registry.gitlab.com
44
- REGISTRY_URI: TODO/<%= @project_name %>
45
- SITE_URI_BASE: TODO
46
-
2
+ - build
3
+ - lint
4
+ - test
5
+ - deploy
47
6
 
48
7
  before_script:
49
- - export REGISTRY_FULL=registry.gitlab.com/notch8/ror-site/$CI_COMMIT_REF_SLUG:${CI_COMMIT_SHA:0:8}
50
- - export TAG=$CI_COMMIT_REF_SLUG
51
- - eval $(ssh-agent -s)
52
- - bash
53
- - ssh-add <(echo "$SSH_PRIVATE_KEY")
54
- - mkdir -p ~/.ssh
55
- - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
8
+ - export TAG=${CI_COMMIT_SHORT_SHA}
9
+ - export BRANCH=${CI_COMMIT_REF_NAME}
10
+ - export REGISTRY_HOST=${CI_REGISTRY}
11
+ - export REGISTRY_URI="/${CI_PROJECT_PATH}"
12
+
13
+ base:
14
+ stage: build
15
+ script:
16
+ - docker login -u "gitlab-ci-token" -p "$CI_JOB_TOKEN" $CI_REGISTRY
17
+ - sc build -s base
18
+ - sc push -s base
19
+ when: manual
20
+ tags:
21
+ - local
56
22
 
57
23
  build:
58
24
  stage: build
59
25
  script:
60
- - docker login -u "gitlab-ci-token" -p "$CI_BUILD_TOKEN" $CI_REGISTRY
26
+ - docker login -u "gitlab-ci-token" -p "$CI_JOB_TOKEN" $CI_REGISTRY
61
27
  - sc build
62
28
  - sc push
29
+ - docker tag $CI_REGISTRY_IMAGE:$TAG $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
30
+ - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
31
+ tags:
32
+ - local
33
+
34
+ lint:
35
+ stage: go
36
+ image: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA
37
+ variables:
38
+ PRONTO_GITLAB_API_ENDPOINT: "https://gitlab.com/api/v4"
39
+ before_script:
40
+ - export PRONTO_GITLAB_API_PRIVATE_TOKEN=$GITLAB_API_TOKEN
41
+ script:
42
+ - cd /home/app/webapp && bundle exec pronto run -f gitlab
63
43
  tags:
64
44
  - docker
65
45
 
66
46
  test:
67
47
  stage: test
68
- image: $CI_REGISTRY_IMAGE:$CI_PROJECT_NAME-$CI_BUILD_REF_SLUG
48
+ image: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA
49
+ services:
50
+ <% if options[:postgres] -%>
51
+ - name: postgres:11.1
52
+ <% end -%>
53
+ <% if options[:mysql] -%>
54
+ - mysql:5.7
55
+ <% end -%>
56
+ <% if options[:solr] -%>
57
+ - name: solr:latest
58
+ entrypoint: ["docker-entrypoint.sh", "solr-precreate", "test"]
59
+ <% end -%>
60
+ <% if options[:elasticsearch] -%>
61
+ - elasticsearch:latest
62
+ <% end -%>
63
+ <% if options[:redis] -%>
64
+ - redis:latest
65
+ <% end -%>
66
+ <% if options[:fcrepo] -%>
67
+ - name: botimer/fcrepo:4.5.1
68
+ <% end %>
69
+ variables:
70
+ <% if options[:postgres] -%>
71
+ POSTGRES_DB: <%= @project_name %>
72
+ POSTGRES_USER: postgres
73
+ POSTGRES_PASSWORD: password
74
+ POSTGRES_HOST: postgres
75
+ DATABASE_ADAPTER: postgresql
76
+ DATABASE_HOST: postgres
77
+ DATABASE_NAME: <%= @project_name %>
78
+ DATABASE_PASSWORD: password
79
+ DATABASE_USER: postgres
80
+ <% end -%>
81
+ <% if options[:mysql] -%>
82
+ MYSQL_DATABASE: <%= @project_name %>
83
+ MYSQL_ROOT_PASSWORD: password
84
+ MYSQL_USER: <%= @project_name %>_test
85
+ MYSQL_PASSWORD: password
86
+ MYSQL_HOST: mysql
87
+ DATABASE_ADAPTER: mysql2
88
+ DATABASE_HOST: mysql
89
+ DATABASE_NAME: <%= @project_name %>
90
+ DATABASE_PASSWORD: password
91
+ DATABASE_USER: <%= @project_name %>_test
92
+ <% end -%>
93
+ TEST_DB: <%= @project_name %>
94
+ SITE_URI_BASE: TODO
69
95
  script:
70
96
  - cd /home/app/webapp && bundle exec rake db:create db:schema:load spec
71
97
  tags:
@@ -77,23 +103,24 @@ review:
77
103
  stage: review
78
104
  type: deploy
79
105
  environment:
80
- name: $CI_PROJECT_NAME-$CI_COMMIT_REF_SLUG
106
+ name: $CI_COMMIT_REF_SLUG
81
107
  url: http://web.$CI_PROJECT_NAME-$CI_COMMIT_REF_SLUG.staging.$SITE_URI_BASE
82
108
  on_stop: stop_review
83
109
  only:
84
110
  - branches
85
111
  except:
86
- - master
112
+ - main
87
113
  script:
88
114
  <% if options[:rancher] -%>
89
115
  - export RANCHER_ENVIRONMENT=staging
90
116
  - sc provision ci
91
- <% else %>
117
+ <% elsif options[:helm] -%>
118
+ - ./chart/bin/deploy review $CI_COMMIT_REF_SLUG
119
+ <% else -%>
92
120
  - CHANGME
93
- <% end %>
121
+ <% end -%>
94
122
  tags:
95
- - docker
96
- - mysql
123
+ - local
97
124
 
98
125
  stop_review:
99
126
  stage: review
@@ -101,6 +128,8 @@ stop_review:
101
128
  <% if options[:rancher] -%>
102
129
  - export RANCHER_ENVIRONMENT=staging
103
130
  - rancher rm $CI_PROJECT_NAME-$CI_BUILD_REF_SLUG
131
+ <% elsif options[:helm] -%>
132
+ - ./chart/bin/remove review $CI_COMMIT_REF_SLUG
104
133
  <% end %>
105
134
  when: manual
106
135
  environment:
@@ -112,15 +141,17 @@ staging:
112
141
  type: deploy
113
142
  script:
114
143
  <% if options[:rancher] -%>
115
- - sc deploy staging
144
+ - sc deploy staging
145
+ <% elsif options[:helm] -%>
146
+ - ./chart/bin/deploy staging $CI_COMMIT_REF_SLUG
116
147
  <% end -%>
117
148
  <% if options[:heroku] -%>
118
149
  - dpl --provider=heroku --app=<%= @project_name %>-staging --api-key=$HEROKU_STAGING_API_KEY --run="bundle exec rake db:migrate"
119
150
  <% end -%>
120
151
  only:
121
- - master
152
+ - main
122
153
  tags:
123
- - docker
154
+ - local
124
155
 
125
156
  production:
126
157
  stage: production
@@ -128,12 +159,14 @@ production:
128
159
  script:
129
160
  <% if options[:rancher] -%>
130
161
  - sc deploy production
162
+ <% elsif options[:helm] -%>
163
+ - ./chart/bin/deploy production $CI_COMMIT_REF_SLUG
131
164
  <% end -%>
132
165
  <% if options[:heroku] -%>
133
166
  - dpl --provider=heroku --app=<%= @project_name %> --api-key=$HEROKU_PRODUCTION_API_KEY --run="bundle exec rake db:migrate"
134
167
  <% end -%>
135
168
  when: manual
136
169
  only:
137
- - master
170
+ - main
138
171
  tags:
139
- - docker
172
+ - local