365 lines
		
	
	
		
			10 KiB
		
	
	
	
		
			YAML
		
	
	
	
			
		
		
	
	
			365 lines
		
	
	
		
			10 KiB
		
	
	
	
		
			YAML
		
	
	
	
| name: CI
 | |
| 
 | |
| on:
 | |
|   push:
 | |
|     tags:
 | |
|       - "v*"
 | |
|     branches:
 | |
|       - master
 | |
|       - next
 | |
| 
 | |
| jobs:
 | |
|   cancel-previous-runs:
 | |
|     runs-on: ubuntu-latest
 | |
|     steps:
 | |
|       - name: Cancel Previous Runs
 | |
|         uses: styfle/cancel-workflow-action@0.6.0
 | |
|         with:
 | |
|           access_token: ${{ github.token }}
 | |
| 
 | |
|   build-npm-linux-amd64:
 | |
|     runs-on:
 | |
|       - self-hosted
 | |
|       - Linux
 | |
|       - X64
 | |
|     steps:
 | |
|       - uses: actions/checkout@v2
 | |
|       - shell: bash
 | |
|         name: npm install
 | |
|         run: |
 | |
|           ci/bin/build.sh          
 | |
|       - name: upload build
 | |
|         uses: actions/upload-artifact@v2
 | |
|         with:
 | |
|           name: node-modules-linux-amd64
 | |
|           path: node_modules-linux-amd64.tar.gz
 | |
|           retention-days: 7
 | |
| 
 | |
|   build-npm-windows-amd64:
 | |
|     runs-on:
 | |
|       - self-hosted
 | |
|       - Windows
 | |
|       - X64
 | |
|     steps:
 | |
|       - uses: actions/checkout@v2
 | |
|       - shell: pwsh
 | |
|         name: npm install
 | |
|         run: |
 | |
|           ci\bin\build.ps1          
 | |
|       - name: upload build
 | |
|         uses: actions/upload-artifact@v2
 | |
|         with:
 | |
|           name: node-modules-windows-amd64
 | |
|           path: node_modules-windows-amd64.tar.gz
 | |
|           retention-days: 7
 | |
| 
 | |
|   csi-sanity-synology-dsm6:
 | |
|     needs:
 | |
|       - build-npm-linux-amd64
 | |
|     strategy:
 | |
|       fail-fast: false
 | |
|       matrix:
 | |
|         config:
 | |
|           - synlogy/dsm6/iscsi.yaml
 | |
|     runs-on:
 | |
|       - self-hosted
 | |
|       - Linux
 | |
|       - X64
 | |
|       - csi-sanity-synology
 | |
|     steps:
 | |
|       - uses: actions/checkout@v2
 | |
|       - uses: actions/download-artifact@v2
 | |
|         with:
 | |
|           name: node-modules-linux-amd64
 | |
|       - name: csi-sanity
 | |
|         run: |
 | |
|           # run tests
 | |
|           ci/bin/run.sh          
 | |
|         env:
 | |
|           TEMPLATE_CONFIG_FILE: "./ci/configs/${{ matrix.config }}"
 | |
|           SYNOLOGY_HOST: ${{ secrets.SANITY_SYNOLOGY_DSM6_HOST }}
 | |
|           SYNOLOGY_PORT: ${{ secrets.SANITY_SYNOLOGY_DSM6_PORT }}
 | |
|           SYNOLOGY_USERNAME: ${{ secrets.SANITY_SYNOLOGY_USERNAME }}
 | |
|           SYNOLOGY_PASSWORD: ${{ secrets.SANITY_SYNOLOGY_PASSWORD }}
 | |
|           SYNOLOGY_VOLUME: ${{ secrets.SANITY_SYNOLOGY_VOLUME }}
 | |
| 
 | |
|   csi-sanity-synology-dsm7:
 | |
|     needs:
 | |
|       - build-npm-linux-amd64
 | |
|     strategy:
 | |
|       fail-fast: false
 | |
|       matrix:
 | |
|         config:
 | |
|           - synlogy/dsm7/iscsi.yaml
 | |
|     runs-on:
 | |
|       - self-hosted
 | |
|       - Linux
 | |
|       - X64
 | |
|       - csi-sanity-synology
 | |
|     steps:
 | |
|       - uses: actions/checkout@v2
 | |
