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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b90b832b57672567d46686a6c1e490a2f61ea08fae87709b2db7e5ee7f789bb
|
4
|
+
data.tar.gz: 312b2c6c4a56d40c1ac5fdefae3ee36f745af244a5f0e4839cf6b40796b53b14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50272e2670c607779a0365c352b7def9cbbb9b2dacab88811edbf0bd198a0b5e80e1c1111b5aebb13e5dd6e48cbf28a4a2304c86145841dbbd08325bdeafcaa2
|
7
|
+
data.tar.gz: 7853329f250ab9aa7af9420d6d706aaf8d6fa0caf3471c3da179370552a00ba33ca161e0ea1d5c406b9d8e0b815bfe0fcec3b42d99bd5fe9211b3567db08b461
|
data/.dockerignore
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
# VS Code
|
2
|
-
.vscode/
|
3
|
-
|
4
|
-
# doc
|
5
|
-
doc/
|
6
|
-
|
7
|
-
# code
|
8
|
-
spec/
|
1
|
+
# VS Code
|
2
|
+
.vscode/
|
3
|
+
|
4
|
+
# doc
|
5
|
+
doc/
|
6
|
+
|
7
|
+
# code
|
8
|
+
spec/
|
data/.env-example
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
export
|
2
|
-
export
|
3
|
-
export
|
4
|
-
export EMASSER_KEY_FILE_PATH=<path to your emass key in PEM format>
|
5
|
-
export EMASSER_CERT_FILE_PATH=<path to your emass certificate in PEM format>
|
6
|
-
export
|
7
|
-
export EMASSER_CLIENT_SIDE_VALIDATION=<client side validation - true or false>
|
8
|
-
export EMASSER_VERIFY_SSL=<verify SSL - true or false>
|
9
|
-
export EMASSER_VERIFY_SSL_HOST=<verify host SSL - true or false>
|
10
|
-
export EMASSER_DEBUGGING=<set debugging - true or false>
|
11
|
-
export EMASSER_CLI_DISPLAY_NULL=<display null value fields - true or false>
|
12
|
-
export EMASSER_EPOCH_TO_DATETIME=<convert epoch to data/time value - true or false>
|
1
|
+
export EMASSER_API_KEY=<API key>
|
2
|
+
export EMASSER_USER_UID=<unique identifier of the eMASS user EMASSER_API_KEY belongs to>
|
3
|
+
export EMASSER_HOST_URL=<FQDN of the eMASS server>
|
4
|
+
export EMASSER_KEY_FILE_PATH=<path to your emass key in PEM format>
|
5
|
+
export EMASSER_CERT_FILE_PATH=<path to your emass certificate in PEM format>
|
6
|
+
export EMASSER_KEY_FILE_PASSWORD=<password for the key given in EMASSER_KEY_FILE_PATH>
|
7
|
+
export EMASSER_CLIENT_SIDE_VALIDATION=<client side validation - true or false>
|
8
|
+
export EMASSER_VERIFY_SSL=<verify SSL - true or false>
|
9
|
+
export EMASSER_VERIFY_SSL_HOST=<verify host SSL - true or false>
|
10
|
+
export EMASSER_DEBUGGING=<set debugging - true or false>
|
11
|
+
export EMASSER_CLI_DISPLAY_NULL=<display null value fields - true or false>
|
12
|
+
export EMASSER_EPOCH_TO_DATETIME=<convert epoch to data/time value - true or false>
|
data/.github/release-drafter.yml
CHANGED
@@ -1,16 +1,16 @@
|
|
1
|
-
name-template: '$NEXT_PATCH_VERSION'
|
2
|
-
tag-template: '$NEXT_PATCH_VERSION'
|
3
|
-
categories:
|
4
|
-
- title: 'Features'
|
5
|
-
labels:
|
6
|
-
- 'feature'
|
7
|
-
- 'enhancement'
|
8
|
-
- title: 'Bug Fixes'
|
9
|
-
labels:
|
10
|
-
- 'fix'
|
11
|
-
- 'bugfix'
|
12
|
-
- 'bug'
|
13
|
-
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
|
14
|
-
template: |
|
15
|
-
## Changes
|
1
|
+
name-template: '$NEXT_PATCH_VERSION'
|
2
|
+
tag-template: '$NEXT_PATCH_VERSION'
|
3
|
+
categories:
|
4
|
+
- title: 'Features'
|
5
|
+
labels:
|
6
|
+
- 'feature'
|
7
|
+
- 'enhancement'
|
8
|
+
- title: 'Bug Fixes'
|
9
|
+
labels:
|
10
|
+
- 'fix'
|
11
|
+
- 'bugfix'
|
12
|
+
- 'bug'
|
13
|
+
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
|
14
|
+
template: |
|
15
|
+
## Changes
|
16
16
|
$CHANGES
|
@@ -1,70 +1,70 @@
|
|
1
|
-
# For most projects, this workflow file will not need changing; you simply need
|
2
|
-
# to commit it to your repository.
|
3
|
-
#
|
4
|
-
# You may wish to alter this file to override the set of languages analyzed,
|
5
|
-
# or to provide custom queries or build logic.
|
6
|
-
#
|
7
|
-
# ******** NOTE ********
|
8
|
-
# We have attempted to detect the languages in your repository. Please check
|
9
|
-
# the `language` matrix defined below to confirm you have the correct set of
|
10
|
-
# supported CodeQL languages.
|
11
|
-
#
|
12
|
-
name: "CodeQL"
|
13
|
-
|
14
|
-
on:
|
15
|
-
push:
|
16
|
-
branches: [ main ]
|
17
|
-
pull_request:
|
18
|
-
# The branches below must be a subset of the branches above
|
19
|
-
branches: [ main ]
|
20
|
-
schedule:
|
21
|
-
- cron: '42 7 * * 3'
|
22
|
-
|
23
|
-
jobs:
|
24
|
-
analyze:
|
25
|
-
name: Analyze
|
26
|
-
runs-on: ubuntu-latest
|
27
|
-
permissions:
|
28
|
-
actions: read
|
29
|
-
contents: read
|
30
|
-
security-events: write
|
31
|
-
|
32
|
-
strategy:
|
33
|
-
fail-fast: false
|
34
|
-
matrix:
|
35
|
-
language: [ 'ruby' ]
|
36
|
-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
37
|
-
# Learn more about CodeQL language support at https://git.io/codeql-language-support
|
38
|
-
|
39
|
-
steps:
|
40
|
-
- name: Checkout repository
|
41
|
-
uses: actions/checkout@
|
42
|
-
|
43
|
-
# Initializes the CodeQL tools for scanning.
|
44
|
-
- name: Initialize CodeQL
|
45
|
-
uses: github/codeql-action/init@
|
46
|
-
with:
|
47
|
-
languages: ${{ matrix.language }}
|
48
|
-
# If you wish to specify custom queries, you can do so here or in a config file.
|
49
|
-
# By default, queries listed here will override any specified in a config file.
|
50
|
-
# Prefix the list here with "+" to use these queries and those in the config file.
|
51
|
-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
52
|
-
|
53
|
-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
54
|
-
# If this step fails, then you should remove it and run the build manually (see below)
|
55
|
-
- name: Autobuild
|
56
|
-
uses: github/codeql-action/autobuild@
|
57
|
-
|
58
|
-
# ℹ️ Command-line programs to run using the OS shell.
|
59
|
-
# 📚 https://git.io/JvXDl
|
60
|
-
|
61
|
-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
62
|
-
# and modify them (or add more) to build your code if your project
|
63
|
-
# uses a compiled language
|
64
|
-
|
65
|
-
#- run: |
|
66
|
-
# make bootstrap
|
67
|
-
# make release
|
68
|
-
|
69
|
-
- name: Perform CodeQL Analysis
|
70
|
-
uses: github/codeql-action/analyze@
|
1
|
+
# For most projects, this workflow file will not need changing; you simply need
|
2
|
+
# to commit it to your repository.
|
3
|
+
#
|
4
|
+
# You may wish to alter this file to override the set of languages analyzed,
|
5
|
+
# or to provide custom queries or build logic.
|
6
|
+
#
|
7
|
+
# ******** NOTE ********
|
8
|
+
# We have attempted to detect the languages in your repository. Please check
|
9
|
+
# the `language` matrix defined below to confirm you have the correct set of
|
10
|
+
# supported CodeQL languages.
|
11
|
+
#
|
12
|
+
name: "CodeQL"
|
13
|
+
|
14
|
+
on:
|
15
|
+
push:
|
16
|
+
branches: [ main ]
|
17
|
+
pull_request:
|
18
|
+
# The branches below must be a subset of the branches above
|
19
|
+
branches: [ main ]
|
20
|
+
schedule:
|
21
|
+
- cron: '42 7 * * 3'
|
22
|
+
|
23
|
+
jobs:
|
24
|
+
analyze:
|
25
|
+
name: Analyze
|
26
|
+
runs-on: ubuntu-latest
|
27
|
+
permissions:
|
28
|
+
actions: read
|
29
|
+
contents: read
|
30
|
+
security-events: write
|
31
|
+
|
32
|
+
strategy:
|
33
|
+
fail-fast: false
|
34
|
+
matrix:
|
35
|
+
language: [ 'ruby' ]
|
36
|
+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
37
|
+
# Learn more about CodeQL language support at https://git.io/codeql-language-support
|
38
|
+
|
39
|
+
steps:
|
40
|
+
- name: Checkout repository
|
41
|
+
uses: actions/checkout@v4
|
42
|
+
|
43
|
+
# Initializes the CodeQL tools for scanning.
|
44
|
+
- name: Initialize CodeQL
|
45
|
+
uses: github/codeql-action/init@v2
|
46
|
+
with:
|
47
|
+
languages: ${{ matrix.language }}
|
48
|
+
# If you wish to specify custom queries, you can do so here or in a config file.
|
49
|
+
# By default, queries listed here will override any specified in a config file.
|
50
|
+
# Prefix the list here with "+" to use these queries and those in the config file.
|
51
|
+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
52
|
+
|
53
|
+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
54
|
+
# If this step fails, then you should remove it and run the build manually (see below)
|
55
|
+
- name: Autobuild
|
56
|
+
uses: github/codeql-action/autobuild@v2
|
57
|
+
|
58
|
+
# ℹ️ Command-line programs to run using the OS shell.
|
59
|
+
# 📚 https://git.io/JvXDl
|
60
|
+
|
61
|
+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
62
|
+
# and modify them (or add more) to build your code if your project
|
63
|
+
# uses a compiled language
|
64
|
+
|
65
|
+
#- run: |
|
66
|
+
# make bootstrap
|
67
|
+
# make release
|
68
|
+
|
69
|
+
- name: Perform CodeQL Analysis
|
70
|
+
uses: github/codeql-action/analyze@v2
|
@@ -1,16 +1,16 @@
|
|
1
|
-
name: Draft Release
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
# branches to consider in the event; optional, defaults to all
|
6
|
-
branches:
|
7
|
-
- main
|
8
|
-
|
9
|
-
jobs:
|
10
|
-
update_draft_release:
|
11
|
-
runs-on: ubuntu-latest
|
12
|
-
steps:
|
13
|
-
# Drafts your next Release notes as Pull Requests are merged into "main"
|
14
|
-
- uses: toolmantim/release-drafter@v5.2.0
|
15
|
-
env:
|
1
|
+
name: Draft Release
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
# branches to consider in the event; optional, defaults to all
|
6
|
+
branches:
|
7
|
+
- main
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
update_draft_release:
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
steps:
|
13
|
+
# Drafts your next Release notes as Pull Requests are merged into "main"
|
14
|
+
- uses: toolmantim/release-drafter@v5.2.0
|
15
|
+
env:
|
16
16
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
@@ -1,32 +1,32 @@
|
|
1
|
-
name: Deploy to GitHub Pages
|
2
|
-
on:
|
3
|
-
push:
|
4
|
-
branches: [ main ]
|
5
|
-
pull_request:
|
6
|
-
branches: [ main ]
|
7
|
-
|
8
|
-
jobs:
|
9
|
-
build-deploy:
|
10
|
-
runs-on: ubuntu-latest
|
11
|
-
name: Copy Markdown Files to gh_pages
|
12
|
-
steps:
|
13
|
-
- name: Checkout 🛎️
|
14
|
-
uses: actions/checkout@
|
15
|
-
|
16
|
-
- name: Build Deploment Folder 🔧
|
17
|
-
run: |
|
18
|
-
sudo mkdir -p /publish
|
19
|
-
sudo mkdir -p /publish/docs
|
20
|
-
sudo mkdir -p /publish/images
|
21
|
-
sudo cp -R ./images /publish
|
22
|
-
sudo cp README.md /publish
|
23
|
-
sudo cp _config.yml /publish/_config.yml
|
24
|
-
sudo cp ./docs/features.md /publish/docs/features.md
|
25
|
-
|
26
|
-
- name: Deploy Markdown Files 🚀
|
27
|
-
uses: peaceiris/actions-gh-pages@v3
|
28
|
-
with:
|
29
|
-
github_token: ${{ secrets.GITHUB_TOKEN }}
|
30
|
-
publish_dir: /publish
|
31
|
-
destination_dir: .
|
32
|
-
enable_jekyll: true
|
1
|
+
name: Deploy to GitHub Pages
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
branches: [ main ]
|
5
|
+
pull_request:
|
6
|
+
branches: [ main ]
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
build-deploy:
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
name: Copy Markdown Files to gh_pages
|
12
|
+
steps:
|
13
|
+
- name: Checkout 🛎️
|
14
|
+
uses: actions/checkout@v4
|
15
|
+
|
16
|
+
- name: Build Deploment Folder 🔧
|
17
|
+
run: |
|
18
|
+
sudo mkdir -p /publish
|
19
|
+
sudo mkdir -p /publish/docs
|
20
|
+
sudo mkdir -p /publish/images
|
21
|
+
sudo cp -R ./images /publish
|
22
|
+
sudo cp README.md /publish
|
23
|
+
sudo cp _config.yml /publish/_config.yml
|
24
|
+
sudo cp ./docs/features.md /publish/docs/features.md
|
25
|
+
|
26
|
+
- name: Deploy Markdown Files 🚀
|
27
|
+
uses: peaceiris/actions-gh-pages@v3
|
28
|
+
with:
|
29
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
30
|
+
publish_dir: /publish
|
31
|
+
destination_dir: .
|
32
|
+
enable_jekyll: true
|
@@ -1,28 +1,28 @@
|
|
1
|
-
name: Push emasser CLI to Docker Hub on every merge to master and tag as latest
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
branches: [ main ]
|
6
|
-
|
7
|
-
|
8
|
-
jobs:
|
9
|
-
docker:
|
10
|
-
runs-on: ubuntu-latest
|
11
|
-
steps:
|
12
|
-
- name: Set up Docker Buildx
|
13
|
-
uses: docker/setup-buildx-action@
|
14
|
-
- name: Login to DockerHub
|
15
|
-
uses: docker/login-action@
|
16
|
-
with:
|
17
|
-
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
18
|
-
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
19
|
-
- name: Checkout the
|
20
|
-
uses: actions/checkout@
|
21
|
-
- name: Build and push
|
22
|
-
id: docker_build
|
23
|
-
uses: docker/build-push-action@
|
24
|
-
with:
|
25
|
-
context: .
|
26
|
-
file: Dockerfile
|
27
|
-
push: true
|
28
|
-
tags: mitre/emasser:latest
|
1
|
+
name: Push emasser CLI to Docker Hub on every merge to master and tag as latest
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ main ]
|
6
|
+
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
docker:
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
steps:
|
12
|
+
- name: Set up Docker Buildx
|
13
|
+
uses: docker/setup-buildx-action@v2
|
14
|
+
- name: Login to DockerHub
|
15
|
+
uses: docker/login-action@v2
|
16
|
+
with:
|
17
|
+
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
18
|
+
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
19
|
+
- name: Checkout the eMASSer Repository
|
20
|
+
uses: actions/checkout@v4
|
21
|
+
- name: Build and push
|
22
|
+
id: docker_build
|
23
|
+
uses: docker/build-push-action@v3
|
24
|
+
with:
|
25
|
+
context: .
|
26
|
+
file: Dockerfile
|
27
|
+
push: true
|
28
|
+
tags: mitre/emasser:latest
|
@@ -1,35 +1,35 @@
|
|
1
|
-
name: Push emasser to Docker Hub on every release
|
2
|
-
|
3
|
-
on:
|
4
|
-
release:
|
5
|
-
types: [published]
|
6
|
-
|
7
|
-
jobs:
|
8
|
-
docker:
|
9
|
-
runs-on: ubuntu-latest
|
10
|
-
steps:
|
11
|
-
- name: Set up Docker Buildx
|
12
|
-
uses: docker/setup-buildx-action@
|
13
|
-
- name: Login to DockerHub
|
14
|
-
uses: docker/login-action@
|
15
|
-
with:
|
16
|
-
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
17
|
-
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
18
|
-
- name: Run string replace
|
19
|
-
uses: frabert/replace-string-action@master
|
20
|
-
id: format-tag
|
21
|
-
with:
|
22
|
-
pattern: 'v'
|
23
|
-
string: "${{ github.event.release.tag_name }}"
|
24
|
-
replace-with: ''
|
25
|
-
flags: 'g'
|
26
|
-
- name: Checkout the emasser Repository
|
27
|
-
uses: actions/checkout@
|
28
|
-
- name: Build and push
|
29
|
-
id: docker_build
|
30
|
-
uses: docker/build-push-action@
|
31
|
-
with:
|
32
|
-
context: .
|
33
|
-
file: Dockerfile
|
34
|
-
push: true
|
35
|
-
tags: mitre/emasser:release-latest,mitre/emasser:${{ steps.format-tag.outputs.replaced }}
|
1
|
+
name: Push emasser to Docker Hub on every release
|
2
|
+
|
3
|
+
on:
|
4
|
+
release:
|
5
|
+
types: [published]
|
6
|
+
|
7
|
+
jobs:
|
8
|
+
docker:
|
9
|
+
runs-on: ubuntu-latest
|
10
|
+
steps:
|
11
|
+
- name: Set up Docker Buildx
|
12
|
+
uses: docker/setup-buildx-action@v2
|
13
|
+
- name: Login to DockerHub
|
14
|
+
uses: docker/login-action@v2
|
15
|
+
with:
|
16
|
+
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
17
|
+
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
18
|
+
- name: Run string replace
|
19
|
+
uses: frabert/replace-string-action@master
|
20
|
+
id: format-tag
|
21
|
+
with:
|
22
|
+
pattern: 'v'
|
23
|
+
string: "${{ github.event.release.tag_name }}"
|
24
|
+
replace-with: ''
|
25
|
+
flags: 'g'
|
26
|
+
- name: Checkout the emasser Repository
|
27
|
+
uses: actions/checkout@v4
|
28
|
+
- name: Build and push
|
29
|
+
id: docker_build
|
30
|
+
uses: docker/build-push-action@v3
|
31
|
+
with:
|
32
|
+
context: .
|
33
|
+
file: Dockerfile
|
34
|
+
push: true
|
35
|
+
tags: mitre/emasser:release-latest,mitre/emasser:${{ steps.format-tag.outputs.replaced }}
|
@@ -1,42 +1,42 @@
|
|
1
|
-
name: Build and release gem
|
2
|
-
|
3
|
-
on:
|
4
|
-
release:
|
5
|
-
types: [published]
|
6
|
-
|
7
|
-
jobs:
|
8
|
-
release:
|
9
|
-
name: Release to gem hosts
|
10
|
-
runs-on: ubuntu-latest
|
11
|
-
steps:
|
12
|
-
- name: Setup ruby
|
13
|
-
uses: actions/setup-ruby@v1
|
14
|
-
- uses: actions/checkout@
|
15
|
-
with:
|
16
|
-
fetch-depth: 0
|
17
|
-
- run: git fetch origin +refs/tags/*:refs/tags/*
|
18
|
-
- name: Setup credentials and versioning
|
19
|
-
run: |
|
20
|
-
gem install keycutter
|
21
|
-
mkdir -p $HOME/.gem
|
22
|
-
touch $HOME/.gem/credentials
|
23
|
-
chmod 0600 $HOME/.gem/credentials
|
24
|
-
printf -- "---\n:rubygems_api_key: ${RUBYGEMS_API_KEY}\n" > $HOME/.gem/credentials
|
25
|
-
printf -- ":github: Bearer ${GPR_API_KEY}\n" >> $HOME/.gem/credentials
|
26
|
-
env:
|
27
|
-
RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}}
|
28
|
-
GPR_API_KEY: ${{secrets.GITHUB_TOKEN}}
|
29
|
-
- name: Build emasser
|
30
|
-
run: gem build *.gemspec
|
31
|
-
# - name: Build emass_client
|
32
|
-
# run: gem build -C emass_client/ruby_client/ emass_client.gemspec
|
33
|
-
- name: Publish to RubyGems
|
34
|
-
run: |
|
35
|
-
gem push --KEY rubygems --host https://rubygems.org *.gem
|
36
|
-
# gem push --KEY rubygems --host https://rubygems.org emass_client/ruby_client/*.gem
|
37
|
-
- name: Publish to GPR
|
38
|
-
run: |
|
39
|
-
gem push --KEY github --host https://rubygems.pkg.github.com/mitre *.gem
|
40
|
-
# gem push --KEY github --host https://rubygems.pkg.github.com/mitre emass_client/ruby_client/*.gem
|
41
|
-
env:
|
42
|
-
OWNER: mitre
|
1
|
+
name: Build and release gem
|
2
|
+
|
3
|
+
on:
|
4
|
+
release:
|
5
|
+
types: [published]
|
6
|
+
|
7
|
+
jobs:
|
8
|
+
release:
|
9
|
+
name: Release to gem hosts
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
steps:
|
12
|
+
- name: Setup ruby
|
13
|
+
uses: actions/setup-ruby@v1
|
14
|
+
- uses: actions/checkout@v4
|
15
|
+
with:
|
16
|
+
fetch-depth: 0
|
17
|
+
- run: git fetch origin +refs/tags/*:refs/tags/*
|
18
|
+
- name: Setup credentials and versioning
|
19
|
+
run: |
|
20
|
+
gem install keycutter
|
21
|
+
mkdir -p $HOME/.gem
|
22
|
+
touch $HOME/.gem/credentials
|
23
|
+
chmod 0600 $HOME/.gem/credentials
|
24
|
+
printf -- "---\n:rubygems_api_key: ${RUBYGEMS_API_KEY}\n" > $HOME/.gem/credentials
|
25
|
+
printf -- ":github: Bearer ${GPR_API_KEY}\n" >> $HOME/.gem/credentials
|
26
|
+
env:
|
27
|
+
RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}}
|
28
|
+
GPR_API_KEY: ${{secrets.GITHUB_TOKEN}}
|
29
|
+
- name: Build emasser
|
30
|
+
run: gem build *.gemspec
|
31
|
+
# - name: Build emass_client
|
32
|
+
# run: gem build -C emass_client/ruby_client/ emass_client.gemspec
|
33
|
+
- name: Publish to RubyGems
|
34
|
+
run: |
|
35
|
+
gem push --KEY rubygems --host https://rubygems.org *.gem
|
36
|
+
# gem push --KEY rubygems --host https://rubygems.org emass_client/ruby_client/*.gem
|
37
|
+
- name: Publish to GPR
|
38
|
+
run: |
|
39
|
+
gem push --KEY github --host https://rubygems.pkg.github.com/mitre *.gem
|
40
|
+
# gem push --KEY github --host https://rubygems.pkg.github.com/mitre emass_client/ruby_client/*.gem
|
41
|
+
env:
|
42
|
+
OWNER: mitre
|
@@ -1,23 +1,23 @@
|
|
1
|
-
name: Run rubocop
|
2
|
-
on:
|
3
|
-
push:
|
4
|
-
branches: [ main ]
|
5
|
-
pull_request:
|
6
|
-
branches: [ main ]
|
7
|
-
|
8
|
-
jobs:
|
9
|
-
test:
|
10
|
-
runs-on: ubuntu-latest
|
11
|
-
steps:
|
12
|
-
- uses: actions/checkout@
|
13
|
-
with:
|
14
|
-
fetch-depth: 0
|
15
|
-
- run: git fetch origin +refs/tags/*:refs/tags/*
|
16
|
-
- name: Install Ruby
|
17
|
-
uses: ruby/setup-ruby@v1
|
18
|
-
with:
|
19
|
-
ruby-version: 2.7
|
20
|
-
- name: Install and run Rubocop
|
21
|
-
run: |
|
22
|
-
bundle install
|
23
|
-
bundle exec rubocop --cache false
|
1
|
+
name: Run rubocop
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
branches: [ main ]
|
5
|
+
pull_request:
|
6
|
+
branches: [ main ]
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
test:
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
steps:
|
12
|
+
- uses: actions/checkout@v4
|
13
|
+
with:
|
14
|
+
fetch-depth: 0
|
15
|
+
- run: git fetch origin +refs/tags/*:refs/tags/*
|
16
|
+
- name: Install Ruby
|
17
|
+
uses: ruby/setup-ruby@v1
|
18
|
+
with:
|
19
|
+
ruby-version: 2.7
|
20
|
+
- name: Install and run Rubocop
|
21
|
+
run: |
|
22
|
+
bundle install
|
23
|
+
bundle exec rubocop --cache false
|