Skip to content

Commit

Permalink
remove dep on dapper
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandre Lamarre <[email protected]>
  • Loading branch information
alexandreLamarre committed May 20, 2024
1 parent c3dbdda commit 4de05d7
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 51 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: ci

on: [ pull_request ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name : setup Go
uses : actions/setup-go@v5
with:
go-version: 1.22
- name: Install mikefarah/yq
run: |
sudo wget https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64 -O /usr/bin/yq && sudo chmod +x /usr/bin/yq;
- name : Install helm
run : |
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh
helm version
- name: Perform CI
run : make ci
- name : Export image version
run : |
source ./scripts/version
echo IMAGE=$IMAGE >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push PushProx client image
uses: docker/build-push-action@v5
with:
context: .
file: ./package/Dockerfile
push: false
tags: ${{ env.IMAGE }}
platforms: linux/amd64,linux/arm64
43 changes: 15 additions & 28 deletions .github/workflows/e2e-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,25 +49,21 @@ jobs:
# k3d version list k3s | sed 's/+/-/' | sort -h
- ${{ github.event.inputs.k3s_version || 'v1.20.15-k3s1' }}
steps:
-
uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name : setup Go
uses : actions/setup-go@v5
with:
go-version: 1.22
-
name: Install mikefarah/yq
- name: Install mikefarah/yq
run: |
sudo wget https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64 -O /usr/bin/yq && sudo chmod +x /usr/bin/yq;
-
name: Perform CI
- name: Perform CI
run: |
REPO=${REPO} TAG=${TAG} ./scripts/build;
REPO=${REPO} TAG=${TAG} ./scripts/package;
-
name: Provision k3d Cluster
- name: Provision k3d Cluster
uses: AbsaOSS/k3d-action@v2
# k3d will automatically create a network named k3d-test-cluster-1 with the range 172.18.0.0/16
with:
Expand All @@ -76,40 +72,31 @@ jobs:
--agents 1
--network "nw01"
--image docker.io/rancher/k3s:${{matrix.k3s_version}}
-
name: Import Images Into k3d
- name: Import Images Into k3d
run: |
k3d image import ${REPO}/helm-project-operator:${TAG} -c e2e-ci-helm-project-operator;
-
name: Setup kubectl context
- name: Setup kubectl context
run: |
kubectl config use-context k3d-e2e-ci-helm-project-operator;
-
name: Set Up Tmate Debug Session
- name: Set Up Tmate Debug Session
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.enable_tmate == 'true' }}
uses: mxschmitt/action-tmate@v3
timeout-minutes: 15
with:
limit-access-to-actor: true
-
name: Install Helm Project Operator
- name: Install Helm Project Operator
run: ./.github/workflows/e2e/scripts/install-helm-project-operator.sh;
-
name: Check if Helm Project Operator is up

- name: Check if Helm Project Operator is up
run: ./.github/workflows/e2e/scripts/validate-helm-project-operator.sh;
-
name: Check if Project Registration Namespace is auto-created on namespace detection
- name: Check if Project Registration Namespace is auto-created on namespace detection
run: ./.github/workflows/e2e/scripts/create-project-namespace.sh;
-
name: Deploy Example Chart via ProjectHelmChart CR
- name: Deploy Example Chart via ProjectHelmChart CR
run: ./.github/workflows/e2e/scripts/create-projecthelmchart.sh;
-
name: Delete Example Chart
- name: Delete Example Chart
run: ./.github/workflows/e2e/scripts/delete-projecthelmchart.sh;
-
name: Uninstall Helm Project Operator
- name: Uninstall Helm Project Operator
run: ./.github/workflows/e2e/scripts/uninstall-helm-project-operator.sh;
-
name: Delete k3d cluster
- name: Delete k3d cluster
if: always()
run: k3d cluster delete e2e-ci-helm-project-operator
13 changes: 0 additions & 13 deletions .github/workflows/pull-request.yaml

This file was deleted.

13 changes: 3 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
TARGETS := $(shell ls scripts)

.dapper:
@echo Downloading dapper
@curl -sL https://releases.rancher.com/dapper/latest/dapper-$$(uname -s)-$$(uname -m) > .dapper.tmp
@@chmod +x .dapper.tmp
@./.dapper.tmp -v
@mv .dapper.tmp .dapper

$(TARGETS): .dapper
./.dapper $@
$(TARGETS):
./scripts/$@

.DEFAULT_GOAL := default

.PHONY: $(TARGETS)
.PHONY: $(TARGETS)

0 comments on commit 4de05d7

Please sign in to comment.