generated from JupiterOne-Archives/integration-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d02e3dc
Showing
41 changed files
with
7,427 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
CLIENT_ID= | ||
CLIENT_SECRET= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"root": true, | ||
"extends": [ | ||
"./node_modules/@jupiterone/integration-sdk-dev-tools/config/eslint.json" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
name: Build | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: setup-node | ||
name: Setup Node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14.x | ||
|
||
- name: Check out code repository source code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install dependencies | ||
run: yarn | ||
|
||
- name: Run tests | ||
run: yarn test:ci | ||
|
||
- name: Run build | ||
run: yarn build | ||
|
||
# Publishing is done in a separate job to allow | ||
# for all matrix builds to complete. | ||
release: | ||
needs: test | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/main' | ||
steps: | ||
- name: Setup Node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14.x | ||
|
||
- name: Check out repo | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 2 | ||
|
||
# Fetch tags and describe the commit before the merge commit | ||
# to see if it's a version publish | ||
- name: Fetch tags | ||
run: | | ||
git fetch --tags | ||
if git describe --exact-match --match "v*.*.*" HEAD^2 | ||
then | ||
echo "Found version commit tag. Publishing." | ||
echo "publish=true" >> $GITHUB_ENV | ||
echo "VERSION_NUM=`echo $(git describe --tags --abbrev=0 | sed -e "s/v//gI")`" >> $GITHUB_ENV | ||
else | ||
echo "Version commit tag not found. Not publishing." | ||
fi | ||
- name: Publish | ||
if: env.publish == 'true' | ||
env: | ||
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | ||
run: | | ||
echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" > .npmrc | ||
yarn | ||
yarn build | ||
npm publish ./dist | ||
- name: Get Version Changelog Entry | ||
if: env.publish == 'true' | ||
id: changelog_reader | ||
uses: mindsers/changelog-reader-action@v2 | ||
with: | ||
version: ${{ env.VERSION_NUM }} | ||
path: ./CHANGELOG.md | ||
continue-on-error: true | ||
|
||
- name: Create Release | ||
if: env.publish == 'true' | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.changelog_reader.outputs.version }} | ||
release_name: Release ${{ steps.changelog_reader.outputs.version }} | ||
body: ${{ steps.changelog_reader.outputs.changes }} | ||
prerelease: ${{ steps.changelog_reader.outputs.status == 'prereleased' }} | ||
draft: ${{ steps.changelog_reader.outputs.status == 'unreleased' }} | ||
continue-on-error: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: gitleaks | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
gitleaks: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: gitleaks-action | ||
uses: zricethezav/gitleaks-action@master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Questions | ||
on: [pull_request_target] | ||
|
||
jobs: | ||
validate: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- id: setup-node | ||
name: Setup Node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14.x | ||
|
||
- name: Check out `main` branch | ||
uses: actions/checkout@v2 | ||
with: | ||
path: source | ||
|
||
- name: Check out target branch questions | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{github.event.pull_request.head.ref}} | ||
repository: ${{github.event.pull_request.head.repo.full_name}} | ||
path: target | ||
|
||
- name: Install dependencies for `main` branch | ||
run: yarn install --cwd source | ||
|
||
- name: Validate questions on target branch | ||
env: | ||
MANAGED_QUESTIONS_JUPITERONE_ACCOUNT_ID: ${{ secrets.MANAGED_QUESTIONS_JUPITERONE_ACCOUNT_ID }} | ||
MANAGED_QUESTIONS_JUPITERONE_API_KEY: ${{ secrets.MANAGED_QUESTIONS_JUPITERONE_API_KEY }} | ||
run: yarn --cwd source | ||
j1-integration validate-question-file | ||
-a $MANAGED_QUESTIONS_JUPITERONE_ACCOUNT_ID | ||
-k $MANAGED_QUESTIONS_JUPITERONE_API_KEY | ||
-p ../target/jupiterone/questions/questions.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
node_modules/ | ||
dist/ | ||
.j1-integration/ | ||
.env | ||
.eslintcache | ||
tsconfig.tsbuildinfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[whitelist] | ||
files = [ | ||
"(.*?)(jpg|gif|doc|pdf|bin|lock)$" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
dist | ||
coverage/ | ||
.j1-integration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to | ||
[Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [Unreleased] |
Oops, something went wrong.