Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workflow to run manual e2e tests on specific instance type #148

Merged
merged 4 commits into from
Dec 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/manual-e2e-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Manual E2E tests

on:
workflow_dispatch:
inputs:
instance_type:
type: choice
description: Select Instance type (ARM - t4g.large, AMD - t3.large, GPU - p3.8xlarge)
options:
- t3.large
- t4g.large
- p3.8xlarge

permissions:
id-token: write
contents: read

jobs:
manual-e2e-conformance-tests:
strategy:
fail-fast: false
matrix:
ip-family: [ IPv4, IPv6 ]
kubernetes-versions: ["1.25", "1.26", "1.27", "1.28"]
if: github.repository == 'aws/aws-network-policy-agent'
runs-on: ubuntu-latest
steps:
- name: Checkout latest commit
uses: actions/checkout@v3
- name: Install Dependencies
uses: ./.github/actions/install-dependencies
- uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: ${{ secrets.OSS_ROLE_ARN }}
aws-region: us-west-2
role-duration-seconds: 18000 # 5 hours
- name: Run manual e2e conformance test
env:
RUN_CONFORMANCE_TESTS: true
IP_FAMILY: ${{ matrix.ip-family }}
INSTANCE_TYPE: ${{ github.event.inputs.instance_type }}
K8S_VERSION: ${{ matrix.kubernetes-versions }}
TEST_IMAGE_REGISTRY: ${{ secrets.TEST_IMAGE_REGISTRY }}
run: |
./scripts/run-tests.sh
3 changes: 3 additions & 0 deletions scripts/lib/cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ EOF
echo "Nodes AMI version for cluster: $CLUSTER_NAME"
kubectl get nodes -owide

local providerID=$(kubectl get nodes -ojson | jq -r '.items[0].spec.providerID')
local amiID=$(aws ec2 describe-instances --instance-ids ${providerID##*/} | jq -r '.Reservations[].Instances[].ImageId')
echo "Nodes AMI ID: $amiID"
}

function delete_cluster(){
Expand Down
4 changes: 4 additions & 0 deletions scripts/run-cyclonus-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ K8S_VERSION: $K8S_VERSION
echo "Nodes AMI version for cluster: $CLUSTER_NAME"
kubectl get nodes -owide

PROVIDER_ID=$(kubectl get nodes -ojson | jq -r '.items[0].spec.providerID')
AMI_ID=$(aws ec2 describe-instances --instance-ids ${PROVIDER_ID##*/} | jq -r '.Reservations[].Instances[].ImageId')
echo "Nodes AMI ID: $AMI_ID"

if [[ $SKIP_ADDON_INSTALLATION == "false" ]]; then
load_addon_details

Expand Down
Loading