pulpcore_client 3.14.19 → 3.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +38 -5
- data/docs/AccessPoliciesApi.md +1 -1
- data/docs/ArtifactsApi.md +1 -1
- data/docs/ContentApi.md +1 -1
- data/docs/ContentguardsApi.md +1 -1
- data/docs/ContentguardsRbacApi.md +473 -0
- data/docs/ExportersFilesystemApi.md +362 -0
- data/docs/ExportersFilesystemExportsApi.md +243 -0
- data/docs/ExportersPulpApi.md +1 -1
- data/docs/ExportersPulpExportsApi.md +1 -1
- data/docs/FilesystemExport.md +21 -0
- data/docs/FilesystemExportResponse.md +25 -0
- data/docs/FilesystemExporter.md +21 -0
- data/docs/FilesystemExporterResponse.md +25 -0
- data/docs/GroupsApi.md +1 -1
- data/docs/GroupsModelPermissionsApi.md +1 -1
- data/docs/GroupsObjectPermissionsApi.md +1 -1
- data/docs/GroupsUsersApi.md +1 -1
- data/docs/ImportersPulpApi.md +1 -1
- data/docs/ImportersPulpImportCheckApi.md +1 -1
- data/docs/ImportersPulpImportsApi.md +1 -1
- data/docs/MethodEnum.md +16 -0
- data/docs/OrphansApi.md +1 -1
- data/docs/OrphansCleanup.md +3 -1
- data/docs/OrphansCleanupApi.md +1 -1
- data/docs/PaginatedFilesystemExportResponseList.md +23 -0
- data/docs/PaginatedFilesystemExporterResponseList.md +23 -0
- data/docs/PaginatedRBACContentGuardResponseList.md +23 -0
- data/docs/PatchedFilesystemExporter.md +21 -0
- data/docs/PatchedRBACContentGuard.md +19 -0
- data/docs/PublicationsApi.md +1 -1
- data/docs/RBACContentGuard.md +19 -0
- data/docs/RBACContentGuardPermission.md +19 -0
- data/docs/RBACContentGuardResponse.md +27 -0
- data/docs/ReclaimSpace.md +19 -0
- data/docs/RepairApi.md +1 -1
- data/docs/RepositoriesApi.md +1 -1
- data/docs/RepositoriesReclaimSpaceApi.md +61 -0
- data/docs/RepositoryResponse.md +3 -3
- data/docs/RepositoryVersionsApi.md +1 -1
- data/docs/SigningServicesApi.md +1 -1
- data/docs/StatusApi.md +1 -1
- data/docs/TaskGroupsApi.md +1 -1
- data/docs/TasksApi.md +1 -1
- data/docs/UploadsApi.md +1 -1
- data/docs/UsersApi.md +1 -1
- data/docs/WorkersApi.md +1 -1
- data/git_push.sh +58 -0
- data/lib/pulpcore_client/api/contentguards_rbac_api.rb +580 -0
- data/lib/pulpcore_client/api/exporters_filesystem_api.rb +442 -0
- data/lib/pulpcore_client/api/exporters_filesystem_exports_api.rb +297 -0
- data/lib/pulpcore_client/api/repositories_reclaim_space_api.rb +84 -0
- data/lib/pulpcore_client/api_client.rb +5 -2
- data/lib/pulpcore_client/configuration.rb +2 -3
- data/lib/pulpcore_client/models/filesystem_export.rb +229 -0
- data/lib/pulpcore_client/models/filesystem_export_response.rb +250 -0
- data/lib/pulpcore_client/models/filesystem_exporter.rb +238 -0
- data/lib/pulpcore_client/models/filesystem_exporter_response.rb +257 -0
- data/lib/pulpcore_client/models/method_enum.rb +37 -0
- data/lib/pulpcore_client/models/orphans_cleanup.rb +17 -4
- data/lib/pulpcore_client/models/paginated_filesystem_export_response_list.rb +237 -0
- data/lib/pulpcore_client/models/paginated_filesystem_exporter_response_list.rb +237 -0
- data/lib/pulpcore_client/models/paginated_rbac_content_guard_response_list.rb +237 -0
- data/lib/pulpcore_client/models/patched_filesystem_exporter.rb +228 -0
- data/lib/pulpcore_client/models/patched_rbac_content_guard.rb +219 -0
- data/lib/pulpcore_client/models/rbac_content_guard.rb +224 -0
- data/lib/pulpcore_client/models/rbac_content_guard_permission.rb +219 -0
- data/lib/pulpcore_client/models/rbac_content_guard_response.rb +261 -0
- data/lib/pulpcore_client/models/reclaim_space.rb +227 -0
- data/lib/pulpcore_client/models/repository_response.rb +17 -16
- data/lib/pulpcore_client/version.rb +1 -1
- data/lib/pulpcore_client.rb +18 -0
- data/pulpcore_client.gemspec +3 -3
- data/spec/api/contentguards_rbac_api_spec.rb +146 -0
- data/spec/api/exporters_filesystem_api_spec.rb +120 -0
- data/spec/api/exporters_filesystem_exports_api_spec.rb +91 -0
- data/spec/api/repositories_reclaim_space_api_spec.rb +46 -0
- data/spec/configuration_spec.rb +3 -3
- data/spec/models/filesystem_export_response_spec.rb +65 -0
- data/spec/models/filesystem_export_spec.rb +53 -0
- data/spec/models/filesystem_exporter_response_spec.rb +65 -0
- data/spec/models/filesystem_exporter_spec.rb +53 -0
- data/spec/models/method_enum_spec.rb +35 -0
- data/spec/models/orphans_cleanup_spec.rb +6 -0
- data/spec/models/paginated_filesystem_export_response_list_spec.rb +59 -0
- data/spec/models/paginated_filesystem_exporter_response_list_spec.rb +59 -0
- data/spec/models/paginated_rbac_content_guard_response_list_spec.rb +59 -0
- data/spec/models/patched_filesystem_exporter_spec.rb +53 -0
- data/spec/models/patched_rbac_content_guard_spec.rb +47 -0
- data/spec/models/rbac_content_guard_permission_spec.rb +47 -0
- data/spec/models/rbac_content_guard_response_spec.rb +71 -0
- data/spec/models/rbac_content_guard_spec.rb +47 -0
- data/spec/models/reclaim_space_spec.rb +47 -0
- data/spec/models/repository_response_spec.rb +1 -1
- metadata +158 -91
@@ -0,0 +1,25 @@
|
|
1
|
+
# PulpcoreClient::FilesystemExporterResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**pulp_href** | **String** | | [optional] [readonly]
|
8
|
+
**pulp_created** | **DateTime** | Timestamp of creation. | [optional] [readonly]
|
9
|
+
**name** | **String** | Unique name of the file system exporter. |
|
10
|
+
**path** | **String** | File system location to export to. |
|
11
|
+
**method** | [**MethodEnum**](MethodEnum.md) | Method of exporting | [optional]
|
12
|
+
|
13
|
+
## Code Sample
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'PulpcoreClient'
|
17
|
+
|
18
|
+
instance = PulpcoreClient::FilesystemExporterResponse.new(pulp_href: null,
|
19
|
+
pulp_created: null,
|
20
|
+
name: null,
|
21
|
+
path: null,
|
22
|
+
method: null)
|
23
|
+
```
|
24
|
+
|
25
|
+
|
data/docs/GroupsApi.md
CHANGED
data/docs/GroupsUsersApi.md
CHANGED
data/docs/ImportersPulpApi.md
CHANGED
data/docs/MethodEnum.md
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# PulpcoreClient::MethodEnum
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
|
8
|
+
## Code Sample
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
require 'PulpcoreClient'
|
12
|
+
|
13
|
+
instance = PulpcoreClient::MethodEnum.new()
|
14
|
+
```
|
15
|
+
|
16
|
+
|
data/docs/OrphansApi.md
CHANGED
data/docs/OrphansCleanup.md
CHANGED
@@ -5,13 +5,15 @@
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
7
|
**content_hrefs** | [**Array<AnyType>**](AnyType.md) | Will delete specified content and associated Artifacts if they are orphans. | [optional]
|
8
|
+
**orphan_protection_time** | **Integer** | The time in minutes for how long Pulp will hold orphan Content and Artifacts before they become candidates for deletion by this orphan cleanup task. This should ideally be longer than your longest running task otherwise any content created during that task could be cleaned up before the task finishes. If not specified, default is used from settings which is 1440 minutes (24 hours) | [optional] [default to 0]
|
8
9
|
|
9
10
|
## Code Sample
|
10
11
|
|
11
12
|
```ruby
|
12
13
|
require 'PulpcoreClient'
|
13
14
|
|
14
|
-
instance = PulpcoreClient::OrphansCleanup.new(content_hrefs: null
|
15
|
+
instance = PulpcoreClient::OrphansCleanup.new(content_hrefs: null,
|
16
|
+
orphan_protection_time: null)
|
15
17
|
```
|
16
18
|
|
17
19
|
|
data/docs/OrphansCleanupApi.md
CHANGED
@@ -0,0 +1,23 @@
|
|
1
|
+
# PulpcoreClient::PaginatedFilesystemExportResponseList
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**count** | **Integer** | | [optional]
|
8
|
+
**_next** | **String** | | [optional]
|
9
|
+
**previous** | **String** | | [optional]
|
10
|
+
**results** | [**Array<FilesystemExportResponse>**](FilesystemExportResponse.md) | | [optional]
|
11
|
+
|
12
|
+
## Code Sample
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'PulpcoreClient'
|
16
|
+
|
17
|
+
instance = PulpcoreClient::PaginatedFilesystemExportResponseList.new(count: 123,
|
18
|
+
_next: http://api.example.org/accounts/?offset=400&limit=100,
|
19
|
+
previous: http://api.example.org/accounts/?offset=200&limit=100,
|
20
|
+
results: null)
|
21
|
+
```
|
22
|
+
|
23
|
+
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# PulpcoreClient::PaginatedFilesystemExporterResponseList
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**count** | **Integer** | | [optional]
|
8
|
+
**_next** | **String** | | [optional]
|
9
|
+
**previous** | **String** | | [optional]
|
10
|
+
**results** | [**Array<FilesystemExporterResponse>**](FilesystemExporterResponse.md) | | [optional]
|
11
|
+
|
12
|
+
## Code Sample
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'PulpcoreClient'
|
16
|
+
|
17
|
+
instance = PulpcoreClient::PaginatedFilesystemExporterResponseList.new(count: 123,
|
18
|
+
_next: http://api.example.org/accounts/?offset=400&limit=100,
|
19
|
+
previous: http://api.example.org/accounts/?offset=200&limit=100,
|
20
|
+
results: null)
|
21
|
+
```
|
22
|
+
|
23
|
+
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# PulpcoreClient::PaginatedRBACContentGuardResponseList
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**count** | **Integer** | | [optional]
|
8
|
+
**_next** | **String** | | [optional]
|
9
|
+
**previous** | **String** | | [optional]
|
10
|
+
**results** | [**Array<RBACContentGuardResponse>**](RBACContentGuardResponse.md) | | [optional]
|
11
|
+
|
12
|
+
## Code Sample
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'PulpcoreClient'
|
16
|
+
|
17
|
+
instance = PulpcoreClient::PaginatedRBACContentGuardResponseList.new(count: 123,
|
18
|
+
_next: http://api.example.org/accounts/?offset=400&limit=100,
|
19
|
+
previous: http://api.example.org/accounts/?offset=200&limit=100,
|
20
|
+
results: null)
|
21
|
+
```
|
22
|
+
|
23
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# PulpcoreClient::PatchedFilesystemExporter
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**name** | **String** | Unique name of the file system exporter. | [optional]
|
8
|
+
**path** | **String** | File system location to export to. | [optional]
|
9
|
+
**method** | [**MethodEnum**](MethodEnum.md) | Method of exporting | [optional]
|
10
|
+
|
11
|
+
## Code Sample
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'PulpcoreClient'
|
15
|
+
|
16
|
+
instance = PulpcoreClient::PatchedFilesystemExporter.new(name: null,
|
17
|
+
path: null,
|
18
|
+
method: null)
|
19
|
+
```
|
20
|
+
|
21
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# PulpcoreClient::PatchedRBACContentGuard
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**name** | **String** | The unique name. | [optional]
|
8
|
+
**description** | **String** | An optional description. | [optional]
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'PulpcoreClient'
|
14
|
+
|
15
|
+
instance = PulpcoreClient::PatchedRBACContentGuard.new(name: null,
|
16
|
+
description: null)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
data/docs/PublicationsApi.md
CHANGED
@@ -0,0 +1,19 @@
|
|
1
|
+
# PulpcoreClient::RBACContentGuard
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**name** | **String** | The unique name. |
|
8
|
+
**description** | **String** | An optional description. | [optional]
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'PulpcoreClient'
|
14
|
+
|
15
|
+
instance = PulpcoreClient::RBACContentGuard.new(name: null,
|
16
|
+
description: null)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# PulpcoreClient::RBACContentGuardPermission
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**usernames** | [**Array<AnyType>**](AnyType.md) | | [optional]
|
8
|
+
**groupnames** | [**Array<AnyType>**](AnyType.md) | | [optional]
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'PulpcoreClient'
|
14
|
+
|
15
|
+
instance = PulpcoreClient::RBACContentGuardPermission.new(usernames: null,
|
16
|
+
groupnames: null)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# PulpcoreClient::RBACContentGuardResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**pulp_href** | **String** | | [optional] [readonly]
|
8
|
+
**pulp_created** | **DateTime** | Timestamp of creation. | [optional] [readonly]
|
9
|
+
**name** | **String** | The unique name. |
|
10
|
+
**description** | **String** | An optional description. | [optional]
|
11
|
+
**users** | **String** | | [optional] [readonly]
|
12
|
+
**groups** | **String** | | [optional] [readonly]
|
13
|
+
|
14
|
+
## Code Sample
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
require 'PulpcoreClient'
|
18
|
+
|
19
|
+
instance = PulpcoreClient::RBACContentGuardResponse.new(pulp_href: null,
|
20
|
+
pulp_created: null,
|
21
|
+
name: null,
|
22
|
+
description: null,
|
23
|
+
users: null,
|
24
|
+
groups: null)
|
25
|
+
```
|
26
|
+
|
27
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# PulpcoreClient::ReclaimSpace
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**repo_hrefs** | [**Array<AnyType>**](AnyType.md) | Will reclaim space for the specified list of repos. |
|
8
|
+
**repo_versions_keeplist** | **Array<String>** | Will exclude repo versions from space reclaim. | [optional]
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'PulpcoreClient'
|
14
|
+
|
15
|
+
instance = PulpcoreClient::ReclaimSpace.new(repo_hrefs: null,
|
16
|
+
repo_versions_keeplist: null)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
data/docs/RepairApi.md
CHANGED
data/docs/RepositoriesApi.md
CHANGED
@@ -0,0 +1,61 @@
|
|
1
|
+
# PulpcoreClient::RepositoriesReclaimSpaceApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://pulp*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**reclaim**](RepositoriesReclaimSpaceApi.md#reclaim) | **POST** /pulp/api/v3/repositories/reclaim_space/ |
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
## reclaim
|
12
|
+
|
13
|
+
> AsyncOperationResponse reclaim(reclaim_space)
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
Trigger an asynchronous space reclaim operation.
|
18
|
+
|
19
|
+
### Example
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
# load the gem
|
23
|
+
require 'pulpcore_client'
|
24
|
+
# setup authorization
|
25
|
+
PulpcoreClient.configure do |config|
|
26
|
+
# Configure HTTP basic authorization: basicAuth
|
27
|
+
config.username = 'YOUR USERNAME'
|
28
|
+
config.password = 'YOUR PASSWORD'
|
29
|
+
end
|
30
|
+
|
31
|
+
api_instance = PulpcoreClient::RepositoriesReclaimSpaceApi.new
|
32
|
+
reclaim_space = PulpcoreClient::ReclaimSpace.new # ReclaimSpace |
|
33
|
+
|
34
|
+
begin
|
35
|
+
result = api_instance.reclaim(reclaim_space)
|
36
|
+
p result
|
37
|
+
rescue PulpcoreClient::ApiError => e
|
38
|
+
puts "Exception when calling RepositoriesReclaimSpaceApi->reclaim: #{e}"
|
39
|
+
end
|
40
|
+
```
|
41
|
+
|
42
|
+
### Parameters
|
43
|
+
|
44
|
+
|
45
|
+
Name | Type | Description | Notes
|
46
|
+
------------- | ------------- | ------------- | -------------
|
47
|
+
**reclaim_space** | [**ReclaimSpace**](ReclaimSpace.md)| |
|
48
|
+
|
49
|
+
### Return type
|
50
|
+
|
51
|
+
[**AsyncOperationResponse**](AsyncOperationResponse.md)
|
52
|
+
|
53
|
+
### Authorization
|
54
|
+
|
55
|
+
[basicAuth](../README.md#basicAuth)
|
56
|
+
|
57
|
+
### HTTP request headers
|
58
|
+
|
59
|
+
- **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
|
60
|
+
- **Accept**: application/json
|
61
|
+
|
data/docs/RepositoryResponse.md
CHANGED
@@ -11,8 +11,8 @@ Name | Type | Description | Notes
|
|
11
11
|
**latest_version_href** | **String** | | [optional] [readonly]
|
12
12
|
**name** | **String** | A unique name for this repository. |
|
13
13
|
**description** | **String** | An optional description. | [optional]
|
14
|
-
**
|
15
|
-
**remote** | **String** |
|
14
|
+
**retain_repo_versions** | **Integer** | Retain X versions of the repository. Default is null which retains all versions. This is provided as a tech preview in Pulp 3 and may change in the future. | [optional]
|
15
|
+
**remote** | **String** | An optional remote to use by default when syncing. | [optional]
|
16
16
|
|
17
17
|
## Code Sample
|
18
18
|
|
@@ -26,7 +26,7 @@ instance = PulpcoreClient::RepositoryResponse.new(pulp_href: null,
|
|
26
26
|
latest_version_href: null,
|
27
27
|
name: null,
|
28
28
|
description: null,
|
29
|
-
|
29
|
+
retain_repo_versions: null,
|
30
30
|
remote: null)
|
31
31
|
```
|
32
32
|
|
data/docs/SigningServicesApi.md
CHANGED
data/docs/StatusApi.md
CHANGED
data/docs/TaskGroupsApi.md
CHANGED
data/docs/TasksApi.md
CHANGED
data/docs/UploadsApi.md
CHANGED
data/docs/UsersApi.md
CHANGED
data/docs/WorkersApi.md
CHANGED
data/git_push.sh
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
3
|
+
#
|
4
|
+
# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com"
|
5
|
+
|
6
|
+
git_user_id=$1
|
7
|
+
git_repo_id=$2
|
8
|
+
release_note=$3
|
9
|
+
git_host=$4
|
10
|
+
|
11
|
+
if [ "$git_host" = "" ]; then
|
12
|
+
git_host="github.com"
|
13
|
+
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
14
|
+
fi
|
15
|
+
|
16
|
+
if [ "$git_user_id" = "" ]; then
|
17
|
+
git_user_id="GIT_USER_ID"
|
18
|
+
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
19
|
+
fi
|
20
|
+
|
21
|
+
if [ "$git_repo_id" = "" ]; then
|
22
|
+
git_repo_id="GIT_REPO_ID"
|
23
|
+
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
24
|
+
fi
|
25
|
+
|
26
|
+
if [ "$release_note" = "" ]; then
|
27
|
+
release_note="Minor update"
|
28
|
+
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
29
|
+
fi
|
30
|
+
|
31
|
+
# Initialize the local directory as a Git repository
|
32
|
+
git init
|
33
|
+
|
34
|
+
# Adds the files in the local repository and stages them for commit.
|
35
|
+
git add .
|
36
|
+
|
37
|
+
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
38
|
+
git commit -m "$release_note"
|
39
|
+
|
40
|
+
# Sets the new remote
|
41
|
+
git_remote=`git remote`
|
42
|
+
if [ "$git_remote" = "" ]; then # git remote not defined
|
43
|
+
|
44
|
+
if [ "$GIT_TOKEN" = "" ]; then
|
45
|
+
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
46
|
+
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
47
|
+
else
|
48
|
+
git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git
|
49
|
+
fi
|
50
|
+
|
51
|
+
fi
|
52
|
+
|
53
|
+
git pull origin master
|
54
|
+
|
55
|
+
# Pushes (Forces) the changes in the local repository up to the remote repository
|
56
|
+
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
57
|
+
git push origin master 2>&1 | grep -v 'To https'
|
58
|
+
|