moving circleci out
This commit is contained in:
@@ -1,84 +0,0 @@
|
||||
version: 2
|
||||
|
||||
defaults: &defaults
|
||||
docker:
|
||||
- image: cimg/ruby:2.4
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
validate:
|
||||
jobs:
|
||||
- validate_atomics
|
||||
|
||||
generate-guids-and-docs:
|
||||
jobs:
|
||||
- generate_and_commit_guids_and_docs:
|
||||
filters:
|
||||
branches:
|
||||
only: master
|
||||
|
||||
jobs:
|
||||
validate_atomics:
|
||||
<<: *defaults
|
||||
steps:
|
||||
- checkout
|
||||
- add_ssh_keys
|
||||
|
||||
- run:
|
||||
name: Validate the format of atomic tests against the spec
|
||||
command: |
|
||||
bin/validate-atomics.rb
|
||||
|
||||
generate_and_commit_guids_and_docs:
|
||||
<<: *defaults
|
||||
steps:
|
||||
- checkout
|
||||
- add_ssh_keys
|
||||
|
||||
- run:
|
||||
name: Generate and commit unique GUIDs for each atomic test
|
||||
command: |
|
||||
bin/generate-guids.rb
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
git status
|
||||
echo ""
|
||||
echo ""
|
||||
git diff-index HEAD --
|
||||
|
||||
if git diff-index --quiet HEAD -- ; then
|
||||
echo "Not committing GUID changes because there are no changes"
|
||||
else
|
||||
git config credential.helper 'cache --timeout=120'
|
||||
git config user.email "<email>"
|
||||
git config user.name "CircleCI Atomic Red Team GUID generator"
|
||||
|
||||
git add atomics
|
||||
git commit -am "Generate GUIDs from job=$CIRCLE_JOB branch=$CIRCLE_BRANCH [skip ci]"
|
||||
git push -u origin $CIRCLE_BRANCH
|
||||
fi
|
||||
|
||||
- run:
|
||||
name: Generate and commit nice markdown documents for atomics
|
||||
command: |
|
||||
bin/generate-atomic-docs.rb
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
git status
|
||||
echo ""
|
||||
echo ""
|
||||
git diff-index HEAD --
|
||||
|
||||
if git diff-index --quiet HEAD -- ; then
|
||||
echo "Not committing documentation because there are no changes"
|
||||
else
|
||||
git config credential.helper 'cache --timeout=120'
|
||||
git config user.email "<email>"
|
||||
git config user.name "CircleCI Atomic Red Team doc generator"
|
||||
|
||||
git add atomics
|
||||
git commit -am "Generate docs from job=$CIRCLE_JOB branch=$CIRCLE_BRANCH [skip ci]"
|
||||
git push -u origin $CIRCLE_BRANCH
|
||||
fi
|
||||
@@ -16,6 +16,32 @@ jobs:
|
||||
ruby-version: 2.7
|
||||
bundler-cache: true
|
||||
|
||||
|
||||
|
||||
- name: Generate and commit unique GUIDs for each atomic test
|
||||
run: |
|
||||
bin/generate-guids.rb
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
git status
|
||||
echo ""
|
||||
echo ""
|
||||
git diff-index HEAD --
|
||||
|
||||
if git diff-index --quiet HEAD -- ; then
|
||||
echo "Not committing GUID changes because there are no changes"
|
||||
else
|
||||
git config credential.helper 'cache --timeout=120'
|
||||
git config user.email "<email>"
|
||||
git config user.name "Atomic Red Team GUID generator"
|
||||
|
||||
git add atomics
|
||||
git commit -am "Generate GUIDs from job=$GITHUB_JOB branch=$GITHUB_REF_NAME [skip ci]"
|
||||
git push -u origin $GITHUB_REF_NAME
|
||||
fi
|
||||
|
||||
|
||||
- name: generate markdown docs for atomics
|
||||
run: |
|
||||
bin/generate-atomic-docs.rb
|
||||
@@ -31,7 +57,7 @@ jobs:
|
||||
else
|
||||
git config credential.helper 'cache --timeout=120'
|
||||
git config user.email "<email>"
|
||||
git config user.name "CircleCI Atomic Red Team doc generator"
|
||||
git config user.name "Atomic Red Team doc generator"
|
||||
|
||||
git add atomics
|
||||
git commit -am "ci/cd generated docs from job=$GITHUB_JOB branch=$GITHUB_REF_NAME [ci skip]"
|
||||
|
||||
Reference in New Issue
Block a user