Skip to content

Commit

Permalink
Remove git-based helm chart test
Browse files Browse the repository at this point in the history
because the registry in the zarf init package is actually a git-based helm chart, every other test that deploys anything covers this.  Have to just mock the make target until this PR is merged or the CI will explode.
  • Loading branch information
jeff-mccoy committed Feb 8, 2022
1 parent f631641 commit 0e84f6c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 138 deletions.
97 changes: 0 additions & 97 deletions .github/workflows/test-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -457,103 +457,6 @@ jobs:
GITHUB_REF: ${{ github.event.client_payload.pull_request.head.ref }}
GITHUB_OWNER: ${{ github.event.client_payload.github.payload.repository.owner.login }}

# Run the E2E test of a Git-based Helm chart
e2e-git-based-helm-chart:
runs-on: ubuntu-latest
needs: [parse, build]
if: needs.parse.outputs.run-e2e == 'true'
container: cloudposse/test-harness:latest
steps:
# Update GitHub status for pending pipeline run
- name: "Update GitHub Status for pending"
uses: docker://cloudposse/github-status-updater
with:
args: "-action update_state -ref ${{ github.event.client_payload.pull_request.head.sha }} -repo ${{ github.event.client_payload.github.payload.repository.name }}"
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
GITHUB_STATE: pending
GITHUB_CONTEXT: "/test e2e - Git-Based Helm Chart"
GITHUB_DESCRIPTION: "started by @${{ github.event.client_payload.github.actor }}"
GITHUB_TARGET_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
GITHUB_REF: ${{ github.event.client_payload.pull_request.head.ref }}
GITHUB_OWNER: ${{ github.event.client_payload.github.payload.repository.owner.login }}

# Checkout the code from GitHub Pull Request
- name: "Checkout the code"
uses: actions/checkout@v2
with:
token: ${{ secrets.PAT }}
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }}
ref: ${{ github.event.client_payload.pull_request.head.ref }}

# Download the built artifacts
- name: "Download the built artifacts"
uses: actions/download-artifact@v2

- name: "Run E2E tests"
shell: bash -x -e -o pipefail {0}
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_DEFENSEUNICORNS_COMMERCIAL_SA_ZARF }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_DEFENSEUNICORNS_COMMERCIAL_SA_ZARF }}
AWS_DEFAULT_REGION: us-east-1
run: |
# cloudposse/test-harness has golang 1.15, we need 1.16. This is the easiest way I know to do it. This should definitely be revisited and cleaned up.
git clone --branch v0.8.0 --depth 1 https://github.com/asdf-vm/asdf.git $HOME/.asdf
source ~/.asdf/asdf.sh
export PATH="$HOME/.asdf/bin:$PATH"
asdf plugin-add golang https://github.com/kennyp/asdf-golang.git
asdf install golang 1.16.7
asdf global golang 1.16.7
export GOPATH="$HOME/go"
export PATH="$PATH:$GOPATH/bin"
chmod +x build/zarf
./build/zarf tools registry login registry1.dso.mil --username "${{ secrets.REGISTRY1_USERNAME_ZARF_ROBOT }}" --password "${{ secrets.REGISTRY1_PASSWORD_ZARF_ROBOT }}"
make test-cloud-e2e-git-based-helm-chart
# Update GitHub status for failing pipeline run
- name: "Update GitHub Status for failure"
if: ${{ failure() }}
uses: docker://cloudposse/github-status-updater
with:
args: "-action update_state -ref ${{ github.event.client_payload.pull_request.head.sha }} -repo ${{ github.event.client_payload.github.payload.repository.name }}"
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
GITHUB_STATE: failure
GITHUB_CONTEXT: "/test e2e - Git-Based Helm Chart"
GITHUB_DESCRIPTION: "run failed"
GITHUB_TARGET_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
GITHUB_REF: ${{ github.event.client_payload.pull_request.head.ref }}
GITHUB_OWNER: ${{ github.event.client_payload.github.payload.repository.owner.login }}

# Update GitHub status for successful pipeline run
- name: "Update GitHub Status for success"
uses: docker://cloudposse/github-status-updater
with:
args: "-action update_state -ref ${{ github.event.client_payload.pull_request.head.sha }} -repo ${{ github.event.client_payload.github.payload.repository.name }}"
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
GITHUB_STATE: success
GITHUB_CONTEXT: "/test e2e - Git-Based Helm Chart"
GITHUB_DESCRIPTION: "run passed"
GITHUB_TARGET_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
GITHUB_REF: ${{ github.event.client_payload.pull_request.head.ref }}
GITHUB_OWNER: ${{ github.event.client_payload.github.payload.repository.owner.login }}

# Update GitHub status for cancelled pipeline run
- name: "Update GitHub Status for cancelled"
if: ${{ cancelled() }}
uses: docker://cloudposse/github-status-updater
with:
args: "-action update_state -ref ${{ github.event.client_payload.pull_request.head.sha }} -repo ${{ github.event.client_payload.github.payload.repository.name }}"
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
GITHUB_STATE: error
GITHUB_CONTEXT: "/test e2e - Git-Based Helm Chart"
GITHUB_DESCRIPTION: "run cancelled"
GITHUB_TARGET_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
GITHUB_REF: ${{ github.event.client_payload.pull_request.head.ref }}
GITHUB_OWNER: ${{ github.event.client_payload.github.payload.repository.owner.login }}

# Run E2E test for general CLI stuff
e2e-general-cli:
runs-on: ubuntu-latest
Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,11 @@ test-cloud-e2e-gitops: package-example-gitops-data ## E2E test of Gitops example
test-cloud-e2e-data-injection: package-example-data-injection ## E2E test of the Data Injection example. Requires access to an AWS account. Costs money. Make sure you ran the `build-cli` and `init-package` targets first
cd test/e2e && go test ./... -run TestDataInjection -v -timeout 1200s

################ BEGIN Pending removal post-merge
.PHONY: test-cloud-e2e-git-based-helm-chart
test-cloud-e2e-git-based-helm-chart: package-example-single-big-bang-package ## E2E test of the Data Injection example. Requires access to an AWS account. Costs money. Make sure you ran the `build-cli` and `init-package` targets first
cd test/e2e && go test ./... -run TestGitBasedHelmChart -v -timeout 1200s
test-cloud-e2e-git-based-helm-chart:
echo done
################ END Pending removal post-merge

.PHONY: test-cloud-e2e-general-cli
test-cloud-e2e-general-cli: ## Runs tests of the CLI that don't need a cluster
Expand Down
39 changes: 0 additions & 39 deletions test/e2e/e2e_git_based_helm_chart_test.go

This file was deleted.

0 comments on commit 0e84f6c

Please sign in to comment.