|       - uses: actions/download-artifact@v2
 | |
|         with:
 | |
|           name: node-modules-linux-amd64
 | |
|       - name: csi-sanity
 | |
|         run: |
 | |
|           # run tests
 | |
|           ci/bin/run.sh          
 | |
|         env:
 | |
|           TEMPLATE_CONFIG_FILE: "./ci/configs/${{ matrix.config }}"
 | |
|           SYNOLOGY_HOST: ${{ secrets.SANITY_SYNOLOGY_DSM7_HOST }}
 | |
|           SYNOLOGY_PORT: ${{ secrets.SANITY_SYNOLOGY_DSM7_PORT }}
 | |
|           SYNOLOGY_USERNAME: ${{ secrets.SANITY_SYNOLOGY_USERNAME }}
 | |
|           SYNOLOGY_PASSWORD: ${{ secrets.SANITY_SYNOLOGY_PASSWORD }}
 | |
|           SYNOLOGY_VOLUME: ${{ secrets.SANITY_SYNOLOGY_VOLUME }}
 | |
| 
 | |
| 
 | |
|   # api-based drivers
 | |
|   csi-sanity-truenas-scale-22_02:
 | |
|     needs:
 | |
|       - build-npm-linux-amd64
 | |
|     strategy:
 | |
|       fail-fast: false
 | |
|       matrix:
 | |
|         config:
 | |
|           - truenas/scale/22.02/scale-iscsi.yaml
 | |
|           - truenas/scale/22.02/scale-nfs.yaml
 | |
|           # 80 char limit
 | |
|           - truenas/scale/22.02/scale-smb.yaml
 | |
|     runs-on:
 | |
|       - self-hosted
 | |
|       - Linux
 | |
|       - X64
 | |
|       - csi-sanity-zfs-local
 | |
|       #- csi-sanity-truenas-scale
 | |
|     steps:
 | |
|       - uses: actions/checkout@v2
 | |
|       - uses: actions/download-artifact@v2
 | |
|         with:
 | |
|           name: node-modules-linux-amd64
 | |
|       - name: csi-sanity
 | |
|         run: |
 | |
|           # run tests
 | |
|           ci/bin/run.sh          
 | |
|         env:
 | |
|           TEMPLATE_CONFIG_FILE: "./ci/configs/${{ matrix.config }}"
 | |
|           TRUENAS_HOST: ${{ secrets.SANITY_TRUENAS_SCALE_22_02_HOST }}
 | |
|           TRUENAS_USERNAME: ${{ secrets.SANITY_TRUENAS_USERNAME }}
 | |
|           TRUENAS_PASSWORD: ${{ secrets.SANITY_TRUENAS_PASSWORD }}
 | |
| 
 | |
|   # ssh-based drivers
 | |
|   csi-sanity-truenas-core-12_0:
 | |
|     needs:
 | |
|       - build-npm-linux-amd64
 | |
|     strategy:
 | |
|       fail-fast: false
 | |
|       matrix:
 | |
|         config:
 | |
|           # 63 char limit
 | |
|           - truenas/core/12.0/core-iscsi.yaml
 | |
|           - truenas/core/12.0/core-nfs.yaml
 | |
|           # 80 char limit
 | |
|           - truenas/core/12.0/core-smb.yaml
 | |
|     runs-on:
 | |
|       - self-hosted
 | |
|       - Linux
 | |
|       - X64
 | |
|       - csi-sanity-zfs-local
 | |
|       #- csi-sanity-truenas-core
 | |
|     steps:
 | |
|       - uses: actions/checkout@v2
 | |
|       - uses: actions/download-artifact@v2
 | |
|         with:
 | |
|           name: node-modules-linux-amd64
 | |
|       - name: csi-sanity
 | |
|         run: |
 | |
|           # run tests
 | |
|           ci/bin/run.sh          
 | |
|         env:
 | |
|           TEMPLATE_CONFIG_FILE: "./ci/configs/${{ matrix.config }}"
 | |
|           TRUENAS_HOST: ${{ secrets.SANITY_TRUENAS_CORE_12_0_HOST }}
 | |
|           TRUENAS_USERNAME: ${{ secrets.SANITY_TRUENAS_USERNAME }}
 | |
|           TRUENAS_PASSWORD: ${{ secrets.SANITY_TRUENAS_PASSWORD }}
 | |
