emasser 3.4.1 → 3.12.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/.dockerignore +8 -8
- data/.env-example +12 -12
- data/.github/release-drafter.yml +15 -15
- data/.github/workflows/codeql-analysis.yml +70 -70
- data/.github/workflows/draft-release.yml +15 -15
- data/.github/workflows/gh-pages.yml +32 -32
- data/.github/workflows/push-to-docker-mail.yml +28 -28
- data/.github/workflows/push-to-docker.yml +35 -35
- data/.github/workflows/release.yml +42 -42
- data/.github/workflows/rubocop.yml +23 -23
- data/.github/workflows/test-cli.yml +39 -72
- data/.gitignore +19 -19
- data/.mergify.yml +25 -25
- data/.rubocop.yml +83 -80
- data/.rubocop_todo.yml +27 -27
- data/CHANGELOG.md +66 -16
- data/Dockerfile +44 -44
- data/Gemfile +8 -8
- data/Gemfile.lock +108 -104
- data/LICENSE.md +15 -15
- data/README.md +179 -178
- data/Rakefile +18 -18
- data/_config.yml +1 -1
- data/docs/features.md +1677 -1437
- data/docs/redoc/index.html +1230 -1230
- data/emasser.gemspec +44 -44
- data/exe/emasser +5 -5
- data/lib/emasser/cli.rb +37 -37
- data/lib/emasser/configuration.rb +49 -49
- data/lib/emasser/constants.rb +22 -26
- data/lib/emasser/delete.rb +210 -148
- data/lib/emasser/errors.rb +14 -14
- data/lib/emasser/get.rb +1401 -949
- data/lib/emasser/help/approvalCac_post_mapper.md +20 -20
- data/lib/emasser/help/approvalPac_post_mapper.md +20 -20
- data/lib/emasser/help/artifacts_del_mapper.md +9 -9
- data/lib/emasser/help/artifacts_post_mapper.md +59 -59
- data/lib/emasser/help/artifacts_put_mapper.md +34 -34
- data/lib/emasser/help/cloudresource_post_mapper.md +62 -62
- data/lib/emasser/help/cmmc_get_mapper.md +4 -4
- data/lib/emasser/help/container_post_mapper.md +44 -44
- data/lib/emasser/help/controls_put_mapper.md +74 -74
- data/lib/emasser/help/milestone_del_mapper.md +11 -11
- data/lib/emasser/help/milestone_post_mapper.md +14 -14
- data/lib/emasser/help/milestone_put_mapper.md +23 -23
- data/lib/emasser/help/poam_del_mapper.md +5 -5
- data/lib/emasser/help/poam_post_mapper.md +93 -93
- data/lib/emasser/help/poam_put_mapper.md +107 -107
- data/lib/emasser/help/staticcode_clear_mapper.md +16 -16
- data/lib/emasser/help/staticcode_post_mapper.md +21 -21
- data/lib/emasser/help/testresults_post_mapper.md +21 -21
- data/lib/emasser/help.rb +11 -11
- data/lib/emasser/input_converters.rb +21 -21
- data/lib/emasser/options_parser.rb +20 -20
- data/lib/emasser/output_converters.rb +125 -111
- data/lib/emasser/post.rb +830 -830
- data/lib/emasser/put.rb +588 -588
- data/lib/emasser/version.rb +5 -5
- data/lib/emasser.rb +19 -19
- metadata +16 -10
@@ -1,72 +1,39 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
#
|
31
|
-
#
|
32
|
-
#
|
33
|
-
|
34
|
-
name:
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
branches: [ main ]
|
41
|
-
|
42
|
-
jobs:
|
43
|
-
test:
|
44
|
-
strategy:
|
45
|
-
fail-fast: false
|
46
|
-
matrix:
|
47
|
-
platform: [ ubuntu-latest, macos-latest, windows-latest ]
|
48
|
-
ruby-version: ['2.6', '2.7']
|
49
|
-
runs-on: ${{ matrix.platform }}
|
50
|
-
steps:
|
51
|
-
- name: Setup Ruby ${{matrix.ruby}}
|
52
|
-
uses: ruby/setup-ruby@v1
|
53
|
-
with:
|
54
|
-
ruby-version: ${{ matrix.ruby-version }}
|
55
|
-
- uses: actions/checkout@v2
|
56
|
-
- uses: crazy-max/ghaction-chocolatey@v1
|
57
|
-
with:
|
58
|
-
args: install curl -y
|
59
|
-
if: matrix.platform == 'windows-latest'
|
60
|
-
- name: Testing on ${{ matrix.platform }} for Ruby ${{ matrix.ruby }}
|
61
|
-
if: matrix.platform == 'windows-latest'
|
62
|
-
run: |
|
63
|
-
# bundle install
|
64
|
-
# bundle info emass_client
|
65
|
-
# rspec spec --format documentation
|
66
|
-
echo "need to fix path to libcurl.dll"
|
67
|
-
- name: Testing on ${{ matrix.platform }} for Ruby ${{ matrix.ruby }}
|
68
|
-
if: matrix.platform == 'ubuntu-latest' || matrix.platform == 'macos-latest'
|
69
|
-
run: |
|
70
|
-
bundle install
|
71
|
-
bundle info emass_client
|
72
|
-
rspec spec --format documentation
|
1
|
+
name: Test emasser CLI
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ main ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ main ]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
test:
|
11
|
+
strategy:
|
12
|
+
fail-fast: false
|
13
|
+
matrix:
|
14
|
+
platform: [ ubuntu-latest, macos-latest, windows-latest ]
|
15
|
+
ruby-version: ['2.6', '2.7']
|
16
|
+
runs-on: ${{ matrix.platform }}
|
17
|
+
steps:
|
18
|
+
- name: Setup Ruby ${{matrix.ruby}}
|
19
|
+
uses: ruby/setup-ruby@v1
|
20
|
+
with:
|
21
|
+
ruby-version: ${{ matrix.ruby-version }}
|
22
|
+
- uses: actions/checkout@v4
|
23
|
+
- uses: crazy-max/ghaction-chocolatey@v1
|
24
|
+
with:
|
25
|
+
args: install curl -y
|
26
|
+
if: matrix.platform == 'windows-latest'
|
27
|
+
- name: Testing on ${{ matrix.platform }} for Ruby ${{ matrix.ruby }}
|
28
|
+
if: matrix.platform == 'windows-latest'
|
29
|
+
run: |
|
30
|
+
# bundle install
|
31
|
+
# bundle info emass_client
|
32
|
+
# rspec spec --format documentation
|
33
|
+
echo "need to fix path to libcurl.dll"
|
34
|
+
- name: Testing on ${{ matrix.platform }} for Ruby ${{ matrix.ruby }}
|
35
|
+
if: matrix.platform == 'ubuntu-latest' || matrix.platform == 'macos-latest'
|
36
|
+
run: |
|
37
|
+
bundle install
|
38
|
+
bundle info emass_client
|
39
|
+
rspec spec --format documentation
|
data/.gitignore
CHANGED
@@ -1,19 +1,19 @@
|
|
1
|
-
/.bundle/
|
2
|
-
/.yardoc
|
3
|
-
/_yardoc/
|
4
|
-
/coverage/
|
5
|
-
/doc/
|
6
|
-
/pkg/
|
7
|
-
/spec/reports/
|
8
|
-
/tmp/
|
9
|
-
/emasser_secrets
|
10
|
-
/.vscode
|
11
|
-
|
12
|
-
**/*.un~
|
13
|
-
|
14
|
-
.DS_Store
|
15
|
-
.byebug_history
|
16
|
-
.env
|
17
|
-
key.pem
|
18
|
-
client.pem
|
19
|
-
*.gem
|
1
|
+
/.bundle/
|
2
|
+
/.yardoc
|
3
|
+
/_yardoc/
|
4
|
+
/coverage/
|
5
|
+
/doc/
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/tmp/
|
9
|
+
/emasser_secrets
|
10
|
+
/.vscode
|
11
|
+
|
12
|
+
**/*.un~
|
13
|
+
|
14
|
+
.DS_Store
|
15
|
+
.byebug_history
|
16
|
+
.env
|
17
|
+
key.pem
|
18
|
+
client.pem
|
19
|
+
*.gem
|
data/.mergify.yml
CHANGED
@@ -1,25 +1,25 @@
|
|
1
|
-
queue_rules:
|
2
|
-
- name: default
|
3
|
-
conditions:
|
4
|
-
- "#approved-reviews-by>=1"
|
5
|
-
- base=main
|
6
|
-
|
7
|
-
pull_request_rules:
|
8
|
-
- name: automatic merge for master when reviewed and CI passes
|
9
|
-
conditions:
|
10
|
-
- label=ready-to-merge
|
11
|
-
actions:
|
12
|
-
queue:
|
13
|
-
name: default
|
14
|
-
method: squash
|
15
|
-
- name: delete head branch after merge
|
16
|
-
conditions:
|
17
|
-
- merged
|
18
|
-
actions:
|
19
|
-
delete_head_branch: {}
|
20
|
-
- name: ask developers to resolve conflict
|
21
|
-
conditions:
|
22
|
-
- conflict
|
23
|
-
actions:
|
24
|
-
comment:
|
25
|
-
message: This pull request has a conflict. Could you fix it @{{author}}?
|
1
|
+
queue_rules:
|
2
|
+
- name: default
|
3
|
+
conditions:
|
4
|
+
- "#approved-reviews-by>=1"
|
5
|
+
- base=main
|
6
|
+
|
7
|
+
pull_request_rules:
|
8
|
+
- name: automatic merge for master when reviewed and CI passes
|
9
|
+
conditions:
|
10
|
+
- label=ready-to-merge
|
11
|
+
actions:
|
12
|
+
queue:
|
13
|
+
name: default
|
14
|
+
method: squash
|
15
|
+
- name: delete head branch after merge
|
16
|
+
conditions:
|
17
|
+
- merged
|
18
|
+
actions:
|
19
|
+
delete_head_branch: {}
|
20
|
+
- name: ask developers to resolve conflict
|
21
|
+
conditions:
|
22
|
+
- conflict
|
23
|
+
actions:
|
24
|
+
comment:
|
25
|
+
message: This pull request has a conflict. Could you fix it @{{author}}?
|
data/.rubocop.yml
CHANGED
@@ -1,80 +1,83 @@
|
|
1
|
-
---
|
2
|
-
inherit_from: .rubocop_todo.yml
|
3
|
-
|
4
|
-
require:
|
5
|
-
- rubocop-minitest
|
6
|
-
- rubocop-performance
|
7
|
-
- rubocop-rake
|
8
|
-
|
9
|
-
AllCops:
|
10
|
-
TargetRubyVersion: 2.5
|
11
|
-
NewCops: enable
|
12
|
-
Exclude:
|
13
|
-
- 'emass_client/ruby_client/**/*'
|
14
|
-
- Gemfile
|
15
|
-
- Rakefile
|
16
|
-
- 'test/**/*'
|
17
|
-
- '*.gemspec'
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
'%
|
42
|
-
'%
|
43
|
-
'%
|
44
|
-
'%
|
45
|
-
'%
|
46
|
-
'%
|
47
|
-
'%
|
48
|
-
'%
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
1
|
+
---
|
2
|
+
inherit_from: .rubocop_todo.yml
|
3
|
+
|
4
|
+
require:
|
5
|
+
- rubocop-minitest
|
6
|
+
- rubocop-performance
|
7
|
+
- rubocop-rake
|
8
|
+
|
9
|
+
AllCops:
|
10
|
+
TargetRubyVersion: 2.5
|
11
|
+
NewCops: enable
|
12
|
+
Exclude:
|
13
|
+
- 'emass_client/ruby_client/**/*'
|
14
|
+
- Gemfile
|
15
|
+
- Rakefile
|
16
|
+
- 'test/**/*'
|
17
|
+
- '*.gemspec'
|
18
|
+
- '.env'
|
19
|
+
|
20
|
+
#Cops in Metrics might need to be adjusted to past their defaults depending on how restrictive the requirements feel
|
21
|
+
Style/Documentation:
|
22
|
+
Enabled: false
|
23
|
+
Layout/ParameterAlignment:
|
24
|
+
Enabled: true
|
25
|
+
Style/Encoding:
|
26
|
+
Enabled: false
|
27
|
+
Style/HashSyntax:
|
28
|
+
Enabled: true
|
29
|
+
Layout/LineLength:
|
30
|
+
Enabled: false
|
31
|
+
Layout/EmptyLinesAroundBlockBody:
|
32
|
+
Enabled: false
|
33
|
+
Style/NumericLiterals:
|
34
|
+
MinDigits: 10
|
35
|
+
Metrics/ModuleLength:
|
36
|
+
Enabled: false
|
37
|
+
Metrics/ClassLength:
|
38
|
+
Enabled: false
|
39
|
+
Style/PercentLiteralDelimiters:
|
40
|
+
PreferredDelimiters:
|
41
|
+
'%': '{}'
|
42
|
+
'%i': ()
|
43
|
+
'%q': '{}'
|
44
|
+
'%Q': ()
|
45
|
+
'%r': '{}'
|
46
|
+
'%s': ()
|
47
|
+
'%w': '{}'
|
48
|
+
'%W': ()
|
49
|
+
'%x': ()
|
50
|
+
Layout/HashAlignment:
|
51
|
+
Enabled: false
|
52
|
+
Naming/PredicateName:
|
53
|
+
Enabled: false
|
54
|
+
Style/ClassAndModuleChildren:
|
55
|
+
Enabled: false
|
56
|
+
Style/ConditionalAssignment:
|
57
|
+
Enabled: false
|
58
|
+
Style/AndOr:
|
59
|
+
Enabled: false
|
60
|
+
Style/Not:
|
61
|
+
Enabled: false
|
62
|
+
Naming/FileName:
|
63
|
+
Enabled: false
|
64
|
+
Style/TrailingCommaInArrayLiteral:
|
65
|
+
EnforcedStyleForMultiline: comma
|
66
|
+
Style/TrailingCommaInArguments:
|
67
|
+
EnforcedStyleForMultiline: comma
|
68
|
+
Style/NegatedIf:
|
69
|
+
Enabled: false
|
70
|
+
Style/UnlessElse:
|
71
|
+
Enabled: false
|
72
|
+
Style/BlockDelimiters:
|
73
|
+
Enabled: false
|
74
|
+
Layout/SpaceAroundOperators:
|
75
|
+
Enabled: false
|
76
|
+
Style/IfUnlessModifier:
|
77
|
+
Enabled: false
|
78
|
+
Style/FrozenStringLiteralComment:
|
79
|
+
Enabled: false
|
80
|
+
Style/SignalException:
|
81
|
+
Enabled: false
|
82
|
+
Layout/EndOfLine:
|
83
|
+
EnforcedStyle: lf
|
data/.rubocop_todo.yml
CHANGED
@@ -1,27 +1,27 @@
|
|
1
|
-
# This configuration was generated by
|
2
|
-
# `rubocop --auto-gen-config`
|
3
|
-
# on 2021-12-22 16:48:47 UTC using RuboCop version 1.23.0.
|
4
|
-
# The point is for the user to remove these configuration records
|
5
|
-
# one by one as the offenses are removed from the code base.
|
6
|
-
# Note that changes in the inspected code, or installation of new
|
7
|
-
# versions of RuboCop, may require this file to be generated again.
|
8
|
-
|
9
|
-
# Offense count: 21
|
10
|
-
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
|
11
|
-
Metrics/AbcSize:
|
12
|
-
Max: 190
|
13
|
-
|
14
|
-
# Offense count: 17
|
15
|
-
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
|
16
|
-
Metrics/MethodLength:
|
17
|
-
Max: 78
|
18
|
-
|
19
|
-
# Offense count: 11
|
20
|
-
# Cop supports --auto-correct.
|
21
|
-
# Configuration parameters: PreferredDelimiters.
|
22
|
-
Style/PercentLiteralDelimiters:
|
23
|
-
Exclude:
|
24
|
-
- 'lib/emasser/get.rb'
|
25
|
-
- 'lib/emasser/options_parser.rb'
|
26
|
-
- 'lib/emasser/post.rb'
|
27
|
-
- 'lib/emasser/put.rb'
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2021-12-22 16:48:47 UTC using RuboCop version 1.23.0.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
# Offense count: 21
|
10
|
+
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
|
11
|
+
Metrics/AbcSize:
|
12
|
+
Max: 190
|
13
|
+
|
14
|
+
# Offense count: 17
|
15
|
+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
|
16
|
+
Metrics/MethodLength:
|
17
|
+
Max: 78
|
18
|
+
|
19
|
+
# Offense count: 11
|
20
|
+
# Cop supports --auto-correct.
|
21
|
+
# Configuration parameters: PreferredDelimiters.
|
22
|
+
Style/PercentLiteralDelimiters:
|
23
|
+
Exclude:
|
24
|
+
- 'lib/emasser/get.rb'
|
25
|
+
- 'lib/emasser/options_parser.rb'
|
26
|
+
- 'lib/emasser/post.rb'
|
27
|
+
- 'lib/emasser/put.rb'
|
data/CHANGELOG.md
CHANGED
@@ -1,16 +1,66 @@
|
|
1
|
-
# Changelog
|
2
|
-
All notable changes to this project will be documented in this file.
|
3
|
-
|
4
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
|
-
|
7
|
-
## [
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
1
|
+
# Changelog
|
2
|
+
All notable changes to this project will be documented in this file.
|
3
|
+
|
4
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
|
+
|
7
|
+
## [3.12.0] Oct 11, 2023
|
8
|
+
### Changes
|
9
|
+
- Implemented eMASS API V3.12 specifications (to include previous updates)
|
10
|
+
|
11
|
+
## [3.10.0] Jun 27, 2023
|
12
|
+
### Changes
|
13
|
+
- Implemented eMASS API 3.10 specifications
|
14
|
+
|
15
|
+
## [3.4.1] Oct 7, 2022
|
16
|
+
### Changes
|
17
|
+
- Included the ability to register NPE credentials and obtain the Api key api-key
|
18
|
+
|
19
|
+
## [3.4.0] Sep 22, 2022
|
20
|
+
### Changes
|
21
|
+
- Implemented API specifications V3.4
|
22
|
+
- Changed release version to match API specificationa
|
23
|
+
|
24
|
+
## [1.0.6] Jun 17, 2022
|
25
|
+
### Changes
|
26
|
+
- addMultiplePackages
|
27
|
+
|
28
|
+
## [1.0.3] Jan 14, 2022
|
29
|
+
### Changes
|
30
|
+
- UpdateVersionTags
|
31
|
+
|
32
|
+
## [1.0.2] Jan 14, 2022
|
33
|
+
### Changes
|
34
|
+
- updateCLI_Help
|
35
|
+
|
36
|
+
## [1.0.1] Jan 3, 2022
|
37
|
+
### Changes
|
38
|
+
- Rename swagger_client to emass_client and publish it to rubygems.
|
39
|
+
|
40
|
+
## [1.0.0] - Dec 29, 2021
|
41
|
+
### Changes
|
42
|
+
- addReleaseWorkflow @georgedias (#26)
|
43
|
+
- create test-cli workflow @georgedias (#25)
|
44
|
+
- Add cli tests @georgedias (#24)
|
45
|
+
- Add the stoplight prism mock server as a server selection @georgedias (#23)
|
46
|
+
- Update eMASSRestOpenApi.yaml @georgedias (#22)
|
47
|
+
- ci(Mergify): configuration update @camdenmoors (#21)
|
48
|
+
- fix_gh_pages @georgedias (#18)
|
49
|
+
- Fixed the removal of jekyll thene when updating the gh_pages @georgedias (#17)
|
50
|
+
- Add workflow to update markdown files in gh-pages @georgedias (#15)
|
51
|
+
- Udates to the emasser features documentation @georgedias (#13)
|
52
|
+
- corrected controls post/put requests @georgedias (#9)
|
53
|
+
- Added eMASS contact information to the README @georgedias (#8)
|
54
|
+
- Update eMASSOpenAPI specification, add redoc and swagger documentation @rbclark (#6)
|
55
|
+
|
56
|
+
### Features
|
57
|
+
|
58
|
+
- Initial workflow configuration @georgedias (#10)
|
59
|
+
|
60
|
+
## [0.2.0] - 2020-12-14
|
61
|
+
### Added
|
62
|
+
- Scaffolding for the emasser project including such things as a Dockerfile, a .gitlab-ci.yml, some repository dependencies such as `standard` and `minitest`, and some gem dependencies such as `thor`.
|
63
|
+
|
64
|
+
## [0.1.0] - 2020-12-10
|
65
|
+
### Added
|
66
|
+
- Put in MITRE's particular license modifications and notices.
|
data/Dockerfile
CHANGED
@@ -1,44 +1,44 @@
|
|
1
|
-
# Buld from ruby 2.7.5 image
|
2
|
-
FROM ruby:2.7.5 as build
|
3
|
-
|
4
|
-
LABEL name="emasser" \
|
5
|
-
vendor="MITRE" \
|
6
|
-
version="${EMASSER_VERSION}" \
|
7
|
-
release="1" \
|
8
|
-
url="https://github.com/mitre/emasser" \
|
9
|
-
description="Emasser is a command-line interface (CLI) that aims to automate routine business use-cases and provide utility surrounding the Enterprise Mission Assurance Support Service (eMASS) by leveraging its representational state transfer (REST) application programming interface (API)." \
|
10
|
-
docs="https://mitre.github.io/emasser/" \
|
11
|
-
run="docker run -d --name ${NAME} ${IMAGE} <args>"
|
12
|
-
|
13
|
-
# Set the base directory that will be used from now on
|
14
|
-
WORKDIR /emasser
|
15
|
-
|
16
|
-
# Install dependency
|
17
|
-
RUN gem install bundler -v '2.3.5'
|
18
|
-
RUN apt update && apt install -y build-essential
|
19
|
-
COPY . .
|
20
|
-
RUN bundle install
|
21
|
-
# WORKDIR /emasser/emass_client/ruby_client
|
22
|
-
# RUN gem build emass_client.gemspec
|
23
|
-
WORKDIR /emasser
|
24
|
-
RUN gem build emasser.gemspec
|
25
|
-
RUN mkdir gems
|
26
|
-
# RUN mv emass_client/ruby_client/emass_client*.gem gems/emass_client.gem
|
27
|
-
RUN mv emasser*.gem gems/emasser.gem
|
28
|
-
|
29
|
-
|
30
|
-
FROM ruby:2-alpine
|
31
|
-
|
32
|
-
# Use the line below when testing creating the container locally
|
33
|
-
# RUN sed -i 's/https/http/g' /etc/apk/repositories
|
34
|
-
COPY --from=build /emasser/gems /emass-gems
|
35
|
-
|
36
|
-
# RUN apk add build-base libcurl && gem install /emass-gems/emass_client.gem && gem install /emass-gems/emasser.gem
|
37
|
-
RUN apk add build-base libcurl && gem install /emass-gems/emasser.gem
|
38
|
-
|
39
|
-
VOLUME [ "/data" ]
|
40
|
-
WORKDIR /data
|
41
|
-
|
42
|
-
ENTRYPOINT ["emasser"]
|
43
|
-
|
44
|
-
CMD ["-h"]
|
1
|
+
# Buld from ruby 2.7.5 image
|
2
|
+
FROM ruby:2.7.5 as build
|
3
|
+
|
4
|
+
LABEL name="emasser" \
|
5
|
+
vendor="MITRE" \
|
6
|
+
version="${EMASSER_VERSION}" \
|
7
|
+
release="1" \
|
8
|
+
url="https://github.com/mitre/emasser" \
|
9
|
+
description="Emasser is a command-line interface (CLI) that aims to automate routine business use-cases and provide utility surrounding the Enterprise Mission Assurance Support Service (eMASS) by leveraging its representational state transfer (REST) application programming interface (API)." \
|
10
|
+
docs="https://mitre.github.io/emasser/" \
|
11
|
+
run="docker run -d --name ${NAME} ${IMAGE} <args>"
|
12
|
+
|
13
|
+
# Set the base directory that will be used from now on
|
14
|
+
WORKDIR /emasser
|
15
|
+
|
16
|
+
# Install dependency
|
17
|
+
RUN gem install bundler -v '2.3.5'
|
18
|
+
RUN apt update && apt install -y build-essential
|
19
|
+
COPY . .
|
20
|
+
RUN bundle install
|
21
|
+
# WORKDIR /emasser/emass_client/ruby_client
|
22
|
+
# RUN gem build emass_client.gemspec
|
23
|
+
WORKDIR /emasser
|
24
|
+
RUN gem build emasser.gemspec
|
25
|
+
RUN mkdir gems
|
26
|
+
# RUN mv emass_client/ruby_client/emass_client*.gem gems/emass_client.gem
|
27
|
+
RUN mv emasser*.gem gems/emasser.gem
|
28
|
+
|
29
|
+
|
30
|
+
FROM ruby:2-alpine
|
31
|
+
|
32
|
+
# Use the line below when testing creating the container locally
|
33
|
+
# RUN sed -i 's/https/http/g' /etc/apk/repositories
|
34
|
+
COPY --from=build /emasser/gems /emass-gems
|
35
|
+
|
36
|
+
# RUN apk add build-base libcurl && gem install /emass-gems/emass_client.gem && gem install /emass-gems/emasser.gem
|
37
|
+
RUN apk add build-base libcurl && gem install /emass-gems/emasser.gem
|
38
|
+
|
39
|
+
VOLUME [ "/data" ]
|
40
|
+
WORKDIR /data
|
41
|
+
|
42
|
+
ENTRYPOINT ["emasser"]
|
43
|
+
|
44
|
+
CMD ["-h"]
|
data/Gemfile
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
source 'https://rubygems.org'
|
4
|
-
|
5
|
-
# Specify your gem's dependencies in emasser.gemspec
|
6
|
-
gemspec
|
7
|
-
|
8
|
-
#gem 'emass_client', path: './emass_client/ruby_client/'
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source 'https://rubygems.org'
|
4
|
+
|
5
|
+
# Specify your gem's dependencies in emasser.gemspec
|
6
|
+
gemspec
|
7
|
+
|
8
|
+
#gem 'emass_client', path: './emass_client/ruby_client/'
|