forked from metal-stack/csi-driver-lvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Also, remove the redundant GHA Signed-off-by: Vicente Cheng <vicente.cheng@suse.com>
- Loading branch information
1 parent
261d647
commit 14707c2
Showing
11 changed files
with
135 additions
and
236 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,14 @@ | ||
name: Dev Build and Publish | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build-for-dev: | ||
uses: ./.github/workflows/factory.yml | ||
with: | ||
tag: ${{ github.ref_name }}-head | ||
push: true | ||
secrets: inherit |
This file was deleted.
Oops, something went wrong.
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,67 @@ | ||
on: | ||
workflow_call: | ||
inputs: | ||
tag: | ||
required: true | ||
type: string | ||
push: | ||
required: true | ||
type: boolean | ||
|
||
env: | ||
repo: "rancher" | ||
provisionerImageName: "harvester-lvm-provisioner" | ||
pluginImageName: "harvester-lvm-csi-plugin" | ||
|
||
jobs: | ||
dapper-build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
id-token: write | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Run dapper | ||
run: make ci | ||
|
||
- name: Read some Secrets | ||
uses: rancher-eio/read-vault-secrets@main | ||
if: ${{ inputs.push == true }} | ||
with: | ||
secrets: | | ||
secret/data/github/repo/${{ github.repository }}/csi-driver-lvm credentials username | DOCKER_USERNAME ; | ||
secret/data/github/repo/${{ github.repository }}/csi-driver-lvm credentials password | DOCKER_PASSWORD | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
if: ${{ inputs.push == true }} | ||
with: | ||
username: ${{ env.DOCKER_USERNAME }} | ||
password: ${{ env.DOCKER_PASSWORD }} | ||
|
||
- name: Docker Build (CSI Plugin) | ||
uses: docker/build-push-action@v5 | ||
with: | ||
provenance: false | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
file: package/Dockerfile | ||
push: ${{ inputs.push }} | ||
tags: ${{ env.repo }}/${{ env.pluginImageName }}:${{ inputs.tag }} | ||
|
||
- name: Docker Build (LVM Provisioner) | ||
uses: docker/build-push-action@v5 | ||
with: | ||
provenance: false | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
file: package/Dockerfile.provisioner | ||
push: ${{ inputs.push }} | ||
tags: ${{ env.repo }}/${{ env.provisionerImageName }}:${{ inputs.tag }} |
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,13 @@ | ||
name: Pull Request Build | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
|
||
jobs: | ||
build-for-PR: | ||
uses: ./.github/workflows/factory.yml | ||
with: | ||
tag: pr-${{ github.event.number }} | ||
push: false | ||
secrets: inherit |
This file was deleted.
Oops, something went wrong.
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,14 @@ | ||
name: Release Build and Publish | ||
|
||
on: | ||
push: | ||
tags: | ||
- v** | ||
|
||
jobs: | ||
build-for-release: | ||
uses: ./.github/workflows/factory.yml | ||
with: | ||
tag: ${{ github.ref_name }} | ||
push: true | ||
secrets: inherit |
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,8 +1,19 @@ | ||
# syntax=docker/dockerfile:1.7.0 | ||
|
||
FROM registry.suse.com/bci/bci-base:15.5 | ||
|
||
RUN zypper -n rm container-suseconnect && \ | ||
zypper -n install util-linux-systemd lvm2 e2fsprogs nvme-cli device-mapper xfsprogs && \ | ||
zypper -n clean -a && rm -rf /tmp/* /var/tmp/* /usr/share/doc/packages/* | ||
|
||
COPY bin/lvmplugin /usr/bin/ | ||
ARG TARGETPLATFORM | ||
|
||
RUN if [ "$TARGETPLATFORM" != "linux/amd64" ] && [ "$TARGETPLATFORM" != "linux/arm64" ]; then \ | ||
echo "Error: Unsupported TARGETPLATFORM: $TARGETPLATFORM" && \ | ||
exit 1; \ | ||
fi | ||
|
||
ENV ARCH=${TARGETPLATFORM#linux/} | ||
|
||
COPY bin/lvmplugin-${ARCH} /usr/bin/lvmplugin | ||
ENTRYPOINT ["lvmplugin"] |
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,9 +1,19 @@ | ||
# syntax=docker/dockerfile:1.7.0 | ||
|
||
FROM registry.suse.com/bci/bci-base:15.5 | ||
|
||
RUN zypper -n rm container-suseconnect && \ | ||
zypper -n install lvm2 e2fsprogs smartmontools nvme-cli device-mapper && \ | ||
zypper -n clean -a && rm -rf /tmp/* /var/tmp/* /usr/share/doc/packages/* | ||
|
||
COPY bin/csi-lvmplugin-provisioner /csi-lvmplugin-provisioner | ||
ARG TARGETPLATFORM | ||
|
||
RUN if [ "$TARGETPLATFORM" != "linux/amd64" ] && [ "$TARGETPLATFORM" != "linux/arm64" ]; then \ | ||
echo "Error: Unsupported TARGETPLATFORM: $TARGETPLATFORM" && \ | ||
exit 1; \ | ||
fi | ||
|
||
ENV ARCH=${TARGETPLATFORM#linux/} | ||
COPY bin/csi-lvmplugin-provisioner-${ARCH} /usr/bin/csi-lvmplugin-provisioner | ||
USER root | ||
ENTRYPOINT ["csi-lvmplugin-provisioner"] |
Oops, something went wrong.