attempt to build once and use artifacts for ci
Signed-off-by: Travis Glenn Hansen <travisghansen@yahoo.com>
This commit is contained in:
parent
5bf7925312
commit
03918f9443
|
|
@ -17,7 +17,25 @@ jobs:
|
||||||
with:
|
with:
|
||||||
access_token: ${{ github.token }}
|
access_token: ${{ github.token }}
|
||||||
|
|
||||||
|
build-npm:
|
||||||
|
name: build
|
||||||
|
runs-on:
|
||||||
|
- self-hosted
|
||||||
|
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
|
||||||
|
path: node_modules/
|
||||||
|
|
||||||
csi-sanity-synology:
|
csi-sanity-synology:
|
||||||
|
needs:
|
||||||
|
- build-npm
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
|
@ -28,6 +46,9 @@ jobs:
|
||||||
- csi-sanity-synology
|
- csi-sanity-synology
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: node-modules
|
||||||
- name: csi-sanity
|
- name: csi-sanity
|
||||||
run: |
|
run: |
|
||||||
# run tests
|
# run tests
|
||||||
|
|
@ -42,6 +63,8 @@ jobs:
|
||||||
|
|
||||||
# api-based drivers
|
# api-based drivers
|
||||||
csi-sanity-truenas-scale-22_02:
|
csi-sanity-truenas-scale-22_02:
|
||||||
|
needs:
|
||||||
|
- build-npm
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
|
@ -56,6 +79,9 @@ jobs:
|
||||||
#- csi-sanity-truenas-scale
|
#- csi-sanity-truenas-scale
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: node-modules
|
||||||
- name: csi-sanity
|
- name: csi-sanity
|
||||||
run: |
|
run: |
|
||||||
# run tests
|
# run tests
|
||||||
|
|
@ -68,6 +94,8 @@ jobs:
|
||||||
|
|
||||||
# ssh-based drivers
|
# ssh-based drivers
|
||||||
csi-sanity-truenas-core-12_0:
|
csi-sanity-truenas-core-12_0:
|
||||||
|
needs:
|
||||||
|
- build-npm
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
|
@ -83,6 +111,9 @@ jobs:
|
||||||
#- csi-sanity-truenas-core
|
#- csi-sanity-truenas-core
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: node-modules
|
||||||
- name: csi-sanity
|
- name: csi-sanity
|
||||||
run: |
|
run: |
|
||||||
# run tests
|
# run tests
|
||||||
|
|
@ -95,6 +126,8 @@ jobs:
|
||||||
|
|
||||||
# ssh-based drivers
|
# ssh-based drivers
|
||||||
csi-sanity-truenas-core-13_0:
|
csi-sanity-truenas-core-13_0:
|
||||||
|
needs:
|
||||||
|
- build-npm
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
|
@ -109,6 +142,9 @@ jobs:
|
||||||
#- csi-sanity-truenas-core
|
#- csi-sanity-truenas-core
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: node-modules
|
||||||
- name: csi-sanity
|
- name: csi-sanity
|
||||||
run: |
|
run: |
|
||||||
# run tests
|
# run tests
|
||||||
|
|
@ -122,6 +158,8 @@ jobs:
|
||||||
|
|
||||||
# ssh-based drivers
|
# ssh-based drivers
|
||||||
csi-sanity-zfs-generic:
|
csi-sanity-zfs-generic:
|
||||||
|
needs:
|
||||||
|
- build-npm
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
|
@ -133,6 +171,9 @@ jobs:
|
||||||
- csi-sanity-zfs-generic
|
- csi-sanity-zfs-generic
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: node-modules
|
||||||
- name: csi-sanity
|
- name: csi-sanity
|
||||||
run: |
|
run: |
|
||||||
# run tests
|
# run tests
|
||||||
|
|
@ -145,6 +186,8 @@ jobs:
|
||||||
|
|
||||||
# zfs-local drivers
|
# zfs-local drivers
|
||||||
csi-sanity-zfs-local:
|
csi-sanity-zfs-local:
|
||||||
|
needs:
|
||||||
|
- build-npm
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
|
@ -156,6 +199,9 @@ jobs:
|
||||||
- csi-sanity-zfs-local
|
- csi-sanity-zfs-local
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: node-modules
|
||||||
- name: csi-sanity
|
- name: csi-sanity
|
||||||
run: |
|
run: |
|
||||||
# run tests
|
# run tests
|
||||||
|
|
@ -163,7 +209,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
TEMPLATE_CONFIG_FILE: "./ci/configs/${{ matrix.config }}"
|
TEMPLATE_CONFIG_FILE: "./ci/configs/${{ matrix.config }}"
|
||||||
|
|
||||||
build:
|
build-docker:
|
||||||
needs:
|
needs:
|
||||||
- csi-sanity-synology
|
- csi-sanity-synology
|
||||||
- csi-sanity-truenas-scale-22_02
|
- csi-sanity-truenas-scale-22_02
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -x
|
||||||
|
|
||||||
|
export PATH="/usr/local/lib/nodejs/bin:${PATH}"
|
||||||
|
# install deps
|
||||||
|
npm i
|
||||||
|
|
@ -13,7 +13,7 @@ trap _term EXIT
|
||||||
|
|
||||||
export PATH="/usr/local/lib/nodejs/bin:${PATH}"
|
export PATH="/usr/local/lib/nodejs/bin:${PATH}"
|
||||||
# install deps
|
# install deps
|
||||||
npm i
|
#npm i
|
||||||
|
|
||||||
# generate key for paths etc
|
# generate key for paths etc
|
||||||
export CI_BUILD_KEY=$(uuidgen | cut -d "-" -f 1)
|
export CI_BUILD_KEY=$(uuidgen | cut -d "-" -f 1)
|
||||||
|
|
@ -28,7 +28,7 @@ SUDO_PID=$!
|
||||||
: ${CSI_ENDPOINT:=/tmp/csi-${CI_BUILD_KEY}.sock}
|
: ${CSI_ENDPOINT:=/tmp/csi-${CI_BUILD_KEY}.sock}
|
||||||
iter=0
|
iter=0
|
||||||
max_iter=60
|
max_iter=60
|
||||||
while [ ! -f "${CSI_ENDPOINT}" ];do
|
while [ ! -S "${CSI_ENDPOINT}" ];do
|
||||||
((++iter))
|
((++iter))
|
||||||
echo "waiting for ${CSI_ENDPOINT} to appear"
|
echo "waiting for ${CSI_ENDPOINT} to appear"
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue