This repository has been archived by the owner on Mar 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix nested components * Ci pipeline (#11) * testing github actions * adding build dir * testing linting * make ansible-lint strict * fix logic for ansible lint for strict enforcement * fixed linting * unit testing * unit testing * unit testing * testing unit test * testing unit test * testing unit test * testing unit test * testing * testing * testing * testing * testing * testing * only run on file changes * only run on file changes * testing * test * test * test * test * test * test * test * test * test * test * test * test * testing * testing * ignore security distribution in unit test * final push * fixed pathing for istio/vault * added stub e2e workflows * added v7wk8s stub
- Loading branch information
Showing
22 changed files
with
479 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
--- | ||
name: "Common Unit Test Action" | ||
description: "Common Unit Test Action" | ||
|
||
inputs: | ||
component: | ||
description: "RPK Component to Test" | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: "Setup KIND Unit Test Environment" | ||
shell: "bash" | ||
run: | | ||
# setup kind | ||
if [ -z $(which kind) ]; then | ||
echo "kind executable not found...installing" | ||
curl https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-linux-amd64 -o /usr/local/bin/kind -L | ||
chmod +x /usr/local/bin/kind | ||
else | ||
echo "found kind executable at $(which kind)...not installing" | ||
fi | ||
# setup kubectl | ||
if [ -z $(which kubectl) ]; then | ||
curl -LO https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /usr/local/bin/kubectl | ||
chmod +x /usr/local/bin/kubectl | ||
else | ||
echo "found kubectl executable at $(which kubectl)...not installing" | ||
fi | ||
env: | ||
KIND_VERSION: "v0.10.0" | ||
KUBECTL_VERSION: "v1.20.0" | ||
|
||
- name: "Setup KIND Cluster" | ||
shell: "bash" | ||
run: "make setup.kind && make setup.kind.network" | ||
env: | ||
KIND_INVENTORY: "ci/clusters/kind-cluster-unit.yaml" | ||
KIND_BASE_CONFIG: "ci/clusters/kind-cluster-config-unit.yaml" | ||
KIND_CLUSTER: "rpk-kind" | ||
|
||
- name: "Test Deployment" | ||
shell: "bash" | ||
run: ROLE=${RPK_COMPONENT} make deploy.test.role | ||
env: | ||
RPK_COMPONENT: ${{ inputs.component }} | ||
|
||
- name: "Test Demo" | ||
shell: "bash" | ||
run: ROLE=${RPK_COMPONENT} make demo.test.role | ||
env: | ||
RPK_COMPONENT: ${{ inputs.component }} | ||
|
||
- name: "Test Clean" | ||
shell: "bash" | ||
run: ROLE=${RPK_COMPONENT} make clean.test.role | ||
env: | ||
RPK_COMPONENT: ${{ inputs.component }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
--- | ||
name: DCO Check | ||
on: [pull_request] | ||
name: "Commit Check" | ||
on: | ||
- "pull_request" | ||
|
||
jobs: | ||
check-commits: | ||
runs-on: ubuntu-latest | ||
name: Check Commits | ||
runs-on: "ubuntu-latest" | ||
name: "Check Commits" | ||
steps: | ||
- name: Get PR Commits | ||
id: 'get-pr-commits' | ||
uses: tim-actions/get-pr-commits@master | ||
- name: "Get PR Commits" | ||
id: "get-pr-commits" | ||
uses: "tim-actions/get-pr-commits@master" | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: DCO Check | ||
uses: tim-actions/dco@master | ||
- name: "DCO Check" | ||
uses: "tim-actions/dco@master" | ||
with: | ||
commits: ${{ steps.get-pr-commits.outputs.commits }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
--- | ||
name: "End-to-End Test" | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
jobs: | ||
|
||
detect-file-changes: | ||
name: "Detect File Changes" | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: "Checkout Code" | ||
uses: "actions/checkout@v2" | ||
with: | ||
fetch-depth: 2 | ||
- name: "Detect File Changes" | ||
uses: "tj-actions/changed-files@v6.2" | ||
id: "changed-files" | ||
- name: List all modified files | ||
run: | | ||
for file in "${{ steps.changed-files.outputs.all_changed_files }}"; do | ||
echo "$file was modified" | ||
done | ||
outputs: | ||
changed-files: ${{ steps.changed-files.outputs.all_changed_files }} | ||
|
||
e2e-test-aws: | ||
name: "E2E AWS" | ||
runs-on: "ubuntu-latest" | ||
needs: "detect-file-changes" | ||
steps: | ||
- name: "Checkout Code" | ||
uses: "actions/checkout@v2" | ||
- run: "echo 'placeholder for aws e2e testing'" | ||
if: | | ||
contains(needs.detect-file-changes.outputs.changed-files, 'roles/common') || | ||
contains(needs.detect-file-changes.outputs.changed-files, 'roles/components') || | ||
contains(needs.detect-file-changes.outputs.changed-files, 'lib/') || | ||
contains(needs.detect-file-changes.outputs.changed-files, 'bin/') || | ||
contains(needs.detect-file-changes.outputs.changed-files, 'profiles/') || | ||
contains(needs.detect-file-changes.outputs.changed-files, 'Dockerfile') || | ||
contains(needs.detect-file-changes.outputs.changed-files, 'Makefile') || | ||
contains(needs.detect-file-changes.outputs.changed-files, 'site.yaml') | ||
e2e-test-azure: | ||
name: "E2E Azure" | ||
runs-on: "ubuntu-latest" | ||
needs: "detect-file-changes" | ||
steps: | ||
- name: "Checkout Code" | ||
uses: "actions/checkout@v2" | ||
- run: "echo 'placeholder for azure e2e testing'" | ||
if: | | ||
contains(needs.detect-file-changes.outputs.changed-files, 'roles/common') || | ||
contains(needs.detect-file-changes.outputs.changed-files, 'roles/components') || | ||
contains(needs.detect-file-changes.outputs.changed-files, 'lib/') || | ||
contains(needs.detect-file-changes.outputs.changed-files, 'bin/') || | ||
contains(needs.detect-file-changes.outputs.changed-files, 'profiles/') || | ||
contains(needs.detect-file-changes.outputs.changed-files, 'Dockerfile') || | ||
contains(needs.detect-file-changes.outputs.changed-files, 'Makefile') || | ||
contains(needs.detect-file-changes.outputs.changed-files, 'site.yaml') | ||
e2e-test-vmware: | ||
name: "E2E VMware" | ||
runs-on: "ubuntu-latest" | ||
needs: "detect-file-changes" | ||
steps: | ||
- name: "Checkout Code" | ||
uses: "actions/checkout@v2" | ||
- run: "echo 'placeholder for vmware e2e testing'" | ||
if: | | ||
contains(needs.detect-file-changes.outputs.changed-files, 'roles/common') || | ||
contains(needs.detect-file-changes.outputs.changed-files, 'roles/components') || | ||
contains(needs.detect-file-changes.outputs.changed-files, 'lib/') || | ||
contains(needs.detect-file-changes.outputs.changed-files, 'bin/') || | ||
contains(needs.detect-file-changes.outputs.changed-files, 'profiles/') || | ||
contains(needs.detect-file-changes.outputs.changed-files, 'Dockerfile') || | ||
contains(needs.detect-file-changes.outputs.changed-files, 'Makefile') || | ||
contains(needs.detect-file-changes.outputs.changed-files, 'site.yaml') | ||
e2e-test-v7wk8s: | ||
name: "E2E TKGs (v7wk8s)" | ||
runs-on: "ubuntu-latest" | ||
needs: "detect-file-changes" | ||
steps: | ||
- name: "Checkout Code" | ||
uses: "actions/checkout@v2" | ||
- run: "echo 'placeholder for tkgs e2e testing'" | ||
if: | | ||
contains(needs.detect-file-changes.outputs.changed-files, 'roles/common') || | ||
contains(needs.detect-file-changes.outputs.changed-files, 'roles/components') || | ||
contains(needs.detect-file-changes.outputs.changed-files, 'lib/') || | ||
contains(needs.detect-file-changes.outputs.changed-files, 'bin/') || | ||
contains(needs.detect-file-changes.outputs.changed-files, 'profiles/') || | ||
contains(needs.detect-file-changes.outputs.changed-files, 'Dockerfile') || | ||
contains(needs.detect-file-changes.outputs.changed-files, 'Makefile') || | ||
contains(needs.detect-file-changes.outputs.changed-files, 'site.yaml') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
--- | ||
name: Check License Lines | ||
name: "License Check" | ||
on: | ||
- push | ||
- pull_request | ||
- "push" | ||
- "pull_request" | ||
jobs: | ||
check-license-lines: | ||
runs-on: ubuntu-latest | ||
name: Check License Lines | ||
runs-on: "ubuntu-latest" | ||
name: "Check License Lines" | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Check License Lines | ||
uses: kt3k/license_checker@v1.0.6 | ||
- uses: "actions/checkout@master" | ||
- name: "Check License Lines" | ||
uses: "kt3k/license_checker@v1.0.6" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,38 @@ | ||
--- | ||
name: Lint Project | ||
name: "Lint" | ||
on: | ||
- push | ||
- pull_request | ||
- "push" | ||
- "pull_request" | ||
jobs: | ||
|
||
lint-dirs: | ||
name: Lint Directories | ||
runs-on: ubuntu-latest | ||
container: | ||
image: projects.registry.vmware.com/rpk/rpk-base:v1.4.0 | ||
name: "Lint Directories" | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@master | ||
- run: make lint.dirs | ||
- name: "Checkout Code" | ||
uses: "actions/checkout@master" | ||
- run: "make lint.dirs" | ||
|
||
lint-files: | ||
name: Lint Files | ||
runs-on: ubuntu-latest | ||
container: | ||
image: projects.registry.vmware.com/rpk/rpk-base:v1.4.0 | ||
name: "Lint Files" | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@master | ||
- run: make lint.files | ||
- name: "Checkout Code" | ||
uses: "actions/checkout@master" | ||
- run: "make lint.files" | ||
|
||
lint-ansible: | ||
name: Lint Ansible | ||
runs-on: ubuntu-latest | ||
container: | ||
image: projects.registry.vmware.com/rpk/rpk-base:v1.4.0 | ||
name: "Lint Ansible" | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@master | ||
- run: make lint.ansible | ||
- name: "Checkout Code" | ||
uses: "actions/checkout@master" | ||
- run: "make lint.ansible" | ||
|
||
lint-yaml: | ||
name: Lint YAML | ||
runs-on: ubuntu-latest | ||
container: | ||
image: projects.registry.vmware.com/rpk/rpk-base:v1.4.0 | ||
name: "Lint YAML" | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@master | ||
- run: make lint.yaml | ||
- name: "Checkout Code" | ||
uses: "actions/checkout@master" | ||
- run: "make lint.yaml" |
Oops, something went wrong.