pulp_docker_client 4.0.0b5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/Gemfile.lock +79 -0
  4. data/README.md +131 -0
  5. data/Rakefile +10 -0
  6. data/docs/AsyncOperationResponse.md +17 -0
  7. data/docs/Blob.md +29 -0
  8. data/docs/ContentBlobsApi.md +182 -0
  9. data/docs/ContentManifestTagsApi.md +182 -0
  10. data/docs/ContentManifestsApi.md +180 -0
  11. data/docs/DistributionsDockerApi.md +352 -0
  12. data/docs/DockerDistribution.md +31 -0
  13. data/docs/DockerRemote.md +49 -0
  14. data/docs/InlineResponse200.md +23 -0
  15. data/docs/InlineResponse2001.md +23 -0
  16. data/docs/InlineResponse2002.md +23 -0
  17. data/docs/InlineResponse2003.md +23 -0
  18. data/docs/InlineResponse2004.md +23 -0
  19. data/docs/Manifest.md +37 -0
  20. data/docs/ManifestTag.md +29 -0
  21. data/docs/RemotesDockerApi.md +411 -0
  22. data/docs/RepositorySyncURL.md +19 -0
  23. data/git_push.sh +55 -0
  24. data/lib/pulp_docker_client/api/content_blobs_api.rb +222 -0
  25. data/lib/pulp_docker_client/api/content_manifest_tags_api.rb +222 -0
  26. data/lib/pulp_docker_client/api/content_manifests_api.rb +219 -0
  27. data/lib/pulp_docker_client/api/distributions_docker_api.rb +430 -0
  28. data/lib/pulp_docker_client/api/remotes_docker_api.rb +504 -0
  29. data/lib/pulp_docker_client/api_client.rb +387 -0
  30. data/lib/pulp_docker_client/api_error.rb +57 -0
  31. data/lib/pulp_docker_client/configuration.rb +251 -0
  32. data/lib/pulp_docker_client/models/async_operation_response.rb +202 -0
  33. data/lib/pulp_docker_client/models/blob.rb +347 -0
  34. data/lib/pulp_docker_client/models/docker_distribution.rb +347 -0
  35. data/lib/pulp_docker_client/models/docker_remote.rb +598 -0
  36. data/lib/pulp_docker_client/models/inline_response200.rb +235 -0
  37. data/lib/pulp_docker_client/models/inline_response2001.rb +235 -0
  38. data/lib/pulp_docker_client/models/inline_response2002.rb +235 -0
  39. data/lib/pulp_docker_client/models/inline_response2003.rb +235 -0
  40. data/lib/pulp_docker_client/models/inline_response2004.rb +235 -0
  41. data/lib/pulp_docker_client/models/manifest.rb +411 -0
  42. data/lib/pulp_docker_client/models/manifest_tag.rb +328 -0
  43. data/lib/pulp_docker_client/models/repository_sync_url.rb +214 -0
  44. data/lib/pulp_docker_client/version.rb +15 -0
  45. data/lib/pulp_docker_client.rb +56 -0
  46. data/pulp_docker_client.gemspec +45 -0
  47. data/spec/api/content_blobs_api_spec.rb +76 -0
  48. data/spec/api/content_manifest_tags_api_spec.rb +76 -0
  49. data/spec/api/content_manifests_api_spec.rb +75 -0
  50. data/spec/api/distributions_docker_api_spec.rb +116 -0
  51. data/spec/api/remotes_docker_api_spec.rb +130 -0
  52. data/spec/api_client_spec.rb +226 -0
  53. data/spec/configuration_spec.rb +42 -0
  54. data/spec/models/async_operation_response_spec.rb +41 -0
  55. data/spec/models/blob_spec.rb +77 -0
  56. data/spec/models/docker_distribution_spec.rb +83 -0
  57. data/spec/models/docker_remote_spec.rb +141 -0
  58. data/spec/models/inline_response2001_spec.rb +59 -0
  59. data/spec/models/inline_response2002_spec.rb +59 -0
  60. data/spec/models/inline_response2003_spec.rb +59 -0
  61. data/spec/models/inline_response2004_spec.rb +59 -0
  62. data/spec/models/inline_response200_spec.rb +59 -0
  63. data/spec/models/manifest_spec.rb +101 -0
  64. data/spec/models/manifest_tag_spec.rb +77 -0
  65. data/spec/models/repository_sync_url_spec.rb +47 -0
  66. data/spec/spec_helper.rb +111 -0
  67. metadata +309 -0