| 
 | |
|   # ssh-based drivers
 | |
|   csi-sanity-truenas-core-13_0:
 | |
|     needs:
 | |
|       - build-npm-linux-amd64
 | |
|     strategy:
 | |
|       fail-fast: false
 | |
|       matrix:
 | |
|         config:
 | |
|           - truenas/core/13.0/core-iscsi.yaml
 | |
|           - truenas/core/13.0/core-nfs.yaml
 | |
|           # 80 char limit
 | |
|           - truenas/core/13.0/core-smb.yaml
 | |
|     runs-on:
 | |
|       - self-hosted
 | |
|       - Linux
 | |
|       - X64
 | |
|       - csi-sanity-zfs-local
 | |
|       #- csi-sanity-truenas-core
 | |
|     steps:
 | |
|       - uses: actions/checkout@v2
 | |
|       - uses: actions/download-artifact@v2
 | |
|         with:
 | |
|           name: node-modules-linux-amd64
 | |
|       - name: csi-sanity
 | |
|         run: |
 | |
|           # run tests
 | |
|           ci/bin/run.sh          
 | |
|         env:
 | |
|           TEMPLATE_CONFIG_FILE: "./ci/configs/${{ matrix.config }}"
 | |
|           TRUENAS_HOST: ${{ secrets.SANITY_TRUENAS_CORE_13_0_HOST }}
 | |
|           TRUENAS_USERNAME: ${{ secrets.SANITY_TRUENAS_USERNAME }}
 | |
|           TRUENAS_PASSWORD: ${{ secrets.SANITY_TRUENAS_PASSWORD }}
 | |
| 
 | |
|   # ssh-based drivers
 | |
|   csi-sanity-zfs-generic:
 | |
|     needs:
 | |
|       - build-npm-linux-amd64
 | |
|     strategy:
 | |
|       fail-fast: false
 | |
|       matrix:
 | |
|         config:
 | |
|           - zfs-generic/iscsi.yaml
 | |
|           - zfs-generic/nfs.yaml
 | |
|           - zfs-generic/smb.yaml
 | |
|     runs-on:
 | |
|       - self-hosted
 | |
|       - Linux
 | |
|       - X64
 | |
|       - csi-sanity-zfs-generic
 | |
|     steps:
 | |
|       - uses: actions/checkout@v2
 | |
|       - uses: actions/download-artifact@v2
 | |
|         with:
 | |
|           name: node-modules-linux-amd64
 | |
|       - name: csi-sanity
 | |
|         run: |
 | |
|           # run tests
 | |
|           ci/bin/run.sh          
 | |
|         env:
 | |
|           TEMPLATE_CONFIG_FILE: "./ci/configs/${{ matrix.config }}"
 | |
|           SERVER_HOST: ${{ secrets.SANITY_ZFS_GENERIC_HOST }}
 | |
|           SERVER_USERNAME: ${{ secrets.SANITY_ZFS_GENERIC_USERNAME }}
 | |
|           SERVER_PASSWORD: ${{ secrets.SANITY_ZFS_GENERIC_PASSWORD }}
 | |
| 
 | |
|   # zfs-local drivers
 | |
|   csi-sanity-zfs-local:
 | |
|     needs:
 | |
|       - build-npm-linux-amd64
 | |
|     strategy:
 | |
|       fail-fast: false
 | |
|       matrix:
 | |
|         config:
 | |
|           - zfs-local/zvol.yaml
 | |
|           - zfs-local/dataset.yaml
 | |
|     runs-on:
 | |
|       - self-hosted
 | |
|       - Linux
 | |
|       - X64
 | |
|       - csi-sanity-zfs-local
 | |
|     steps:
 | |
|       - uses: actions/checkout@v2
 | |
|       - uses: actions/download-artifact@v2
 | |
|         with:
 | |
|           name: node-modules-linux-amd64
 | |
|       - name: csi-sanity
 | |
|         run: |
 | |
|           # run tests
 | |
|           ci/bin/run.sh          
 | |
|         env:
 | |
|           TEMPLATE_CONFIG_FILE: "./ci/configs/${{ matrix.config }}"
 | |
| 
 | |
|   # local-hostpath driver
 | |
|   csi-sanity-local-hostpath:
 | |
|     needs:
 | |
|       - build-npm-linux-amd64
 | |
