gitlab-cloud-connector 0.1.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -3
- data/CONTRIBUTING.md +50 -0
- data/LICENSE +28 -0
- data/Makefile +33 -0
- data/README.md +11 -221
- data/Rakefile +1 -5
- data/config/add_ons/duo_enterprise.yml +2 -0
- data/config/add_ons/duo_pro.yml +2 -0
- data/config/backend_services/ai_gateway.yml +5 -0
- data/config/backend_services/duo_workflow_service.yml +5 -0
- data/config/backend_services/observability.yml +5 -0
- data/config/backend_services/security_gateway.yml +5 -0
- data/config/license_types/premium.yml +2 -0
- data/config/license_types/ultimate.yml +2 -0
- data/config/schemas/add_on_schema.json +15 -0
- data/config/schemas/backend_service_schema.json +26 -0
- data/config/schemas/license_type_schema.json +15 -0
- data/config/schemas/unit_primitive_schema.json +97 -0
- data/config/unit_primitives/ask_build.yml +15 -0
- data/config/unit_primitives/ask_commit.yml +15 -0
- data/config/unit_primitives/ask_epic.yml +15 -0
- data/config/unit_primitives/ask_issue.yml +15 -0
- data/config/unit_primitives/code_suggestions.yml +19 -0
- data/config/unit_primitives/complete_code.yml +19 -0
- data/config/unit_primitives/documentation_search.yml +19 -0
- data/config/unit_primitives/duo_chat.yml +19 -0
- data/config/unit_primitives/duo_workflow_execute_workflow.yml +13 -0
- data/config/unit_primitives/explain_code.yml +17 -0
- data/config/unit_primitives/explain_vulnerability.yml +17 -0
- data/config/unit_primitives/fix_code.yml +17 -0
- data/config/unit_primitives/generate_code.yml +19 -0
- data/config/unit_primitives/generate_commit_message.yml +17 -0
- data/config/unit_primitives/generate_issue_description.yml +15 -0
- data/config/unit_primitives/glab_ask_git_command.yml +17 -0
- data/config/unit_primitives/include_dependency_context.yml +15 -0
- data/config/unit_primitives/include_file_context.yml +17 -0
- data/config/unit_primitives/include_issue_context.yml +15 -0
- data/config/unit_primitives/include_merge_request_context.yml +15 -0
- data/config/unit_primitives/include_snippet_context.yml +17 -0
- data/config/unit_primitives/observability_all.yml +14 -0
- data/config/unit_primitives/refactor_code.yml +17 -0
- data/config/unit_primitives/resolve_vulnerability.yml +17 -0
- data/config/unit_primitives/security_scans.yml +13 -0
- data/config/unit_primitives/summarize_comments.yml +17 -0
- data/config/unit_primitives/summarize_review.yml +15 -0
- data/config/unit_primitives/troubleshoot_job.yml +17 -0
- data/config/unit_primitives/write_tests.yml +17 -0
- data/lib/cloud_connector.rb +10 -0
- data/lib/gitlab/cloud_connector/json_web_token.rb +59 -0
- data/lib/gitlab/cloud_connector/{backend_service.rb → version.rb} +1 -3
- metadata +85 -48
- data/.idea/.gitignore +0 -8
- data/.idea/gitlab-cloud-connector.iml +0 -127
- data/.idea/inspectionProfiles/Project_Default.xml +0 -9
- data/.idea/misc.xml +0 -4
- data/.idea/modules.xml +0 -8
- data/.idea/vcs.xml +0 -7
- data/CHANGELOG.md +0 -5
- data/Dangerfile +0 -5
- data/config/cloud_connector/backend_services/ai_gateway/unit_primitives/code_suggestions.yml +0 -19
- data/config/cloud_connector/backend_services/ai_gateway/unit_primitives/documentation_search.yml +0 -19
- data/config/cloud_connector/backend_services/ai_gateway/unit_primitives/duo_chat.yml +0 -19
- data/lib/gitlab/cloud_connector/auth/json_web_token.rb +0 -82
- data/lib/gitlab/cloud_connector/base_group.rb +0 -39
- data/lib/gitlab/cloud_connector/configuration.rb +0 -24
- data/lib/gitlab/cloud_connector/deliverable.rb +0 -31
- data/lib/gitlab/cloud_connector/delivered_by.rb +0 -10
- data/lib/gitlab/cloud_connector/purchasable_decorator.rb +0 -59
- data/lib/gitlab/cloud_connector/token_issuer.rb +0 -44
- data/lib/gitlab/cloud_connector/unit_primitives.rb +0 -195
- data/lib/gitlab/cloud_connector.rb +0 -68
- data/lib/gitlab/popen.rb +0 -68
- data/lib/utils/parse_helper.rb +0 -15
- data/lib/utils/strong_memoize.rb +0 -145
- data/sig/gitlab/cloud_connector.rbs +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 770d5e1b4415c2544e4fb0be3d99fa19b05ab8f7969fc0f6c2c1fc5ea6fb0fb9
|
4
|
+
data.tar.gz: 04e860d904164310a5cabce27bea3896f0d93e6bd66a24fae7e56610f5eaef0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a355ece375da0c859f01cddea2adbd9e1a94800b314e1fc649358c607b1f1b109aa38552c36afd341d02e6aff10f1fb86cf48242fecb068edf47119d59d5f62
|
7
|
+
data.tar.gz: 4b2e636501b08c3a2ba6d4dee1eb9599d73e9da252035ada0c7c5ae4aa6b7aa843c2119d5f7db2afdfb908ee3fab8b96648784ec0e28bd3a5c569699fb96f895
|
data/.rubocop.yml
CHANGED
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
## Making changes to this repository
|
2
|
+
|
3
|
+
We welcome contributions. When making changes:
|
4
|
+
|
5
|
+
1. Follow good git commit practices. Summarize the change concisely in the commit title,
|
6
|
+
and add relevant details in the commit body.
|
7
|
+
1. Add a [changelog trailer](https://docs.gitlab.com/ee/user/project/changelogs.html) where it applies.
|
8
|
+
1. Open a merge request.
|
9
|
+
|
10
|
+
## Developer Certificate of Origin and License
|
11
|
+
|
12
|
+
By contributing to GitLab B.V., you accept and agree to the following terms and
|
13
|
+
conditions for your present and future contributions submitted to GitLab B.V.
|
14
|
+
Except for the license granted herein to GitLab B.V. and recipients of software
|
15
|
+
distributed by GitLab B.V., you reserve all right, title, and interest in and to
|
16
|
+
your Contributions.
|
17
|
+
|
18
|
+
All contributions are subject to the
|
19
|
+
[Developer Certificate of Origin and License](https://docs.gitlab.com/ee/legal/developer_certificate_of_origin).
|
20
|
+
|
21
|
+
_This notice should stay as the first item in the CONTRIBUTING.md file._
|
22
|
+
|
23
|
+
## Code of conduct
|
24
|
+
|
25
|
+
As contributors and maintainers of this project, we pledge to respect all people
|
26
|
+
who contribute through reporting issues, posting feature requests, updating
|
27
|
+
documentation, submitting pull requests or patches, and other activities.
|
28
|
+
|
29
|
+
We are committed to making participation in this project a harassment-free
|
30
|
+
experience for everyone, regardless of level of experience, gender, gender
|
31
|
+
identity and expression, sexual orientation, disability, personal appearance,
|
32
|
+
body size, race, ethnicity, age, or religion.
|
33
|
+
|
34
|
+
Examples of unacceptable behavior by participants include the use of sexual
|
35
|
+
language or imagery, derogatory comments or personal attacks, trolling, public
|
36
|
+
or private harassment, insults, or other unprofessional conduct.
|
37
|
+
|
38
|
+
Project maintainers have the right and responsibility to remove, edit, or reject
|
39
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
40
|
+
not aligned to this Code of Conduct. Project maintainers who do not follow the
|
41
|
+
Code of Conduct may be removed from the project team.
|
42
|
+
|
43
|
+
This code of conduct applies both within project spaces and in public spaces
|
44
|
+
when an individual is representing the project or its community.
|
45
|
+
|
46
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior can be
|
47
|
+
reported by emailing contact@gitlab.com.
|
48
|
+
|
49
|
+
This Code of Conduct is adapted from the [Contributor Covenant](https://contributor-covenant.org), version 1.1.0,
|
50
|
+
available at [https://contributor-covenant.org/version/1/1/0/](https://contributor-covenant.org/version/1/1/0/).
|
data/LICENSE
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
Copyright (c) 2011-present GitLab B.V.
|
2
|
+
|
3
|
+
Portions of this software are licensed as follows:
|
4
|
+
|
5
|
+
* All content residing under the "doc/" directory of this repository is licensed under "Creative Commons: CC BY-SA 4.0 license".
|
6
|
+
* All content that resides under the "ee/" directory of this repository, if that directory exists, is licensed under the license defined in "ee/LICENSE".
|
7
|
+
* All content that resides under the "jh/" directory of this repository, if that directory exists, is licensed under the license defined in "jh/LICENSE".
|
8
|
+
* All client-side JavaScript (when served directly or after being compiled, arranged, augmented, or combined), is licensed under the "MIT Expat" license.
|
9
|
+
* All third party components incorporated into the GitLab Software are licensed under the original license provided by the owner of the applicable component.
|
10
|
+
* Content outside of the above mentioned directories or restrictions above is available under the "MIT Expat" license as defined below.
|
11
|
+
|
12
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
13
|
+
of this software and associated documentation files (the "Software"), to deal
|
14
|
+
in the Software without restriction, including without limitation the rights
|
15
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
16
|
+
copies of the Software, and to permit persons to whom the Software is
|
17
|
+
furnished to do so, subject to the following conditions:
|
18
|
+
|
19
|
+
The above copyright notice and this permission notice shall be included in all
|
20
|
+
copies or substantial portions of the Software.
|
21
|
+
|
22
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
23
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
24
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
25
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
26
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
27
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
28
|
+
SOFTWARE.
|
data/Makefile
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# Makefile at the project root
|
2
|
+
|
3
|
+
# Directories
|
4
|
+
RUBY_DIR := $(shell pwd)
|
5
|
+
ROOT_DIR := ${RUBY_DIR}/../..
|
6
|
+
|
7
|
+
# Assets
|
8
|
+
ASSETS := config LICENSE CONTRIBUTING.md
|
9
|
+
|
10
|
+
.PHONY: build
|
11
|
+
build: copy-assets
|
12
|
+
@echo "Building Ruby gem..."
|
13
|
+
@gem build gitlab-cloud-connector.gemspec
|
14
|
+
@echo "Ruby gem built successfully."
|
15
|
+
@make clean
|
16
|
+
|
17
|
+
.PHONY: copy-assets
|
18
|
+
copy-assets:
|
19
|
+
@echo "Copying assets to Ruby gem directory..."
|
20
|
+
# Ensure the target config directory is removed
|
21
|
+
@if [ -d "${RUBY_DIR}/config" ]; then rm -rf ${RUBY_DIR}/config; fi
|
22
|
+
# Copy required assets
|
23
|
+
@mkdir -p ${RUBY_DIR}/config
|
24
|
+
@cp -r ${ROOT_DIR}/config/* ${RUBY_DIR}/config
|
25
|
+
@cp ${ROOT_DIR}/LICENSE ${RUBY_DIR}/
|
26
|
+
@cp ${ROOT_DIR}/CONTRIBUTING.md ${RUBY_DIR}/
|
27
|
+
|
28
|
+
.PHONY: clean
|
29
|
+
clean:
|
30
|
+
@echo "Cleaning up Ruby gem directory..."
|
31
|
+
@rm -rf ${RUBY_DIR}/config
|
32
|
+
@rm -f ${RUBY_DIR}/LICENSE
|
33
|
+
@rm -f ${RUBY_DIR}/CONTRIBUTING.md
|
data/README.md
CHANGED
@@ -1,231 +1,21 @@
|
|
1
|
-
#
|
1
|
+
# gitlab-cloud-connector (Ruby)
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/gitlab/cloud/connector`. To experiment with that code, run `bin/console` for an interactive prompt.
|
6
|
-
|
7
|
-
## Installation
|
8
|
-
|
9
|
-
TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
|
10
|
-
|
11
|
-
Install the gem and add to the application's Gemfile by executing:
|
12
|
-
|
13
|
-
$ bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
|
14
|
-
|
15
|
-
If bundler is not being used to manage dependencies, install the gem by executing:
|
16
|
-
|
17
|
-
$ gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
|
3
|
+
Ruby gem containing shared code for Cloud Connector token issuers (GitLab, CustomersDot).
|
18
4
|
|
19
5
|
## Usage
|
20
6
|
|
21
|
-
|
22
|
-
Create a class that inherits `Gitlab::CloudConnector::PurchasableDecorator` class and overrides the `available_for?` method.
|
23
|
-
|
24
|
-
Example:
|
25
|
-
|
26
|
-
```ruby
|
27
|
-
require 'gitlab/cloud_connector/unit_primitives'
|
7
|
+
We expect Bundler is used to manage dependencies. To add the dependency, add it to `Gemfile`:
|
28
8
|
|
29
|
-
|
30
|
-
|
31
|
-
extend ::Gitlab::Utils::Override
|
32
|
-
|
33
|
-
override :available_for?
|
34
|
-
def available_for?(namespace)
|
35
|
-
add_on_purchases(namespace).any?
|
36
|
-
end
|
37
|
-
|
38
|
-
private
|
39
|
-
|
40
|
-
def add_on_purchases(namespace = nil)
|
41
|
-
results = GitlabSubscriptions::AddOnPurchase
|
42
|
-
.by_add_on_name(add_ons)
|
43
|
-
.active
|
44
|
-
results = results.by_namespace_id(namespace.self_and_ancestor_ids) if namespace
|
45
|
-
|
46
|
-
results
|
47
|
-
end
|
48
|
-
end
|
9
|
+
```Gemfile
|
10
|
+
gem "gitlab-cloud-connector", "~> 0.1.1", require: 'cloud_connector'
|
49
11
|
```
|
50
12
|
|
51
|
-
|
52
|
-
|
53
|
-
```ruby
|
54
|
-
# config/initializers/cloud_connector.rb
|
55
|
-
|
56
|
-
require 'gitlab/cloud_connector'
|
57
|
-
require 'custom_purchasable_decorator'
|
58
|
-
|
59
|
-
Gitlab::CloudConnector.configure do |config|
|
60
|
-
config.purchasable_decorator_class = CustomPurchasableDecorator
|
61
|
-
config.token_issuer = -> { Doorkeeper::OpenidConnect.configuration.issuer }
|
62
|
-
config.token_subject = Gitlab::CurrentSettings.uuid
|
63
|
-
config.gitlab_version = Gitlab::VERSION
|
64
|
-
config.gitlab_realm = 'self-managed'
|
65
|
-
end
|
66
|
-
```
|
67
|
-
|
68
|
-
The CloudConnector unit primitives are grouped by `backend_services` and by the way how they are delivered: `delivered_by` (trough common interface i.e Duo Chat).
|
69
|
-
|
70
|
-
```ruby
|
71
|
-
Gitlab::CloudConnector.unit_primitives
|
72
|
-
```
|
73
|
-
|
74
|
-
To access specific unit primitive:
|
75
|
-
|
76
|
-
```ruby
|
77
|
-
code_suggestions = Gitlab::CloudConnector.unit_primitives[:code_suggestions]
|
78
|
-
code_suggestions.min_gitlab_version
|
79
|
-
code_suggestions.cut_off_date
|
80
|
-
code_suggestions.add_ons
|
81
|
-
code_suggestions.feature_categories
|
82
|
-
code_suggestions.free_access?
|
83
|
-
code_suggestions.supported_gitlab_version?('16.8')
|
84
|
-
```
|
85
|
-
|
86
|
-
You can group unit primitives by backend service that is hosting the unit primitive.
|
87
|
-
|
88
|
-
```ruby
|
89
|
-
ai_gateway = Gitlab::CloudConnector.backend_services[:ai_gateway]
|
90
|
-
ai_gateway.min_gitlab_version # returns the smallest required gitlab version from all grouped unit primitives
|
91
|
-
ai_gateway.cut_off_date # returns the latest cut-off-date from all grouped unit primitives
|
92
|
-
ai_gateway.add_ons # returns uniq union of all add-on names bundled with grouped unit primitives
|
93
|
-
ai_gateway.feature_categories # returns uniq union of all feature-categories that introduced grouped unit primitives
|
94
|
-
ai_gateway.delivered_by # return groups of unit primitives that are delivered together and hosted by this backend service
|
95
|
-
ai_gateway.unit_primitives # return list of unit primitives that are hosted by this backend service
|
96
|
-
```
|
97
|
-
|
98
|
-
You can group unit primitives that are delivered together. The unit primitives can share common user interface. (i.e. Duo Chat)
|
99
|
-
|
100
|
-
```ruby
|
101
|
-
delivered_by = Gitlab::CloudConnector.delivered_by[:duo_chat]
|
102
|
-
delivered_by.min_gitlab_version # returns the smallest required gitlab version from all grouped unit primitives
|
103
|
-
delivered_by.cut_off_date # returns the latest cut-off-date from all grouped unit primitives
|
104
|
-
delivered_by.add_ons # returns uniq union of all add-on names bundled with grouped unit primitives
|
105
|
-
delivered_by.feature_categories # returns uniq union of all feature-categories that introduced grouped unit primitives
|
106
|
-
delivered_by.free_access? # checks if at least one UP in the group has free access
|
107
|
-
delivered_by.supported_gitlab_version?('16.8') # checks if at least one UP in the group is supported by provided gitlab version
|
108
|
-
delivered_by.unit_primitives # return list of unit primitives that are delivered together via duo_chat
|
109
|
-
```
|
110
|
-
|
111
|
-
To list all available add-ons for the instance:
|
112
|
-
|
113
|
-
```ruby
|
114
|
-
Gitlab::CloudConnector.add_ons
|
115
|
-
```
|
116
|
-
|
117
|
-
### AccessTokens
|
118
|
-
|
119
|
-
You can issue an isntance access token that will contain all allowed scopes across all backend services.
|
120
|
-
Note that audience header will contain the list of audiences, containing multiple supported backends,
|
121
|
-
that can authenticate this JWT token.
|
122
|
-
|
123
|
-
```ruby
|
124
|
-
Gitlab::CloudConnector.instance_access_token(License.last, gitlab_version: '16.8')
|
125
|
-
```
|
126
|
-
|
127
|
-
You can issue a token per backend service, that will contain all allowed scopes for unit primitives that are hosted by specified backend service.
|
128
|
-
|
129
|
-
```ruby
|
130
|
-
Gitlab::CloudConnector.backend_services[:ai_gateway].access_token(License.last, gitlab_version: '16.8')
|
131
|
-
```
|
132
|
-
|
133
|
-
You can issue a token per delivered_by group, that will contain all allowed scopes for unit primitives that are delivered by a common user interface (i.e. Duo Chat)
|
134
|
-
|
135
|
-
```ruby
|
136
|
-
Gitlab::CloudConnector.delivered_by[:duo_chat].access_token(License.last, gitlab_version: '16.8')
|
137
|
-
```
|
138
|
-
|
139
|
-
### Permission checks
|
140
|
-
|
141
|
-
You can call all public methods implemented in PurchasableDecorator on delivered_by group or on unit primitive level
|
142
|
-
|
143
|
-
If you want to check if the access to the group has free access
|
144
|
-
|
145
|
-
```ruby
|
146
|
-
Gitlab::CloudConnector.delivered_by[:duo_chat].free_access?
|
147
|
-
```
|
148
|
-
|
149
|
-
You can also call any other public method that is implemented by `CloudConnector::PurchasableInterface`
|
150
|
-
|
151
|
-
|
152
|
-
Or you can check for specific unit primitive:
|
153
|
-
|
154
|
-
```ruby
|
155
|
-
Gitlab::CloudConnector.unit_primitives[:documentation_search].free_access?
|
156
|
-
```
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
## Development
|
161
|
-
|
162
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
163
|
-
|
164
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
165
|
-
|
166
|
-
## Contributing
|
167
|
-
|
168
|
-
Bug reports and pull requests are welcome on GitLab: []() # TODO add link
|
169
|
-
|
170
|
-
### Introduce new unit primitive
|
171
|
-
|
172
|
-
The GitLab codebase provides bin/unit-primitive, a dedicated tool to create new unit primitive definitions.
|
173
|
-
The tool asks various questions about the new unit primitive, then creates a YAML definition in config/backend_services/[backend_service]/unit_primitives/[unit_primitive_name].yml file.
|
174
|
-
|
175
|
-
```sh
|
176
|
-
bin/unit_primitive new_feature
|
177
|
-
|
178
|
-
>> Description of the unit primitive (enter to skip):
|
179
|
-
?>
|
180
|
-
You picked the bakcend 'ai_gateway'
|
181
|
-
|
182
|
-
>> Cut off date when the service is no longer available for free (enter to skip):
|
183
|
-
?> 2024-12-22 00:00
|
184
|
-
|
185
|
-
>>Minimum gitlab version (enter to skip):
|
186
|
-
?> 16.7
|
187
|
-
|
188
|
-
>>Minimum gitlab version when feature has free access (enter to skip):
|
189
|
-
?> 16.8
|
190
|
-
|
191
|
-
>>Minimum backend service version (enter to skip):
|
192
|
-
?> 2.3
|
193
|
-
|
194
|
-
You picked the add_ons '["duo_enterprise", "duo_pro"]'
|
195
|
-
You picked the delivered_by '["duo_chat"]'
|
196
|
-
You picked the group 'group::cloud connector'
|
197
|
-
You picked the feature_category 'cloud_connector'
|
198
|
-
|
199
|
-
>> URL of the original unit primitive issue (enter to skip):
|
200
|
-
?>
|
201
|
-
|
202
|
-
>> URL of the MR introducing the unit primitive (enter to skip):
|
203
|
-
?>
|
204
|
-
|
205
|
-
You picked the gitlab_realms '["saas", "self-managed"]'
|
206
|
-
|
207
|
-
create config/cloud_connector/backend_services/ai_gateway/unit_primitives/new_feature.yml
|
208
|
-
---
|
209
|
-
name: new_feature
|
210
|
-
description:
|
211
|
-
cut_off_date: 2024-12-22 00:00
|
212
|
-
minumum_gitlab_version: '16.7'
|
213
|
-
min_gitlab_version_for_free_access: '16.8'
|
214
|
-
min_backend_version: '2.3'
|
215
|
-
bundled_with:
|
216
|
-
- duo_enterprise
|
217
|
-
- duo_pro
|
218
|
-
delivered_by:
|
219
|
-
- duo_chat
|
220
|
-
unit_primitive_issue_url:
|
221
|
-
introduced_by_url:
|
222
|
-
group: group::cloud connector
|
223
|
-
feature_category: cloud_connector
|
224
|
-
milestone: 16.7
|
225
|
-
gitlab_realms:
|
226
|
-
- saas
|
227
|
-
- self-managed
|
228
|
-
```
|
13
|
+
## Release Process
|
229
14
|
|
15
|
+
See [Release Process](../../README.md#release-process)
|
230
16
|
|
17
|
+
Once the new gem version is visible on [RubyGems.org](https://rubygems.org/gems/gitlab-cloud-connector),
|
18
|
+
it is recommended to update [GitLab's `Gemfile`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/Gemfile)
|
19
|
+
and [Customers Dot's `Gemfile`](https://gitlab.com/gitlab-org/customers-gitlab-com/-/blob/main/Gemfile) to bump the `gitlab-cloud-connector`
|
20
|
+
Ruby gem to the new version also. See [Usage](#usage) for how to do this.
|
231
21
|
|
data/Rakefile
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-06/schema#",
|
3
|
+
"type": "object",
|
4
|
+
"required": ["name"],
|
5
|
+
"properties": {
|
6
|
+
"name": {
|
7
|
+
"type": "string",
|
8
|
+
"pattern": "^[a-z0-9]+(_[a-z0-9]+)*$"
|
9
|
+
},
|
10
|
+
"description": {
|
11
|
+
"type": "string"
|
12
|
+
}
|
13
|
+
},
|
14
|
+
"additionalProperties": false
|
15
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-06/schema#",
|
3
|
+
"type": "object",
|
4
|
+
"required": ["name", "project_url", "jwt_aud"],
|
5
|
+
"properties": {
|
6
|
+
"name": {
|
7
|
+
"type": "string",
|
8
|
+
"pattern": "^[a-z0-9]+(_[a-z0-9]+)*"
|
9
|
+
},
|
10
|
+
"description": {
|
11
|
+
"type": "string"
|
12
|
+
},
|
13
|
+
"project_url": {
|
14
|
+
"type": "string",
|
15
|
+
"format": "url"
|
16
|
+
},
|
17
|
+
"group": {
|
18
|
+
"type": "string"
|
19
|
+
},
|
20
|
+
"jwt_aud": {
|
21
|
+
"type": "string",
|
22
|
+
"pattern": "^gitlab-[a-z0-9]+(-[a-z0-9]+)*$"
|
23
|
+
}
|
24
|
+
},
|
25
|
+
"additionalProperties": false
|
26
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-06/schema#",
|
3
|
+
"type": "object",
|
4
|
+
"required": ["name"],
|
5
|
+
"properties": {
|
6
|
+
"name": {
|
7
|
+
"type": "string",
|
8
|
+
"pattern": "^[a-z0-9]+(_[a-z0-9]+)*$"
|
9
|
+
},
|
10
|
+
"description": {
|
11
|
+
"type": "string"
|
12
|
+
}
|
13
|
+
},
|
14
|
+
"additionalProperties": false
|
15
|
+
}
|
@@ -0,0 +1,97 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-06/schema#",
|
3
|
+
"type": "object",
|
4
|
+
"required": ["name", "description", "group", "feature_category", "backend_services", "license_types"],
|
5
|
+
"properties": {
|
6
|
+
"name": {
|
7
|
+
"description": "Name of the unit primitive",
|
8
|
+
"type": "string",
|
9
|
+
"pattern": "^[a-z0-9]+(_[a-z0-9]+)*$"
|
10
|
+
},
|
11
|
+
"description": {
|
12
|
+
"description": "Description of the unit primitive",
|
13
|
+
"type": ["string", "null"]
|
14
|
+
},
|
15
|
+
"group": {
|
16
|
+
"description": "The group that introduced the unit primitive",
|
17
|
+
"type": ["string", "null"]
|
18
|
+
},
|
19
|
+
"feature_category": {
|
20
|
+
"description": "The feature category that introduced the unit primitive",
|
21
|
+
"type": ["string", "null"]
|
22
|
+
},
|
23
|
+
"unit_primitive_issue_url": {
|
24
|
+
"description": "Url of original unit primitive issue",
|
25
|
+
"type": ["string", "null"]
|
26
|
+
},
|
27
|
+
"introduced_by_url": {
|
28
|
+
"description": "URL of merge request introducing the Unit Primitive",
|
29
|
+
"type": ["string", "null"]
|
30
|
+
},
|
31
|
+
"documentation_url": {
|
32
|
+
"description": "URL of documentation for introduced Unit Primitive",
|
33
|
+
"type": ["string", "null"]
|
34
|
+
},
|
35
|
+
"milestone": {
|
36
|
+
"description": "Milestone in which the Unit Primitive was introduced",
|
37
|
+
"type": ["string", "null"]
|
38
|
+
},
|
39
|
+
"cut_off_date": {
|
40
|
+
"description": "After this date, unit primitive has no free access",
|
41
|
+
"anyOf": [
|
42
|
+
{
|
43
|
+
"type": "null"
|
44
|
+
},
|
45
|
+
{
|
46
|
+
"type": "time",
|
47
|
+
"format": "date-time"
|
48
|
+
}
|
49
|
+
]
|
50
|
+
},
|
51
|
+
"min_gitlab_version": {
|
52
|
+
"description": "Minimum gitlab version required to use this Unit Primitive",
|
53
|
+
"type": ["string", "null"],
|
54
|
+
"pattern": "\\A(\\d+\\.\\d+)"
|
55
|
+
},
|
56
|
+
"min_gitlab_version_for_free_access": {
|
57
|
+
"description": "Minimum gitlab version required to use this Unit Primitive while it has free access",
|
58
|
+
"type": ["string", "null"],
|
59
|
+
"pattern": "\\A(\\d+\\.\\d+)"
|
60
|
+
},
|
61
|
+
"backend_services": {
|
62
|
+
"type": "array",
|
63
|
+
"items": {
|
64
|
+
"type": "string"
|
65
|
+
}
|
66
|
+
},
|
67
|
+
"add_ons": {
|
68
|
+
"anyOf": [
|
69
|
+
{
|
70
|
+
"type": "array",
|
71
|
+
"items": {
|
72
|
+
"type": "string"
|
73
|
+
}
|
74
|
+
},
|
75
|
+
{
|
76
|
+
"type": "null"
|
77
|
+
}
|
78
|
+
]
|
79
|
+
},
|
80
|
+
"license_types": {
|
81
|
+
"type": "array",
|
82
|
+
"items": {
|
83
|
+
"type": "string"
|
84
|
+
}
|
85
|
+
},
|
86
|
+
"deprecated": {
|
87
|
+
"description": "Indicates if the unit primitive is deprecated",
|
88
|
+
"type": "boolean",
|
89
|
+
"default": false
|
90
|
+
},
|
91
|
+
"deprecation_message": {
|
92
|
+
"description": "Message explaining why the unit primitive is deprecated and any additional context",
|
93
|
+
"type": ["string", "null"]
|
94
|
+
}
|
95
|
+
},
|
96
|
+
"additionalProperties": false
|
97
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
name: ask_build
|
3
|
+
description: Ask questions about GitLab builds.
|
4
|
+
cut_off_date: 2024-10-17T00:00:00+00:00
|
5
|
+
unit_primitive_issue_url:
|
6
|
+
introduced_by_url:
|
7
|
+
documentation_url:
|
8
|
+
group: group::duo_chat
|
9
|
+
feature_category: duo_chat
|
10
|
+
backend_services:
|
11
|
+
- ai_gateway
|
12
|
+
add_ons:
|
13
|
+
- duo_enterprise
|
14
|
+
license_types:
|
15
|
+
- ultimate
|
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
name: ask_commit
|
3
|
+
description: Ask questions about GitLab commits.
|
4
|
+
cut_off_date: 2024-10-17T00:00:00+00:00
|
5
|
+
unit_primitive_issue_url:
|
6
|
+
introduced_by_url:
|
7
|
+
documentation_url:
|
8
|
+
group: group::duo_chat
|
9
|
+
feature_category: duo_chat
|
10
|
+
backend_services:
|
11
|
+
- ai_gateway
|
12
|
+
add_ons:
|
13
|
+
- duo_enterprise
|
14
|
+
license_types:
|
15
|
+
- ultimate
|
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
name: ask_epic
|
3
|
+
description: Ask questions about GitLab epics.
|
4
|
+
cut_off_date: 2024-10-17T00:00:00+00:00
|
5
|
+
unit_primitive_issue_url:
|
6
|
+
introduced_by_url:
|
7
|
+
documentation_url:
|
8
|
+
group: group::duo_chat
|
9
|
+
feature_category: duo_chat
|
10
|
+
backend_services:
|
11
|
+
- ai_gateway
|
12
|
+
add_ons:
|
13
|
+
- duo_enterprise
|
14
|
+
license_types:
|
15
|
+
- ultimate
|
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
name: ask_issue
|
3
|
+
description: Ask questions about GitLab issues.
|
4
|
+
cut_off_date: 2024-10-17T00:00:00+00:00
|
5
|
+
unit_primitive_issue_url:
|
6
|
+
introduced_by_url:
|
7
|
+
documentation_url:
|
8
|
+
group: group::duo_chat
|
9
|
+
feature_category: duo_chat
|
10
|
+
backend_services:
|
11
|
+
- ai_gateway
|
12
|
+
add_ons:
|
13
|
+
- duo_enterprise
|
14
|
+
license_types:
|
15
|
+
- ultimate
|