Chore: Migrate backend testing from drone to gha (#100765)
* baldm0mma/ add gha workflow * baldm0mma/ add codeowners * baldm0mma/ update health command * baldm0mma/ update aliases for services * baldm0mma/ rewrite migration attempt * baldm0mma/ fix package names for ubuntu * baldm0mma/ add authentication * baldm0mma/ update auth * baldm0mma/ add debugs * baldm0mma/ add continue on error * baldm0mma/ simplyfy ent fork logic * baldm0mma/ debug fork status * baldm0mma/ add debug workflow for enterprise access * chore: add workflow_dispatch trigger to backend test workflow * baldm0mma/ debug ent run * baldm0mma/ add more robust debugging info * baldm0mma/ use old drone ci app for testing * baldm0mma/ update app name * baldm0mma/ update workflow creds * baldm0mma/ rename * baldm0mma/ update codeownders * baldm0mma/ update paths to ignore paths for docs and markdown files * baldm0mma/ create 'Setup Grafana Enterprise' action and remove from current workflow * baldm0mma/ fail at git clone * baldm0mma/ absract away "Run backend tests" and "Run backend integration tests" into their own actions * baldm0mma/ update directory strcuture to adhere to GHAs best practices * baldm0mma/ remove optional configs * baldm0mma/ update codeowners * baldm0mma/ update gh app name * baldm0mma/ remove circ dep * baldm0mma/ uncomment out enterprise setup for test * baldm0mma/ update valut url * baldm0mma/ use vault instance rather than url * baldm0mma/ debug * baldm0mma/ Removed the multiline string format * baldm0mma/ add installation key * baldm0mma/ update path * baldm0mma/ debug vault access * baldm0mma/ add ent * baldm0mma/ remove debugging * baldm0mma/ update paths * baldm0mma/ update codeowners * baldm0mma/ update paths and codeowners * baldm0mma/ add continue-on-error to assure the workflow isn't blocking * baldm0mma/ simplify test action execution * baldm0mma/ remove wire install step * baldm0mma/ add conditions for coverage output * baldm0mma/ add conditions for coverage output for integration test action * baldm0mma/ add report converage file * baldm0mma/ remove uneeded action * baldm0mma/ update codeowners * baldm0mma/ push small change to go file and add log * baldm0mma/ update trigger conditions * baldm0mma/ update converage conditions * baldm0mma/ update Run backend integration tests with correct action * baldm0mma/ test 2 * baldm0mma/ update with -coverpkg flag * baldm0mma/ remove backend-coverage as it is now redundant * baldm0mma/ update codeowners * baldm0mma/ update test file * baldm0mma/ update coverage logic
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
name: 'Setup Grafana Enterprise'
|
||||
description: 'Clones and sets up Grafana Enterprise repository for testing'
|
||||
|
||||
inputs:
|
||||
github-app-name:
|
||||
description: 'Name of the GitHub App in Vault'
|
||||
required: false
|
||||
default: 'grafana-ci-bot'
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Retrieve GitHub App secrets
|
||||
id: get-secrets
|
||||
uses: grafana/shared-workflows/actions/get-vault-secrets@get-vault-secrets-v1.0.1
|
||||
with:
|
||||
repo_secrets: |
|
||||
APP_ID=${{ inputs.github-app-name }}:app-id
|
||||
APP_INSTALLATION_ID=${{ inputs.github-app-name }}:app-installation-id
|
||||
PRIVATE_KEY=${{ inputs.github-app-name }}:private-key
|
||||
|
||||
- name: Generate GitHub App token
|
||||
id: generate_token
|
||||
uses: actions/create-github-app-token@v1
|
||||
with:
|
||||
app-id: ${{ env.APP_ID }}
|
||||
private-key: ${{ env.PRIVATE_KEY }}
|
||||
repositories: "grafana-enterprise"
|
||||
owner: "grafana"
|
||||
|
||||
- name: Setup Enterprise
|
||||
shell: bash
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
|
||||
run: |
|
||||
git clone https://x-access-token:${GH_TOKEN}@github.com/grafana/grafana-enterprise.git ../grafana-enterprise;
|
||||
|
||||
cd ../grafana-enterprise
|
||||
|
||||
if git checkout ${GITHUB_HEAD_REF}; then
|
||||
echo "checked out ${GITHUB_HEAD_REF}"
|
||||
elif git checkout ${GITHUB_BASE_REF}; then
|
||||
echo "checked out ${GITHUB_BASE_REF}"
|
||||
else
|
||||
git checkout main
|
||||
fi
|
||||
|
||||
./build.sh
|
||||
Reference in New Issue
Block a user