fix: Ensure that the rules for mount operations are applied in all sc… #8
Workflow file for this run
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
name: ci-alpha-build | |
on: | |
pull_request: | |
branches: | |
- main | |
paths: | |
- "apis/**" | |
- "cmd/**" | |
- "config/**" | |
- "internal/**" | |
- "pkg/**" | |
- ".gitmodules" | |
- "manifests/**" | |
- "vArmor-ebpf/**" # check submodule content | |
permissions: read-all | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.SetVersion.outputs.version }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Checkout submodules | |
run: git submodule update --init --recursive | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.20" | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
with: | |
platforms: linux/amd64,linux/arm64/v8 | |
- name: Run build | |
run: make docker-build-dev | |
- name: Package helm chart | |
run: make helm-package-dev | |
- name: Login to registry | |
run: echo "${{ secrets.PUSH_PASSWORD }}" | docker login -u=${{ secrets.PUSH_USERNAME }} elkeid-ap-southeast-1.cr.volces.com --password-stdin | |
- name: Push artifacts to registry | |
run: make push-dev | |
- name: Upload Helm Chart as Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: helm-chart | |
path: varmor-*.tgz | |
- id: SetVersion | |
run: echo "version=$(git describe --tags --match "v[0-9]*" | sed 's/^v//')">> "$GITHUB_OUTPUT" | |
deploy-and-basic-test: | |
needs: build | |
strategy: | |
fail-fast: false | |
matrix: | |
k8s_version: [ "1.20.15", "1.24.17", "1.26.14" ] | |
os: ["ubuntu-latest" ] | |
runs-on: ${{ matrix.os }} | |
env: | |
KUBE_VER: ${{ matrix.k8s_version }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: debianmaster/actions-k3s@master | |
id: k3s | |
with: | |
version: v${{ matrix.k8s_version }}-k3s1 | |
- name: Download Helm Chart Artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: helm-chart | |
- name: Checkout submodules | |
run: git submodule update --init --recursive | |
- name: Install varmor alpha version | |
run: | | |
helm install varmor varmor-*.tgz \ | |
--namespace varmor --create-namespace \ | |
--set image.registry="elkeid-test-cn-beijing.cr.volces.com" \ | |
--set image.username=${{ secrets.TEST_USERNAME }}" \ | |
--set image.password=${{ secrets.TEST_PASSWORD }}" \ | |
--set bpfLsmEnforcer.enabled=true \ | |
--set "agent.bpfLsmEnforcer.volumes[0].hostPath.type=Directory,agent.bpfLsmEnforcer.volumes[0].hostPath.path=/run/k3s/containerd/,agent.bpfLsmEnforcer.volumes[0].name=containerd" \ | |
--set "agent.bpfLsmEnforcer.volumes[1].hostPath.type=Directory,agent.bpfLsmEnforcer.volumes[1].hostPath.path=/proc,agent.bpfLsmEnforcer.volumes[1].name=procfs" | |
- name: Run basic test | |
run: ./.github/scripts/basic-test.sh | |
# - name: Kill all and clean up | |
# if: ${{ always() }} | |
# run: ./.github/scripts/kill-and-clean-all.sh |