-
Notifications
You must be signed in to change notification settings - Fork 1
130 lines (111 loc) · 4.91 KB
/
ubuntu_22_and_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: Ubuntu22.04 Test
on:
push:
branches:
- develop
pull_request:
branches:
- develop
workflow_dispatch:
env:
FABRIC_TOKEN: ${{ secrets.FABRIC_TOKEN }}
FABRIC_BASTION_KEY: ${{ secrets.FABRIC_BASTION_KEY }}
FABRIC_SLIVER_KEY: ${{ secrets.FABRIC_SLIVER_KEY }}
FABRIC_SLIVER_PUBKEY: ${{ secrets.FABRIC_SLIVER_PUBKEY }}
FABRIC_PROJECT: ${{ secrets.FABRIC_PROJECT }}
FABRIC_USER: ${{ secrets.FABRIC_USER }}
SENSE_USER: ${{ secrets.SENSE_USER }}
SENSE_PASSWORD: ${{ secrets.SENSE_PASSWORD }}
SENSE_SECRET: ${{ secrets.SENSE_SECRET }}
SENSE_SLIVER_KEY: ${{ secrets.SENSE_SLIVER_KEY }}
CLAB_USER: ${{ secrets.CLAB_USER }}
CLAB_SLIVER_KEY: ${{ secrets.CLAB_SLIVER_KEY }}
CLAB_PEM_FILE: ${{ secrets.CLAB_PEM_FILE }}
RUN_FABRIC_AWS_SENSE: ${{ vars.RUN_FABRIC_AWS_SENSE }}
RUN_CLAB: ${{ vars.RUN_CLAB }}
RUN_FABRIC_AWS_WITH_NODES: ${{ vars.RUN_FABRIC_AWS_WITH_NODES }}
jobs:
UbuntuTest:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Print Versions
run: |
python3 --version
pip --version
pwd
whoami
echo ${{ github.workspace }}
echo $HOME
- name: Install Fabfed And Requirements
run: |
pip install --upgrade pip
pip install setuptools --upgrade
pip install --no-cache-dir --ignore-requires-python neo4j==5.18.0
pip list -v | grep neo4j
pip install --no-cache-dir --ignore-requires-python -r requirements.txt
python3 -m pip install --no-cache-dir .
pip install --no-cache-dir git+https://gitlab.flux.utah.edu/stoller/portal-tools.git
- name: Run Unit Tests
run: |
pytest tests
- name: Test Stitch Policy
run: |
fabfed stitch-policy -providers "chi,fabric"
fabfed stitch-policy -providers "cloudlab,fabric"
fabfed stitch-policy -providers "aws,fabric"
fabfed stitch-policy -providers "gcp,fabric"
- name: Show Sessions
run: |
fabfed sessions -show
fabfed sessions -show -json
- name: Save Credentials
run: |
mkdir -p ${{ github.workspace }}/creds
echo ${{ env.FABRIC_TOKEN }} | base64 --decode > ${{ github.workspace }}/creds/token.json
echo ${{ env.FABRIC_BASTION_KEY }} | base64 --decode > ${{ github.workspace }}/creds/bastion
echo ${{ env.FABRIC_SLIVER_KEY }} | base64 --decode > ${{ github.workspace }}/creds/sliver
echo ${{ env.FABRIC_SLIVER_PUBKEY }} | base64 --decode > ${{ github.workspace }}/creds/sliver.pub
echo ${{ env.SENSE_SLIVER_KEY }} | base64 --decode > ${{ github.workspace }}/creds/sense
echo ${{ env.CLAB_SLIVER_KEY }} | base64 --decode > ${{ github.workspace }}/creds/cloudlab
echo ${{ env.CLAB_PEM_FILE }} | base64 --decode > ${{ github.workspace }}/creds/cloudlab.pem
- name: Test Cloudlab
# if: ${{ env.RUN_CLAB == 'true' }}
if: false
run: |
session=cicd-clab
echo "site: CLEM" > $session-varfile.yml
${{ github.workspace }}/cicd/run-fabfed.sh cicd/test_configs/cloudlab $session $session-varfile.yml
- name: Test Fabric FacilityPort
# if: ${{ env.RUN_FABRIC_AWS_SENSE == 'false' || env.RUN_FABRIC_AWS_SENSE == false }}
# need to allow for this after changes made for fabric as middle
if: false
run: |
session=cicd-fabric-facility-port
echo "vlan: 3102" > $session-varfile.yml
${{ github.workspace }}/cicd/run-fabfed.sh cicd/test_configs/fabric_facility_port $session $session-varfile.yml
- name: Test L2VPN with nodes.
# if: ${{ env.RUN_FABRIC_AWS_SENSE == 'false' || env.RUN_FABRIC_AWS_SENSE == false }}
if: false
run: |
${{ github.workspace }}/cicd/run-fabfed.sh cicd/test_configs/fabric_l2_vpn cicd-fabric-l2-vpn
- name: Test Fabric AWS (Fabric Only With No Nodes)
if: false
run: |
session=aes-aws-native-no-nodes
echo "vlan: 7" > $session-varfile.yml
echo "node_count: 0" >> $session-varfile.yml
${{ github.workspace }}/cicd/run-fabfed.sh cicd/test_configs/fabric_native_aws $session $session-varfile.yml
- name: Test Fabric AWS (Fabric Only With Nodes)
# if: ${{ env.RUN_FABRIC_AWS_WITH_NODES == 'true' || env.RUN_FABRIC_AWS_WITH_NODES == true }}
if: false
run: |
session=aes-aws-native-with-nodes
echo "vlan: 7" > $session-varfile.yml
${{ github.workspace }}/cicd/run-fabfed.sh cicd/test_configs/fabric_native_aws $session $session-varfile.yml
- name: Test SENSE/AWS.
# if: ${{ env.RUN_FABRIC_AWS_SENSE == 'true' || env.RUN_FABRIC_AWS_SENSE == true }}
if: false
run: |
${{ github.workspace }}/cicd/run-fabfed.sh cicd/test_configs/fabric_sense_aws cicd-sense-aws