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

docs: improve contributor workflow #616

Merged
merged 6 commits into from
Jan 27, 2025
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
8 changes: 3 additions & 5 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,8 @@ jobs:
- name: Build images locally
run: make zfs-driver-image

- name: Setup zfs pools
run: |
sudo apt-get install zfsutils-linux -y
truncate -s 100G /tmp/disk.img
sudo zpool create zfspv-pool $(sudo losetup -f /tmp/disk.img --show)
- name: Install zfs utils
run: sudo apt-get install zfsutils-linux -y

- name: Setup Minikube-Kubernetes
uses: medyagh/setup-minikube@latest
Expand All @@ -158,6 +155,7 @@ jobs:
OPENEBS_NAMESPACE: "openebs"
run: |
make ci
make helm-install
make sanity

- name: Upload CI Test Coverage Report
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,10 @@ jobs:
cache: false

- name: Build images locally
run: make zfs-driver-image || exit 1;
run: make zfs-driver-image

- name: Setup zfs pools
run: |
sudo apt-get install zfsutils-linux -y
truncate -s 100G /tmp/disk.img
sudo zpool create zfspv-pool $(sudo losetup -f /tmp/disk.img --show)
- name: Install zfs utils
run: sudo apt-get install zfsutils-linux -y

- name: Setup Minikube-Kubernetes
uses: medyagh/setup-minikube@latest
Expand All @@ -100,6 +97,7 @@ jobs:
OPENEBS_NAMESPACE: "openebs"
run: |
make ci
make helm-install
make sanity

- name: Upload CI Test Coverage Report
Expand Down Expand Up @@ -128,7 +126,7 @@ jobs:
run: |
TAG=${{ github.event.release.tag_name }}
nix-shell --pure --run "./scripts/update-chart-version.sh --tag $TAG --publish-release" ./shell.nix

- name: Set Image Org
run: |
[ -z "${{ secrets.IMAGE_ORG }}" ] && IMAGE_ORG=openebs || IMAGE_ORG=${{ secrets.IMAGE_ORG}}
Expand Down Expand Up @@ -226,7 +224,7 @@ jobs:
run: |
TAG=${{ github.event.release.tag_name }}
nix-shell --pure --run "./scripts/update-chart-version.sh --tag $TAG --publish-release" ./shell.nix

- name: Publish zfs localpv develop or prerelease helm chart
uses: stefanprodan/helm-gh-pages@master
with:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ tags
*.test
/coverage.txt
/tests/bdd_coverage.txt
/tests/bdd_coverage_custom-node-id.txt
/nixos.qcow2
27 changes: 22 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ clean:
@echo "--> Cleaning Directory" ;
go clean -testcache
rm -rf bin
./ci/ci-test.sh clean
chmod -R u+w ${GOPATH}/bin/${CSI_DRIVER} 2>/dev/null || true
chmod -R u+w ${GOPATH}/pkg/* 2>/dev/null || true
rm -rf ${GOPATH}/bin/${CSI_DRIVER}
Expand Down Expand Up @@ -121,7 +122,7 @@ verify-deps: deps
bootstrap: controller-gen
@for tool in $(EXTERNAL_TOOLS) ; do \
echo "+ Installing $$tool" ; \
cd && GO111MODULE=on go install -mod=mod $$tool; \
GO111MODULE=on go install -mod=mod $$tool; \
done

.PHONY: controller-gen
Expand Down Expand Up @@ -197,14 +198,14 @@ informer:

manifests:
@echo "+ Generating zfs localPV crds"
$(PWD)/buildscripts/generate-manifests.sh
./buildscripts/generate-manifests.sh

.PHONY: zfs-driver
zfs-driver: format
@echo "--------------------------------"
@echo "--> Building ${CSI_DRIVER} "
@echo "--------------------------------"
@PNAME=${CSI_DRIVER} CTLNAME=${CSI_DRIVER} sh -c "'$(PWD)/buildscripts/build.sh'"
@PNAME=${CSI_DRIVER} CTLNAME=${CSI_DRIVER} sh -c "'./buildscripts/build.sh'"

.PHONY: zfs-driver-image
zfs-driver-image: zfs-driver
Expand All @@ -215,15 +216,31 @@ zfs-driver-image: zfs-driver
cd buildscripts/${CSI_DRIVER} && docker build -t ${IMAGE_ORG}/${CSI_DRIVER}:${IMAGE_TAG} ${DBUILD_ARGS} . && docker tag ${IMAGE_ORG}/${CSI_DRIVER}:${IMAGE_TAG} quay.io/${IMAGE_ORG}/${CSI_DRIVER}:${IMAGE_TAG}
@rm buildscripts/${CSI_DRIVER}/${CSI_DRIVER}

.PHONY: image-tag
image-tag:
@echo ${IMAGE_TAG}

.PHONY: image-repo
image-repo:
@echo ${IMAGE_ORG}/${CSI_DRIVER}

.PHONY: image-ref
image-ref:
@echo ${IMAGE_ORG}/${CSI_DRIVER}:${IMAGE_TAG}

.PHONY: ci
ci:
@echo "--> Running ci test";
$(PWD)/ci/ci-test.sh
./ci/ci-test.sh run

.PHONY: helm-install
helm-install:
./ci/ci-test.sh install

.PHONY: sanity
sanity:
@echo "--> Running CSI Sanity test";
$(PWD)/ci/sanity.sh
./ci/sanity.sh

# Push images
deploy-images:
Expand Down
Loading
Loading