diff --git a/.github/workflows/pr-project-board.yml b/.github/workflows/pr-project-board.yml deleted file mode 100644 index 6d6c04a1aa..0000000000 --- a/.github/workflows/pr-project-board.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Move content PR to Project Board - -on: - pull_request_target: - types: [opened] - paths: - - "quickstarts/**" - -env: - GITHUB_TOKEN: ${{ secrets.OPENSOURCE_BOT_TOKEN }} - -jobs: - move-pr-to-project-board: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - - - name: Move PR to Project Board for triage - run: | - gh pr edit ${{github.event.pull_request.number}} --add-project "NR1 Quickstarts Community" diff --git a/.github/workflows/preview-links.yml b/.github/workflows/preview-links.yml deleted file mode 100644 index 665d3eff74..0000000000 --- a/.github/workflows/preview-links.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Preview links - -on: - pull_request_target: - branches: - - main - types: [opened] - -env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PR_NUMBER: ${{ github.event.pull_request.number }} - -jobs: - generate: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - - - name: Setup workspace - uses: "./.github/actions/bootstrap" - - - name: Create preview links - id: links - env: - PR_URL: ${{ github.event.pull_request.url }} - run: | - cd utils && yarn create-preview-links "$PR_URL" "$PR_NUMBER" - - name: Comment - if: steps.links.outputs.comment != '' - env: - COMMENT: ${{ steps.links.outputs.comment }} - run: | - gh pr comment "$PR_NUMBER" --body "$COMMENT" diff --git a/.github/workflows/quickstarts.eu-production.yml b/.github/workflows/quickstarts.eu-production.yml deleted file mode 100644 index 518e0541f9..0000000000 --- a/.github/workflows/quickstarts.eu-production.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Submit All - EU-Production - -on: - workflow_dispatch: - inputs: - pr-number: - description: 'PR to run against' - required: true - -jobs: - eu-production: - uses: ./.github/workflows/reusable.quickstart_submission.yml - with: - pr-number: ${{ github.event.inputs.pr-number }} - dry-run: false - secrets: - nr-api-url: ${{ secrets.NR_API_URL_EU }} - nr-api-token: ${{ secrets.NR_API_TOKEN_EU }} - github-token: ${{ secrets.GITHUB_TOKEN }} - nr-license-key: ${{ secrets.NEW_RELIC_LICENSE_KEY }} diff --git a/.github/workflows/quickstarts.production.yml b/.github/workflows/quickstarts.production.yml deleted file mode 100644 index 6a5b0a0d0e..0000000000 --- a/.github/workflows/quickstarts.production.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Submit All - Production - -on: - workflow_dispatch: - inputs: - pr-number: - description: 'PR to run against' - required: true - -jobs: - production: - uses: ./.github/workflows/reusable.quickstart_submission.yml - with: - pr-number: ${{ github.event.inputs.pr-number }} - dry-run: false - secrets: - nr-api-url: ${{ secrets.NR_API_URL }} - nr-api-token: ${{ secrets.NR_API_TOKEN }} - github-token: ${{ secrets.GITHUB_TOKEN }} - nr-license-key: ${{ secrets.NEW_RELIC_LICENSE_KEY }} diff --git a/.github/workflows/quickstarts.staging.yml b/.github/workflows/quickstarts.staging.yml deleted file mode 100644 index 28e6a5b20a..0000000000 --- a/.github/workflows/quickstarts.staging.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Submit All - Staging - -on: - workflow_dispatch: - inputs: - pr-number: - description: 'PR to run against' - required: true - -jobs: - staging: - uses: ./.github/workflows/reusable.quickstart_submission.yml - with: - pr-number: ${{ github.event.inputs.pr-number }} - dry-run: false - secrets: - nr-api-url: ${{ secrets.NR_API_URL_STAGING }} - nr-api-token: ${{ secrets.NR_API_TOKEN_STAGING }} - github-token: ${{ secrets.GITHUB_TOKEN }} - nr-license-key: ${{ secrets.NEW_RELIC_LICENSE_KEY }} diff --git a/.github/workflows/reusable.quickstart_submission.yml b/.github/workflows/reusable.quickstart_submission.yml deleted file mode 100644 index 4857fa880c..0000000000 --- a/.github/workflows/reusable.quickstart_submission.yml +++ /dev/null @@ -1,126 +0,0 @@ -# Reusable workflow for creating, updating, or validating quickstarts for a single environment. -name: Quickstart submission - -on: - workflow_call: - inputs: - pr-number: - required: true - type: string - dry-run: - required: true - type: boolean - default: true - secrets: - nr-api-url: - required: true - nr-api-token: - required: true - github-token: - required: true - nr-license-key: - required: true - -env: - PR_NUMBER: ${{ inputs.pr-number }} - DRY_RUN: ${{ inputs.dry-run }} - -jobs: - submit-data-sources: - name: Submit data sources - runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - # Ensure we have the most recent commit to `main` - with: - ref: 'main' - fetch-depth: 0 - - - name: Setup workspace - uses: './.github/actions/bootstrap' - - - name: Update data sources - env: - NR_API_URL: ${{ secrets.nr-api-url }} - NR_API_TOKEN: ${{ secrets.nr-api-token }} - GITHUB_TOKEN: ${{ secrets.github-token }} - NEW_RELIC_LICENSE_KEY: ${{ secrets.nr-license-key }} - run: | - URL="https://api.github.com/repos/${GITHUB_REPOSITORY}/pulls/$PR_NUMBER/files" - cd utils && yarn create-validate-data-sources "$URL" "$DRY_RUN" - - submit-quickstarts: - needs: [submit-data-sources] - name: Submit quickstarts - runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - # Ensure we have the most recent commit to `main` - with: - ref: 'main' - fetch-depth: 0 - - - name: Setup workspace - uses: './.github/actions/bootstrap' - - - name: Update quickstarts - env: - NR_API_URL: ${{ secrets.nr-api-url }} - NR_API_TOKEN: ${{ secrets.nr-api-token }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NEW_RELIC_LICENSE_KEY: ${{ secrets.nr-license-key }} - run: | - URL="https://api.github.com/repos/${GITHUB_REPOSITORY}/pulls/$PR_NUMBER/files" - cd utils && yarn create-validate-pr-quickstarts "$URL" "$DRY_RUN" - - set-dashboard-required-datasources: - needs: [submit-quickstarts] - name: Set dashboard required datasources - runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - # Ensure we have the most recent commit to `main` - with: - ref: 'main' - fetch-depth: 0 - - - name: Setup workspace - uses: './.github/actions/bootstrap' - - - name: Update dashboards with required datasources from quickstarts - env: - NR_API_URL: ${{ secrets.nr-api-url }} - NR_API_TOKEN: ${{ secrets.nr-api-token }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NEW_RELIC_LICENSE_KEY: ${{ secrets.nr-license-key }} - run: | - URL="https://api.github.com/repos/${GITHUB_REPOSITORY}/pulls/$PR_NUMBER/files" - cd utils && yarn set-dashboards-required-datasources "$URL" - - set-alert-policy-required-datasources: - needs: [submit-quickstarts] - name: Set alert policy required datasources - runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - # Ensure we have the most recent commit to `main` - with: - ref: 'main' - fetch-depth: 0 - - - name: Setup workspace - uses: './.github/actions/bootstrap' - - - name: Update dashboards with required datasources from quickstarts - env: - NR_API_URL: ${{ secrets.nr-api-url }} - NR_API_TOKEN: ${{ secrets.nr-api-token }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NEW_RELIC_LICENSE_KEY: ${{ secrets.nr-license-key }} - run: | - URL="https://api.github.com/repos/${GITHUB_REPOSITORY}/pulls/$PR_NUMBER/files" - cd utils && yarn set-alert-policy-required-datasources "$URL" diff --git a/.github/workflows/validate_data_sources.yml b/.github/workflows/validate_data_sources.yml deleted file mode 100644 index 4d0e542d2c..0000000000 --- a/.github/workflows/validate_data_sources.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: Validate data sources - -on: - workflow_run: - workflows: ["Validation Gate"] - types: - - completed - -jobs: - validate-data-source-schema: - name: Validate data source schema - runs-on: ubuntu-latest - steps: - - name: Download artifact - uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e - with: - workflow: validation_gate.yml - run_id: ${{ github.event.workflow_run.id }} - - - name: Get PR number - id: get_pr_number - run: | - export PR_NUMBER=$(cat artifact/pr_number.txt) - echo "pr-number=$PR_NUMBER" >> $GITHUB_ENV - - - name: Checkout repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - with: - ref: "refs/pull/${{ env.pr-number }}/merge" - - - name: Setup workspace - uses: "./.github/actions/bootstrap" - - - name: Validate new files - id: validation - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NR_API_URL: ${{ secrets.NR_API_URL }} - NR_API_TOKEN: ${{ secrets.NR_API_TOKEN }} - NEW_RELIC_NO_CONFIG_FILE: true - NEW_RELIC_LICENSE_KEY: ${{ secrets.NEW_RELIC_LICENSE_KEY }} - NEW_RELIC_APP_NAME: ${{ secrets.NEW_RELIC_APP_NAME }} - NEW_RELIC_HOST: staging-collector.newrelic.com - NODE_ENV: production - PR_NUMBER: ${{ env.pr-number }} - run: | - URL="https://api.github.com/repos/${GITHUB_REPOSITORY}/pulls/$PR_NUMBER/files" - DRY_RUN=true - cd utils && yarn create-validate-data-sources $URL $DRY_RUN - - - name: Add commit status - if: always() - uses: "./.github/actions/add-commit-status" - with: - statusContext: "Validation / Data source schema compliance" - state: ${{ job.status }}