|     strategy:
 | |
|       fail-fast: false
 | |
|       matrix:
 | |
|         config:
 | |
|           - local-hostpath/basic.yaml
 | |
|     runs-on:
 | |
|       - self-hosted
 | |
|       - Linux
 | |
|       - X64
 | |
|       - csi-sanity-zfs-local
 | |
|     steps:
 | |
|       - uses: actions/checkout@v2
 | |
|       - uses: actions/download-artifact@v2
 | |
|         with:
 | |
|           name: node-modules-linux-amd64
 | |
|       - name: csi-sanity
 | |
|         run: |
 | |
|           # run tests
 | |
|           ci/bin/run.sh          
 | |
|         env:
 | |
|           TEMPLATE_CONFIG_FILE: "./ci/configs/${{ matrix.config }}"
 | |
|           CSI_SANITY_SKIP: "should fail when requesting to create a snapshot with already existing name and different source volume ID|should fail when requesting to create a volume with already existing name and different capacity"
 | |
| 
 | |
|   csi-sanity-windows-node:
 | |
|     needs:
 | |
|       - build-npm-windows-amd64
 | |
|     strategy:
 | |
|       fail-fast: false
 | |
|       matrix:
 | |
|         config:
 | |
|           - windows\iscsi.yaml
 | |
|           - windows\smb.yaml
 | |
|     runs-on:
 | |
|       - self-hosted
 | |
|       - Windows
 | |
|       - X64
 | |
|     steps:
 | |
|       - uses: actions/checkout@v2
 | |
|       - uses: actions/download-artifact@v2
 | |
|         with:
 | |
|           name: node-modules-windows-amd64
 | |
|       - name: csi-sanity
 | |
|         run: |
 | |
|           # run tests
 | |
|           ci\bin\run.ps1          
 | |
|         env:
 | |
|           TEMPLATE_CONFIG_FILE: ".\\ci\\configs\\${{ matrix.config }}"
 | |
|           SERVER_HOST: ${{ secrets.SANITY_ZFS_GENERIC_HOST }}
 | |
|           SERVER_USERNAME: ${{ secrets.SANITY_ZFS_GENERIC_USERNAME }}
 | |
|           SERVER_PASSWORD: ${{ secrets.SANITY_ZFS_GENERIC_PASSWORD }}
 | |
| 
 | |
|   build-docker-linux:
 | |
|     needs:
 | |
|       - csi-sanity-synology-dsm6
 | |
|       - csi-sanity-synology-dsm7
 | |
|       - csi-sanity-truenas-scale-22_02
 | |
|       - csi-sanity-truenas-core-12_0
 | |
|       - csi-sanity-truenas-core-13_0
 | |
|       - csi-sanity-zfs-generic
 | |
|       - csi-sanity-zfs-local
 | |
|       - csi-sanity-local-hostpath
 | |
|       - csi-sanity-windows-node
 | |
|     runs-on: ubuntu-latest
 | |
|     steps:
 | |
|       - uses: actions/checkout@v2
 | |
|       - name: docker build
 | |
|         run: |
 | |
|           export ARCH=$([ $(uname -m) = "x86_64" ] && echo "amd64" || echo "arm64")
 | |
|           mkdir -p ~/.docker/cli-plugins/
 | |
|           wget -qO ~/.docker/cli-plugins/docker-buildx https://github.com/docker/buildx/releases/download/v0.8.2/buildx-v0.8.2.linux-${ARCH}
 | |
|           chmod a+x ~/.docker/cli-plugins/docker-buildx
 | |
|           docker info
 | |
|           docker buildx version
 | |
|           docker buildx ls
 | |
|           docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
 | |
|           docker buildx create --name xbuilder --use
 | |
|           docker buildx inspect --bootstrap
 | |
|           .github/bin/docker-release.sh          
 | |
| 
 | |
|         env:
 | |
|           DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
 | |
|           DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
 | |
|           GHCR_USERNAME: ${{ secrets.GHCR_USERNAME }}
 | |
|           GHCR_PASSWORD: ${{ secrets.GHCR_PASSWORD }}
 | |
|           DOCKER_CLI_EXPERIMENTAL: enabled
 | |
|           DOCKER_BUILD_PLATFORM: linux/amd64,linux/arm64,linux/arm/v7,linux/s390x,linux/ppc64le
 |