66env :
77 ARTIFACTS_PATH : artifacts
88 CORE_BRANCH : " master"
9+ # Space-separated list of elements to install as dependencies
10+ ELEMENT_DEPS : " "
911 PACKER_VERSION : " 1.9.2"
1012 CORE_ENDPOINT_URL : http://10.20.0.2:80/api/core
1113 CORE_USERNAME : " admin"
@@ -36,16 +38,16 @@ jobs:
3638 PUSH_EXORDOS_CFG : ${{ secrets.PUSH_EXORDOS_CFG }}
3739 run : |
3840 set -eux
39-
41+
4042 mkdir -p ${ARTIFACTS_PATH}
4143
4244 VERSION="$(exordos get-version .)"
43-
45+
4446 exordos build $(pwd)
45-
47+
4648 echo "$PUSH_EXORDOS_CFG" | base64 -d > exordos/exordos.push.yaml
4749 exordos push -c exordos/exordos.push.yaml -t exordos_repo -f --latest
48-
50+
4951 echo "${VERSION}" > "${ARTIFACTS_PATH}/version.txt"
5052 - name : Upload the build artifacts
5153 uses : actions/upload-artifact@v7
6062 run :
6163 exordos bootstrap -i latest -f -m core --admin-password $CORE_PASSWORD --cidr 10.20.0.0/22
6264 - name : Wait for Exordos Core API
63- run : |
65+ run : |
6466 for i in {1..60}; do
6567 if exordos ready_api; then
6668 echo "Exordos Core API is ready"
7072 sleep 5
7173 done
7274 - name : Set hypervisor with overbooking
73- run : |
74- HYPER_UUID="$(exordos c h l -o json | jq -r .[0]."UUID ")"
75+ run : |
76+ HYPER_UUID="$(exordos c h l -o json | jq -r .[0]."uuid ")"
7577 exordos compute hypervisors update $HYPER_UUID --cores-ratio 10.0 --ram-ratio 10.0
78+ - name : Preload dependencies in background
79+ run : |
80+ for dep in $ELEMENT_DEPS; do
81+ exordos e elements install $dep
82+ done
7683 - name : Download build artifacts
7784 uses : actions/download-artifact@v8
7885 with :
@@ -86,11 +93,11 @@ jobs:
8693 timeout-minutes : 10
8794 run : |
8895 set -eux
89-
90- while [ $(exordos ee l -o json -f name=$ELEMENT_NAME | jq -r .[0]."Status ") != "ACTIVE" ]; do
96+
97+ while [ $(exordos ee l -o json -f name=$ELEMENT_NAME | jq -r .[0]."status ") != "ACTIVE" ]; do
9198 sleep 5
9299 done
93-
100+
94101 exordos e e show $ELEMENT_NAME
95102 - name : Setup upterm session
96103 uses : owenthereal/action-upterm@v1
0 commit comments