Skip to content

Commit

Permalink
cleanup from feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
luthermonson committed Nov 9, 2023
1 parent dcd53e1 commit 9e3f7e3
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 82 deletions.
8 changes: 1 addition & 7 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,15 @@ Tips for a faster merge:
* add tests!

## Cutting Releases

Everytime a commit is merged into master, a new patch release is [automatically drafted](https://github.com/linode/linode-blockstorage-csi-driver/actions/workflows/release-drafter.yml) with a changelog. You can modify (tag name, changelog, title, etc.) and publish the release via the [releases page](https://github.com/linode/linode-blockstorage-csi-driver/releases).

When a release is published, the [release workflow](https://github.com/linode/linode-blockstorage-csi-driver/actions/workflows/docker-hub.yml) builds and pushes the docker image to Dockerhub.
When a release is published, the [release workflow](https://github.com/linode/linode-blockstorage-csi-driver/actions/workflows/release.yml) builds and pushes the docker image to Dockerhub.

## Code of Conduct

This project follows the [Linode Community Code of Conduct](https://www.linode.com/community/questions/conduct).

## Vulnerability Reporting

If you discover a potential security issue in this project we ask that you notify Linode Security via our [vulnerability reporting process](https://hackerone.com/linode). Please do **not** create a public github issue.

## Licensing

See the [LICENSE file](/LICENSE) for our project's licensing.


44 changes: 42 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,49 @@ on:
jobs:
ci:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ 'stable', 'oldstable' ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Continuous Integration
run: make ci
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Vet
run: make vet
- name: Lint
run: make lint
- name: Test
run: make test
- name: Build
run: make build
docker-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Docker Meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
linode/linode-blockstorage-csi-driver
tags: |
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
type=semver,pattern={{raw}},value=${{ github.ref_name }}
- name: Build and Push to Docker Hub
uses: docker/build-push-action@v5
with:
context: .
push: false
file: "./app/linode/Dockerfile"
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
REV=${{ github.ref_name }}


21 changes: 0 additions & 21 deletions .github/workflows/generate-manifest.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/label-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ name: Sync labels
on:
push:
branches:
- master
- main
paths:
- .github/labels.yml
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # pin@v2
- uses: actions/checkout@v4
- uses: micnncim/action-label-syncer@3abd5ab72fda571e69fffd97bd4e0033dd5f495c # pin@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
16 changes: 0 additions & 16 deletions .github/workflows/release-drafter.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # [email protected]
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create Release Artifacts
Expand All @@ -28,7 +28,7 @@ jobs:
images: |
linode/linode-blockstorage-csi-driver
tags: |
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
type=semver,pattern={{raw}},value=${{ github.ref_name }}
- name: Login to Docker Hub
uses: docker/login-action@v3
Expand All @@ -39,8 +39,8 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
push: true
file: "./app/linode/Dockerfile"
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
Expand Down
26 changes: 0 additions & 26 deletions .github/workflows/test.yml

This file was deleted.

11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
PLATFORM ?= linux/amd64
REGISTRY_NAME ?= index.docker.io/linode
IMAGE_NAME ?= linode-blockstorage-csi-driver
REV := $(shell git describe --long --tags --dirty 2> /dev/null || echo "dev")
Expand All @@ -7,7 +8,7 @@ GOLANGCI_LINT_IMG := golangci/golangci-lint:v1.52-alpine
RELEASE_DIR ?= release

.PHONY: ci
ci: fmt vet lint test build
ci: vet lint test build

.PHONY: fmt
fmt:
Expand All @@ -31,7 +32,7 @@ build:

.PHONY: docker-build
docker-build:
DOCKER_BUILDKIT=1 docker build --progress=plain -t $(IMAGE_TAG) --build-arg REV=$(REV) -f ./app/linode/Dockerfile .
DOCKER_BUILDKIT=1 docker build --platform=$(PLATFORM) --progress=plain -t $(IMAGE_TAG) --build-arg REV=$(REV) -f ./app/linode/Dockerfile .

.PHONY: docker-push
docker-push:
Expand All @@ -49,10 +50,10 @@ clean:
-rm -rf $(RELEASE_DIR)
-rm -rf ./linode-blockstorage-csi-driver

.PHONY:
.PHONY: release
release:
mkdir $(RELEASE_DIR)
mkdir -p $(RELEASE_DIR)
./hack/release-yaml.sh $(IMAGE_VERSION)
cp ./pkg/linode-bs/deploy/releases/linode-blockstorage-csi-driver-$(IMAGE_VERSION).yaml ./$(RELEASE_DIR)
sed -i -e 's/appVersion: "latest"/appVersion: "$(IMAGE_VERSION)"/g' ./helm-chart/csi-driver/Chart.yaml
sed -i "" -e 's/appVersion: "latest"/appVersion: "$(IMAGE_VERSION)"/g' ./helm-chart/csi-driver/Chart.yaml
tar -czvf ./$(RELEASE_DIR)/helm-chart-$(IMAGE_VERSION).tgz -C ./helm-chart/csi-driver .

0 comments on commit 9e3f7e3

Please sign in to comment.