|
| 1 | +name: Test run on minikube |
1 | 2 | on:
|
2 |
| - release: |
3 |
| - types: [published] |
| 3 | + - pull_request |
4 | 4 | jobs:
|
5 |
| - CASTOR_validation: |
| 5 | + job1: |
6 | 6 | runs-on: ubuntu-latest
|
7 |
| - name: CASTOR validation |
| 7 | + name: argo workflow on minikube with output |
8 | 8 | steps:
|
9 |
| - # To use this repository's private action, you must check out the repository, v2 is part of the action name |
10 |
| - - name: Checkout |
11 |
| - #uses: actions/checkout@v2 |
12 |
| - run: | |
13 |
| - pwd |
14 |
| - ls -l |
15 |
| - # (could use checkout action instead) |
16 |
| - git clone git://github.com/katilp/CastorDataValidation.git workdir |
17 |
| - cd workdir |
18 |
| - chmod +x commands.sh |
19 |
| - ls -l |
20 |
| -
|
21 |
| - - name: In the container action step |
22 |
| - id: inspect |
23 |
| - run: | |
24 |
| - pwd |
25 |
| - ls -l |
26 |
| - # NB the event number is passed at the end of this line: |
27 |
| - docker run -v $(pwd):/mountedvolume -w /home/cmsusr gitlab-registry.cern.ch/clange/cmssw-docker/cmssw_4_2_8_lowpupatch1 /bin/bash /mountedvolume/workdir/commands.sh 20000 |
28 |
| -
|
29 |
| - - name: Upload artifact |
30 |
| - uses: actions/upload-artifact@v2 |
31 |
| - with: |
32 |
| - name: output |
33 |
| - path: outputs/ |
34 |
| - |
| 9 | + - uses: actions/checkout@v2 |
| 10 | + - name: Start minikube |
| 11 | + uses: medyagh/setup-minikube@master |
| 12 | + - name: Set up persistent volume and storage pod |
| 13 | + run: | |
| 14 | + kubectl apply -f volumes.yaml |
| 15 | + - name: Set up argo |
| 16 | + run: | |
| 17 | + kubectl create ns argo |
| 18 | + kubectl apply -n argo -f https://raw.githubusercontent.com/argoproj/argo/stable/manifests/quick-start-postgres.yaml |
| 19 | + curl -sLO https://github.com/argoproj/argo/releases/download/v2.10.0-rc3/argo-linux-amd64 |
| 20 | + chmod +x argo-linux-amd64 |
| 21 | + mv ./argo-linux-amd64 $HOME/bin/argo |
| 22 | + argo version |
| 23 | + - name: Submit the argo test workflow |
| 24 | + run: | |
| 25 | + argo submit -n argo --wait argo-workflow.yaml |
| 26 | + argo get -n argo @latest |
| 27 | + - name: Check the output |
| 28 | + run: | |
| 29 | + argo logs -n argo @latest |
| 30 | + mkdir outputs |
| 31 | + echo Copy file with kubectl cp task-pv-pod:/mnt/data/ outputs/ : |
| 32 | + kubectl cp task-pv-pod:/mnt/data/ outputs/ |
| 33 | + echo ls -l : |
| 34 | + ls -l |
| 35 | + - name: Upload the ouput as a github artifact |
| 36 | + uses: actions/upload-artifact@v2 |
| 37 | + with: |
| 38 | + name: output |
| 39 | + path: outputs/ |
0 commit comments