@@ -0,0 +1,23 @@
1
+ # PulpDockerClient::InlineResponse2004
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **_next** | **String** | | [optional]
8
+ **previous** | **String** | | [optional]
9
+ **count** | **Integer** | |
10
+ **results** | [**Array<DockerRemote>**](DockerRemote.md) | |
11
+
12
+ ## Code Sample
13
+
14
+ ```ruby
15
+ require 'PulpDockerClient'
16
+
17
+ instance = PulpDockerClient::InlineResponse2004.new(_next: null,
18
+ previous: null,
19
+ count: null,
20
+ results: null)
21
+ ```
22
+
23
+
data/docs/Manifest.md ADDED
@@ -0,0 +1,37 @@
1
+ # PulpDockerClient::Manifest
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **_href** | **String** | | [optional]
8
+ **_created** | **DateTime** | Timestamp of creation. | [optional]
9
+ **_type** | **String** | | [optional]
10
+ **_artifact** | **String** | Artifact file representing the physical content |
11
+ **_relative_path** | **String** | Path where the artifact is located relative to distributions base_path |
12
+ **digest** | **String** | sha256 of the Manifest file |
13
+ **schema_version** | **Integer** | Docker schema version |
14
+ **media_type** | **String** | Docker media type of the file |
15
+ **listed_manifests** | **Array<String>** | Manifests that are referenced by this Manifest List |
16
+ **config_blob** | **String** | Blob that contains configuration for this Manifest |
17
+ **blobs** | **Array<String>** | Blobs that are referenced by this Manifest |
18
+
19
+ ## Code Sample
20
+
21
+ ```ruby
22
+ require 'PulpDockerClient'
23
+
24
+ instance = PulpDockerClient::Manifest.new(_href: null,
25
+ _created: null,
26
+ _type: null,
27
+ _artifact: null,
28
+ _relative_path: null,
29
+ digest: null,
30
+ schema_version: null,
31
+ media_type: null,
32
+ listed_manifests: null,
33
+ config_blob: null,
34
+ blobs: null)
35
+ ```
36
+
37
+
@@ -0,0 +1,29 @@
1
+ # PulpDockerClient::ManifestTag
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **_href** | **String** | | [optional]
8
+ **_created** | **DateTime** | Timestamp of creation. | [optional]
9
+ **_type** | **String** | | [optional]
10
+ **_artifact** | **String** | Artifact file representing the physical content |
11
+ **_relative_path** | **String** | Path where the artifact is located relative to distributions base_path |
12
+ **name** | **String** | Tag name |
13
+ **tagged_manifest** | **String** | Manifest that is tagged |
14
+
15
+ ## Code Sample
16
+
17
+ ```ruby
18
+ require 'PulpDockerClient'
19
+
20
+ instance = PulpDockerClient::ManifestTag.new(_href: null,
21
+ _created: null,
22
+ _type: null,
23
+ _artifact: null,
24
+ _relative_path: null,
25
+ name: null,
26
+ tagged_manifest: null)
27
+ ```
28
+
29
+
@@ -0,0 +1,411 @@
1
+ # PulpDockerClient::RemotesDockerApi
2
+
3
+ All URIs are relative to *http://localhost:24817*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**create**](RemotesDockerApi.md#create) | **POST** /pulp/api/v3/remotes/docker/docker/ | Create a docker remote
8
+ [**delete**](RemotesDockerApi.md#delete) | **DELETE** {docker_remote_href} | Delete a docker remote
9
+ [**list**](RemotesDockerApi.md#list) | **GET** /pulp/api/v3/remotes/docker/docker/ | List docker remotes
10
+ [**partial_update**](RemotesDockerApi.md#partial_update) | **PATCH** {docker_remote_href} | Partially update a docker remote
11
+ [**read**](RemotesDockerApi.md#read) | **GET** {docker_remote_href} | Inspect a docker remote
12
+ [**sync**](RemotesDockerApi.md#sync) | **POST** {docker_remote_href}sync/ |
13
+ [**update**](RemotesDockerApi.md#update) | **PUT** {docker_remote_href} | Update a docker remote
14
+
15
+
16
+
17
+ ## create
18
+
19
+ > DockerRemote create(data)
20
+
21
+ Create a docker remote
22
+
23
+ A ViewSet for DockerRemote.
24
+
25
+ ### Example
26
+
27
+ ```ruby
28
+ # load the gem
29
+ require 'pulp_docker_client'
30
+ # setup authorization
31
+ PulpDockerClient.configure do |config|
32
+ # Configure HTTP basic authorization: Basic
33
+ config.username = 'YOUR USERNAME'
34
+ config.password = 'YOUR PASSWORD'
35
+ end
36
+
37
+ api_instance = PulpDockerClient::RemotesDockerApi.new
38
+ data = PulpDockerClient::DockerRemote.new # DockerRemote |
39
+
40
+ begin
41
+ #Create a docker remote
42
+ result = api_instance.create(data)
43
+ p result
44
+ rescue PulpDockerClient::ApiError => e
45
+ puts "Exception when calling RemotesDockerApi->create: #{e}"
46
+ end
47
+ ```
48
+
49
+ ### Parameters
50
+
51
+
52
+ Name | Type | Description | Notes
53
+ ------------- | ------------- | ------------- | -------------
54
+ **data** | [**DockerRemote**](DockerRemote.md)| |
55
+
56
+ ### Return type
57
+
58
+ [**DockerRemote**](DockerRemote.md)
59
+
60
+ ### Authorization
61
+
62
+ [Basic](../README.md#Basic)
63
+
64
+ ### HTTP request headers
65
+
66
+ - **Content-Type**: application/json
67
+ - **Accept**: application/json
68
+
69
+
70
+ ## delete
71
+
72
+ > AsyncOperationResponse delete(docker_remote_href)
73
+
74
+ Delete a docker remote
75
+
76
+ Trigger an asynchronous delete task
77
+
78
+ ### Example
79
+
80
+ ```ruby
81
+ # load the gem
82
+ require 'pulp_docker_client'
83
+ # setup authorization
84
+ PulpDockerClient.configure do |config|
85
+ # Configure HTTP basic authorization: Basic
86
+ config.username = 'YOUR USERNAME'
87
+ config.password = 'YOUR PASSWORD'
88
+ end
89
+
90
+ api_instance = PulpDockerClient::RemotesDockerApi.new
91
+ docker_remote_href = 'docker_remote_href_example' # String | URI of Docker Remote. e.g.: /pulp/api/v3/remotes/docker/docker/1/
92
+
93
+ begin
94
+ #Delete a docker remote
95
+ result = api_instance.delete(docker_remote_href)
96
+ p result
97
+ rescue PulpDockerClient::ApiError => e
98
+ puts "Exception when calling RemotesDockerApi->delete: #{e}"
99
+ end
100
+ ```
101
+
102
+ ### Parameters
103
+
104
+
105
+ Name | Type | Description | Notes
106
+ ------------- | ------------- | ------------- | -------------
107
+ **docker_remote_href** | **String**| URI of Docker Remote. e.g.: /pulp/api/v3/remotes/docker/docker/1/ |
108
+
109
+ ### Return type
110
+
111
+ [**AsyncOperationResponse**](AsyncOperationResponse.md)
112
+
113
+ ### Authorization
114
+
115
+ [Basic](../README.md#Basic)
116
+
117
+ ### HTTP request headers
118
+
119
+ - **Content-Type**: Not defined
120
+ - **Accept**: application/json
121
+
122
+
123
+ ## list
124
+
125
+ > InlineResponse2004 list(opts)
126
+
127
+ List docker remotes
128
+
129
+ A ViewSet for DockerRemote.
130
+
131
+ ### Example
132
+
133
+ ```ruby
134
+ # load the gem
135
+ require 'pulp_docker_client'
136
+ # setup authorization
137
+ PulpDockerClient.configure do |config|
138
+ # Configure HTTP basic authorization: Basic
139
+ config.username = 'YOUR USERNAME'
140
+ config.password = 'YOUR PASSWORD'
141
+ end
142
+
143
+ api_instance = PulpDockerClient::RemotesDockerApi.new
144
+ opts = {
145
+ name: 'name_example', # String |
146
+ name__in: 'name__in_example', # String | Filter results where name is in a comma-separated list of values
147
+ _last_updated__lt: '_last_updated__lt_example', # String | Filter results where _last_updated is less than value
148
+ _last_updated__lte: '_last_updated__lte_example', # String | Filter results where _last_updated is less than or equal to value
149
+ _last_updated__gt: '_last_updated__gt_example', # String | Filter results where _last_updated is greater than value
150
+ _last_updated__gte: '_last_updated__gte_example', # String | Filter results where _last_updated is greater than or equal to value
151
+ _last_updated__range: '_last_updated__range_example', # String | Filter results where _last_updated is between two comma separated values
152
+ _last_updated: '_last_updated_example', # String | ISO 8601 formatted dates are supported
153
+ page: 56, # Integer | A page number within the paginated result set.
154
+ page_size: 56 # Integer | Number of results to return per page.
155
+ }
156
+
157
+ begin
158
+ #List docker remotes
159
+ result = api_instance.list(opts)
160
+ p result
161
+ rescue PulpDockerClient::ApiError => e
162
+ puts "Exception when calling RemotesDockerApi->list: #{e}"
163
+ end
164
+ ```
165
+
166
+ ### Parameters
167
+
168
+
169
+ Name | Type | Description | Notes
170
+ ------------- | ------------- | ------------- | -------------
171
+ **name** | **String**| | [optional]
172
+ **name__in** | **String**| Filter results where name is in a comma-separated list of values | [optional]
173
+ **_last_updated__lt** | **String**| Filter results where _last_updated is less than value | [optional]
174
+ **_last_updated__lte** | **String**| Filter results where _last_updated is less than or equal to value | [optional]
175
+ **_last_updated__gt** | **String**| Filter results where _last_updated is greater than value | [optional]
176
+ **_last_updated__gte** | **String**| Filter results where _last_updated is greater than or equal to value | [optional]
177
+ **_last_updated__range** | **String**| Filter results where _last_updated is between two comma separated values | [optional]
178
+ **_last_updated** | **String**| ISO 8601 formatted dates are supported | [optional]
179
+ **page** | **Integer**| A page number within the paginated result set. | [optional]
180
+ **page_size** | **Integer**| Number of results to return per page. | [optional]
181
+
182
+ ### Return type
183
+
184
+ [**InlineResponse2004**](InlineResponse2004.md)
185
+
186
+ ### Authorization
187
+
188
+ [Basic](../README.md#Basic)
189
+
190
+ ### HTTP request headers
191
+
192
+ - **Content-Type**: Not defined
193
+ - **Accept**: application/json
194
+
195
+
196
+ ## partial_update
197
+
198
+ > AsyncOperationResponse partial_update(docker_remote_href, data)
199
+
200
+ Partially update a docker remote
201
+
202
+ Trigger an asynchronous partial update task
203
+
204
+ ### Example
205
+
206
+ ```ruby
207
+ # load the gem
208
+ require 'pulp_docker_client'
209
+ # setup authorization
210
+ PulpDockerClient.configure do |config|
211
+ # Configure HTTP basic authorization: Basic
212
+ config.username = 'YOUR USERNAME'
213
+ config.password = 'YOUR PASSWORD'
214
+ end
215
+
216
+ api_instance = PulpDockerClient::RemotesDockerApi.new
217
+ docker_remote_href = 'docker_remote_href_example' # String | URI of Docker Remote. e.g.: /pulp/api/v3/remotes/docker/docker/1/
218
+ data = PulpDockerClient::DockerRemote.new # DockerRemote |
219
+
220
+ begin
221
+ #Partially update a docker remote
222
+ result = api_instance.partial_update(docker_remote_href, data)
223
+ p result
224
+ rescue PulpDockerClient::ApiError => e
225
+ puts "Exception when calling RemotesDockerApi->partial_update: #{e}"
226
+ end
227
+ ```
228
+
229
+ ### Parameters
230
+
231
+
232
+ Name | Type | Description | Notes
233
+ ------------- | ------------- | ------------- | -------------
234
+ **docker_remote_href** | **String**| URI of Docker Remote. e.g.: /pulp/api/v3/remotes/docker/docker/1/ |
235
+ **data** | [**DockerRemote**](DockerRemote.md)| |
236
+
237
+ ### Return type
238
+
239
+ [**AsyncOperationResponse**](AsyncOperationResponse.md)
240
+
241
+ ### Authorization
242
+
243
+ [Basic](../README.md#Basic)
244
+
245
+ ### HTTP request headers
246
+
247
+ - **Content-Type**: application/json
248
+ - **Accept**: application/json
249
+
250
+
251
+ ## read
252
+
253
+ > DockerRemote read(docker_remote_href)
254
+
255
+ Inspect a docker remote
256
+
257
+ A ViewSet for DockerRemote.
258
+
259
+ ### Example
260
+
261
+ ```ruby
262
+ # load the gem
263
+ require 'pulp_docker_client'
264
+ # setup authorization
265
+ PulpDockerClient.configure do |config|
266
+ # Configure HTTP basic authorization: Basic
267
+ config.username = 'YOUR USERNAME'
268
+ config.password = 'YOUR PASSWORD'
269
+ end
270
+
271
+ api_instance = PulpDockerClient::RemotesDockerApi.new
272
+ docker_remote_href = 'docker_remote_href_example' # String | URI of Docker Remote. e.g.: /pulp/api/v3/remotes/docker/docker/1/
273
+
274
+ begin
275
+ #Inspect a docker remote
276
+ result = api_instance.read(docker_remote_href)
277
+ p result
278
+ rescue PulpDockerClient::ApiError => e
279
+ puts "Exception when calling RemotesDockerApi->read: #{e}"
280
+ end
281
+ ```
282
+
283
+ ### Parameters
284
+
285
+
286
+ Name | Type | Description | Notes
287
+ ------------- | ------------- | ------------- | -------------
288
+ **docker_remote_href** | **String**| URI of Docker Remote. e.g.: /pulp/api/v3/remotes/docker/docker/1/ |
289
+
290
+ ### Return type
291
+
292
+ [**DockerRemote**](DockerRemote.md)
293
+
294
+ ### Authorization
295
+
296
+ [Basic](../README.md#Basic)
297
+
298
+ ### HTTP request headers
299
+
300
+ - **Content-Type**: Not defined
301
+ - **Accept**: application/json
302
+
303
+
304
+ ## sync
305
+
306
+ > AsyncOperationResponse sync(docker_remote_href, data)
307
+
308
+
309
+
310
+ Trigger an asynchronous task to sync content
311
+
312
+ ### Example
313
+
314
+ ```ruby
315
+ # load the gem
316
+ require 'pulp_docker_client'
317
+ # setup authorization
318
+ PulpDockerClient.configure do |config|
319
+ # Configure HTTP basic authorization: Basic
320
+ config.username = 'YOUR USERNAME'
321
+ config.password = 'YOUR PASSWORD'
322
+ end
323
+
324
+ api_instance = PulpDockerClient::RemotesDockerApi.new
325
+ docker_remote_href = 'docker_remote_href_example' # String | URI of Docker Remote. e.g.: /pulp/api/v3/remotes/docker/docker/1/
326
+ data = PulpDockerClient::RepositorySyncURL.new # RepositorySyncURL |
327
+
328
+ begin
329
+ result = api_instance.sync(docker_remote_href, data)
330
+ p result
331
+ rescue PulpDockerClient::ApiError => e
332
+ puts "Exception when calling RemotesDockerApi->sync: #{e}"
333
+ end
334
+ ```
335
+
336
+ ### Parameters
337
+
338
+
339
+ Name | Type | Description | Notes
340
+ ------------- | ------------- | ------------- | -------------
341
+ **docker_remote_href** | **String**| URI of Docker Remote. e.g.: /pulp/api/v3/remotes/docker/docker/1/ |
342
+ **data** | [**RepositorySyncURL**](RepositorySyncURL.md)| |
343
+
344
+ ### Return type
345
+
346
+ [**AsyncOperationResponse**](AsyncOperationResponse.md)
347
+
348
+ ### Authorization
349
+
350
+ [Basic](../README.md#Basic)
351
+
352
+ ### HTTP request headers
353
+
354
+ - **Content-Type**: application/json
355
+ - **Accept**: application/json
356
+
357
+
358
+ ## update
359
+
360
+ > AsyncOperationResponse update(docker_remote_href, data)
361
+
362
+ Update a docker remote
363
+
364
+ Trigger an asynchronous update task
365
+
366
+ ### Example
367
+
368
+ ```ruby
369
+ # load the gem
370
+ require 'pulp_docker_client'
371
+ # setup authorization
372
+ PulpDockerClient.configure do |config|
373
+ # Configure HTTP basic authorization: Basic
374
+ config.username = 'YOUR USERNAME'
375
+ config.password = 'YOUR PASSWORD'
376
+ end
377
+
378
+ api_instance = PulpDockerClient::RemotesDockerApi.new
379
+ docker_remote_href = 'docker_remote_href_example' # String | URI of Docker Remote. e.g.: /pulp/api/v3/remotes/docker/docker/1/
380
+ data = PulpDockerClient::DockerRemote.new # DockerRemote |
381
+
382
+ begin
383
+ #Update a docker remote
384
+ result = api_instance.update(docker_remote_href, data)
385
+ p result
386
+ rescue PulpDockerClient::ApiError => e
387
+ puts "Exception when calling RemotesDockerApi->update: #{e}"
388
+ end
389
+ ```
390
+
391
+ ### Parameters
392
+
393
+
394
+ Name | Type | Description | Notes
395
+ ------------- | ------------- | ------------- | -------------
396
+ **docker_remote_href** | **String**| URI of Docker Remote. e.g.: /pulp/api/v3/remotes/docker/docker/1/ |
397
+ **data** | [**DockerRemote**](DockerRemote.md)| |
398
+
399
+ ### Return type
400
+
401
+ [**AsyncOperationResponse**](AsyncOperationResponse.md)
402
+
403
+ ### Authorization
404
+
405
+ [Basic](../README.md#Basic)
406
+
407
+ ### HTTP request headers
408
+
409
+ - **Content-Type**: application/json
410
+ - **Accept**: application/json
411
+
@@ -0,0 +1,19 @@
1
+ # PulpDockerClient::RepositorySyncURL
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **repository** | **String** | A URI of the repository to be synchronized. |
8
+ **mirror** | **Boolean** | If ``True``, synchronization will remove all content that is not present in the remote repository. If ``False``, sync will be additive only. | [optional] [default to false]
9
+
10
+ ## Code Sample
11
+
12
+ ```ruby
13
+ require 'PulpDockerClient'
14
+
15
+ instance = PulpDockerClient::RepositorySyncURL.new(repository: null,
16
+ mirror: null)
17
+ ```
18
+
19
+
data/git_push.sh ADDED
@@ -0,0 +1,55 @@
1
+ #!/bin/sh
2
+ #
3
+ # Generated by: https://openapi-generator.tech
4
+ #
5
+ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
6
+ #
7
+ # Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update"
8
+
9
+ git_user_id=$1
10
+ git_repo_id=$2
11
+ release_note=$3
12
+
13
+ if [ "$git_user_id" = "" ]; then
14
+ git_user_id="GIT_USER_ID"
15
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
16
+ fi
17
+
18
+ if [ "$git_repo_id" = "" ]; then
19
+ git_repo_id="GIT_REPO_ID"
20
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
21
+ fi
22
+
23
+ if [ "$release_note" = "" ]; then
24
+ release_note="Minor update"
25
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
26
+ fi
27
+
28
+ # Initialize the local directory as a Git repository
29
+ git init
30
+
31
+ # Adds the files in the local repository and stages them for commit.
32
+ git add .
33
+
34
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
35
+ git commit -m "$release_note"
36
+
37
+ # Sets the new remote
38
+ git_remote=`git remote`
39
+ if [ "$git_remote" = "" ]; then # git remote not defined
40
+
41
+ if [ "$GIT_TOKEN" = "" ]; then
42
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
43
+ git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
44
+ else
45
+ git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
46
+ fi
47
+
48
+ fi
49
+
50
+ git pull origin master
51
+
52
+ # Pushes (Forces) the changes in the local repository up to the remote repository
53
+ echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
54
+ git push origin master 2>&1 | grep -v 'To https'
55
+