diff --git a/.github/actions/frontend/cortex/README.md b/.github/actions/frontend/cortex/README.md deleted file mode 100644 index 9cb7b12..0000000 --- a/.github/actions/frontend/cortex/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# Frontend - Cortex - -This [composite action](./action.yml) is responsible for running Cortex related -jobs for Frontend Projects. - -## Inputs - -This action takes the following inputs: - -| Name | Type | Default | Required | Description | -| ---------------- | ------ | ------- | -------- | --------------------------------------------- | -| `cortex_api_key` | String | | True | The key that allows us to push data to Cortex | - -## Outputs - -No outputs provided. - -## Example Usage - -```yaml -steps: - - name: cortex - uses: jupiterone/.github/.github/actions/frontend/cortex - with: - cortex_api_key: ${{ secrets.CORTEX_API_KEY }} -``` diff --git a/.github/actions/frontend/cortex/action.yml b/.github/actions/frontend/cortex/action.yml deleted file mode 100644 index d6b394d..0000000 --- a/.github/actions/frontend/cortex/action.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Runs Cortex related jobs for Frontend Projects - -inputs: - cortex_api_key: - description: 'The key that allows us to push data to Cortex' - type: string - required: true - -runs: - using: 'composite' - steps: - - name: cortex_inputs - shell: bash - run: | - echo "cortex_api_key=${{ inputs.cortex_api_key }}" - - name: push_to_cortex - run: - npx --yes -p @jupiterone/web-tools-platform-analytics@latest - platform-analytics all - shell: bash - env: - CORTEX_API_KEY: ${{ inputs.cortex_api_key }} diff --git a/.github/actions/frontend/cortex/mocks.ts b/.github/actions/frontend/cortex/mocks.ts deleted file mode 100644 index f591833..0000000 --- a/.github/actions/frontend/cortex/mocks.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* -This file is automatically leveraged when tests are run to determine which -steps should be skipped in the composite action. If these steps were not -mocked, they would break the test. -*/ -export const CORTEX_MOCK_STEPS = [{ name: 'push_to_cortex' }]; diff --git a/.github/workflows/frontend_npm_release.yml b/.github/workflows/frontend_npm_release.yml index 133df61..871280e 100644 --- a/.github/workflows/frontend_npm_release.yml +++ b/.github/workflows/frontend_npm_release.yml @@ -106,20 +106,3 @@ jobs: uses: jupiterone/.github/.github/actions/frontend/npm/publish@v3.0.51 with: auto_token: ${{ secrets.AUTO_GITHUB_PAT_TOKEN }} - - cortex: - runs-on: - ${{ (inputs.fallback_runner && 'ubuntu-latest') || - 'scaleset-jupiterone-infra-arm64' }} - needs: validate - if: ${{ inputs.use_cortex }} - steps: - - uses: actions/checkout@v3 - - name: setup_env - uses: jupiterone/.github/.github/actions/setup_env@v3.0.51 - with: - use_dev: true - - name: cortex - uses: jupiterone/.github/.github/actions/frontend/cortex@v3.0.51 - with: - cortex_api_key: ${{ secrets.CORTEX_API_KEY }} diff --git a/.github/workflows/frontend_runtime_deploy.yml b/.github/workflows/frontend_runtime_deploy.yml index 59872f3..c1c52cc 100644 --- a/.github/workflows/frontend_runtime_deploy.yml +++ b/.github/workflows/frontend_runtime_deploy.yml @@ -70,19 +70,3 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} chromatic_project_token: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} publish_chromatic: true - - cortex: - runs-on: - ${{ (inputs.fallback_runner && 'ubuntu-latest') || - 'scaleset-jupiterone-infra-arm64' }} - needs: validate - steps: - - uses: actions/checkout@v3 - - name: setup_env - uses: jupiterone/.github/.github/actions/setup_env@v3.0.51 - with: - use_dev: true - - name: cortex - uses: jupiterone/.github/.github/actions/frontend/cortex@v3.0.51 - with: - cortex_api_key: ${{ secrets.CORTEX_API_KEY }} diff --git a/.github/workflows/test/frontend_npm_release.test.ts b/.github/workflows/test/frontend_npm_release.test.ts index 34362fe..8ee13d9 100644 --- a/.github/workflows/test/frontend_npm_release.test.ts +++ b/.github/workflows/test/frontend_npm_release.test.ts @@ -43,11 +43,6 @@ test('validate inputs and secrets', async () => { }); expect(npm_publish_inputs.output).toContain(`auto_token=***`); - - // cortex - const cortex_inputs = getTestResult({ results, name: 'cortex_inputs' }); - - expect(cortex_inputs.output).toContain(`cortex_api_key=***`); }); test('default flow', async () => { @@ -57,10 +52,10 @@ test('default flow', async () => { const jobs_found = getTestResults({ results, - names: ['validate', 'publish', 'cortex'], + names: ['validate', 'publish'], }); - expect(jobs_found.length).toEqual(3); + expect(jobs_found.length).toEqual(2); }); test('when use_chromatic is true', async () => { @@ -72,8 +67,8 @@ test('when use_chromatic is true', async () => { const jobs_found = getTestResults({ results, - names: ['validate', 'chromatic_publish', 'publish', 'cortex'], + names: ['validate', 'chromatic_publish', 'publish'], }); - expect(jobs_found.length).toEqual(4); + expect(jobs_found.length).toEqual(3); }); diff --git a/.github/workflows/test/frontend_runtime_deploy.test.ts b/.github/workflows/test/frontend_runtime_deploy.test.ts index 7dcc95b..8068952 100644 --- a/.github/workflows/test/frontend_runtime_deploy.test.ts +++ b/.github/workflows/test/frontend_runtime_deploy.test.ts @@ -28,11 +28,6 @@ test('validate inputs and secrets', async () => { const results = await runWorkflow({ act, repoName, mockGithub }); - // cortex - const cortex_inputs = getTestResult({ results, name: 'cortex_inputs' }); - - expect(cortex_inputs.output).toContain(`cortex_api_key=***`); - // chromatic_upload const chromatic_inputs = getTestResult({ results, name: 'chromatic_inputs' }); @@ -44,9 +39,9 @@ test('default flow', async () => { const results = await runWorkflow({ act, repoName, mockGithub }); - const jobs_found = getTestResults({ results, names: ['validate', 'cortex'] }); + const jobs_found = getTestResults({ results, names: ['validate'] }); - expect(jobs_found.length).toEqual(2); + expect(jobs_found.length).toEqual(1); }); test('flow with chromatic turned on', async () => { @@ -58,8 +53,8 @@ test('flow with chromatic turned on', async () => { const jobs_found = getTestResults({ results, - names: ['validate', 'cortex', 'chromatic_publish'], + names: ['validate', 'chromatic_publish'], }); - expect(jobs_found.length).toEqual(3); + expect(jobs_found.length).toEqual(2); }); diff --git a/README.md b/README.md index f0df555..b2a3ddf 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,6 @@ This makes our workflows DRY, easier to reason about and more stable. #### Common - [chromatic](.github/actions/frontend/chromatic/README.md) -- [cortex](.github/actions/frontend/cortex/README.md) #### Runtime diff --git a/cortex.yaml b/cortex.yaml deleted file mode 100644 index 1fec6d1..0000000 --- a/cortex.yaml +++ /dev/null @@ -1,13 +0,0 @@ -openapi: 3.0.1 -info: - title: Github Workflows - description: JupiterOne Organization-Wide GitHub Workflows. - x-cortex-git: - github: - repository: JupiterOne/.github - x-cortex-owners: - - type: group - name: JupiterOne/sre - x-cortex-tag: github workflows - x-cortex-service-groups: - - tier-4