Skip to content
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
41 changes: 6 additions & 35 deletions .github/workflows/int-test-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
name: Integration Test WorkFlow
on:
schedule:
- cron: "0 23 * * *"
push:
branches:
- develop
- master
jobs:
int-tests:
strategy:
matrix:
test: [appframework, secret, smartstore, monitoring_console,scaling]
test: [appframework, secret, smartstore, monitoring_console, scaling]
runs-on: ubuntu-latest
env:
CLUSTER_NODES: 1
Expand Down Expand Up @@ -116,35 +118,4 @@ jobs:
- name: Cleanup up EKS cluster
if: ${{ always() }}
run: |
make cluster-down
publish_operator_image:
runs-on: ubuntu-latest
needs: int-tests
env:
SPLUNK_OPERATOR_IMAGE_NAME: splunk/splunk-operator
TAG: edge
steps:
- uses: actions/checkout@v2
- name: setup-docker
uses: docker-practice/actions-setup-docker@v1
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
- name: Login to Amazon ECR
uses: aws-actions/amazon-ecr-login@v1
- name: Pull Splunk Operator Image Locally
run: |
docker pull ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA
- name: Change Operator Image Tag to edge
run: |
docker tag ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA ${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:${{ env.TAG }}
- name: Configure Docker Hub credentials
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PUSH_TOKEN}}
- name: Push Splunk Operator Image to Docker Hub
run: docker push ${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:${{ env.TAG }}
make cluster-down
150 changes: 150 additions & 0 deletions .github/workflows/nightly-int-test-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
name: Nightly Integration Test WorkFlow
on:
schedule:
- cron: '0 06 * * *'
jobs:
int-tests:
strategy:
matrix:
test: [appframework, secret, smartstore, monitoring_console, scaling]
runs-on: ubuntu-latest
env:
CLUSTER_NODES: 1
CLUSTER_WORKERS: 3
SPLUNK_ENTERPRISE_IMAGE: splunk/splunk:edge
SPLUNK_OPERATOR_IMAGE_NAME: splunk/splunk-operator
SPLUNK_OPERATOR_IMAGE_FILENAME: splunk-operator
TEST_FOCUS: "${{ matrix.test }}"
# This regex matches any string not containing integration keyword
TEST_TO_SKIP: "^(?:[^i]+|i(?:$|[^n]|n(?:$|[^t]|t(?:$|[^e]|e(?:$|[^g]|g(?:$|[^r]|r(?:$|[^a]|a(?:$|[^t]|t(?:$|[^i]|i(?:$|[^o]|o(?:$|[^n])))))))))))*$"
TEST_CLUSTER_PLATFORM: eks
EKS_VPC_PRIVATE_SUBNET_STRING: ${{ secrets.EKS_VPC_PRIVATE_SUBNET_STRING }}
EKS_VPC_PUBLIC_SUBNET_STRING: ${{ secrets.EKS_VPC_PUBLIC_SUBNET_STRING }}
TEST_BUCKET: ${{ secrets.TEST_BUCKET }}
TEST_INDEXES_S3_BUCKET: ${{ secrets.TEST_INDEXES_S3_BUCKET }}
ECR_REPOSITORY: ${{ secrets.ECR_REPOSITORY }}
PRIVATE_REGISTRY: ${{ secrets.ECR_REPOSITORY }}
S3_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
ENTERPRISE_LICENSE_LOCATION: ${{ secrets.ENTERPRISE_LICENSE_LOCATION }}
steps:
- name: Set Test Cluster Name
run: |
echo "TEST_CLUSTER_NAME=eks-integration-test-cluster-${{ matrix.test }}-$GITHUB_RUN_ID" >> $GITHUB_ENV
- name: Set Test Cluster Nodes and Parallel Runs
run: >-
if [ ${{ matrix.test }} == "appframework" ]; then
echo "CLUSTER_WORKERS=5" >> $GITHUB_ENV
echo "CLUSTER_NODES=2" >> $GITHUB_ENV
fi
- name: Checkcout code
uses: actions/checkout@v2
- name: Dotenv Action
id: dotenv
uses: falti/dotenv-action@v0.2.7
- name: Install Kubectl
uses: Azure/setup-kubectl@v1
with:
version: 'v1.16.13'
- name: Install Python
uses: actions/setup-python@v2
- name: Install AWS CLI
run: |
curl "https://s3.amazonaws.com/aws-cli/awscli-bundle-1.20.8.zip" -o "awscli-bundle.zip"
unzip awscli-bundle.zip
sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
aws --version
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: '1.13.6'
- name: Install Go Lint
run: |
go version
go get -u golang.org/x/lint/golint
- name: Install Ginkgo
run: |
go get github.com/onsi/ginkgo/ginkgo
go get github.com/onsi/gomega/...
- name: Install EKS CTL
run: |
curl --silent --location "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp
sudo mv /tmp/eksctl /usr/local/bin
eksctl version
- name: setup-docker
uses: docker-practice/actions-setup-docker@v1
- name: Install Operator SDK
run: |
sudo curl -L -o /usr/local/bin/operator-sdk https://github.com/operator-framework/operator-sdk/releases/download/${{ steps.dotenv.outputs.OPERATOR_SDK_VERSION }}/operator-sdk-${{ steps.dotenv.outputs.OPERATOR_SDK_VERSION }}-x86_64-linux-gnu
sudo chmod +x /usr/local/bin/operator-sdk
- name: Configure Docker Hub credentials
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN}}
- name: Pull Splunk Enterprise Edge Image
run: docker pull ${{ env.SPLUNK_ENTERPRISE_IMAGE }}
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
- name: Make Splunk Operator Image
run: |
docker pull registry.access.redhat.com/ubi8/ubi-minimal:latest
operator-sdk build --verbose ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA
- name: Push Splunk Operator Image to ECR
run: |
echo "Uploading Image to ECR:: ${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA"
docker push ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA
- name: Tag and Push Splunk Enterprise Image to ECR
run: |
docker tag ${{ env.SPLUNK_ENTERPRISE_IMAGE }} ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_ENTERPRISE_IMAGE }}
docker push ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_ENTERPRISE_IMAGE }}
- name: Create EKS cluster
run: |
make cluster-up
- name: Change Operator Image Tag to latest
run: |
docker tag ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA ${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:latest
- name: Run smoke test
run: |
make int-test
- name: Cleanup up EKS cluster
if: ${{ always() }}
run: |
make cluster-down
publish_operator_image:
runs-on: ubuntu-latest
needs: int-tests
env:
SPLUNK_OPERATOR_IMAGE_NAME: splunk/splunk-operator
TAG: edge
steps:
- uses: actions/checkout@v2
- name: setup-docker
uses: docker-practice/actions-setup-docker@v1
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
- name: Login to Amazon ECR
uses: aws-actions/amazon-ecr-login@v1
- name: Pull Splunk Operator Image Locally
run: |
docker pull ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA
- name: Change Operator Image Tag to edge
run: |
docker tag ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA ${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:${{ env.TAG }}
- name: Configure Docker Hub credentials
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PUSH_TOKEN}}
- name: Push Splunk Operator Image to Docker Hub
run: docker push ${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:${{ env.TAG }}