2024-08-27 18:23:50 +03:00
name : Building cloud-images
2024-04-26 18:25:50 +03:00
on :
push :
tags :
2024-09-02 17:37:59 +03:00
- 'build*'
2024-04-26 18:25:50 +03:00
jobs :
2024-08-27 18:23:50 +03:00
building :
2024-04-26 18:25:50 +03:00
runs-on : alt-sisyphus
steps :
- name : Configure ssh
run : |
mkdir -p ~/.ssh/
echo "$SSH_KEY" > ~/.ssh/builder.key
chmod 600 ~/.ssh/builder.key
2024-08-27 18:31:49 +03:00
echo "SSH_USER=$SSH_USER, SSH_HOST=$SSH_HOST, SSH_TAISHAN_USER=$SSH_T_USER, SSH_TAISHAN_HOST=$SSH_T_HOST, SSH_TAISHAN_PORT=$SSH_T_PORT"
#> ~/.ssh/known_hosts #SSH_KH: ${{ secrets.BUILDER_SSH_KH }}
2024-04-26 18:25:50 +03:00
cat >>~/.ssh/config <<END
Host builder
HostName $SSH_HOST
User $SSH_USER
IdentityFile ~/.ssh/builder.key
StrictHostKeyChecking no
Host taishan
2024-09-16 12:42:47 +03:00
HostName 127.0.0.1
2024-04-26 18:25:50 +03:00
User $SSH_T_USER
Port $SSH_T_PORT
IdentityFile ~/.ssh/builder.key
2024-09-16 12:42:47 +03:00
IdentitiesOnly yes
ProxyCommand ssh $SSH_T_USER@$SSH_T_HOST -W %h:%p
2024-04-26 18:25:50 +03:00
StrictHostKeyChecking no
2024-08-27 18:31:49 +03:00
END
2024-04-26 18:25:50 +03:00
env :
SSH_USER : ${{ secrets.BUILDER_SSH_USER }}
SSH_KEY : ${{ secrets.BUILDER_SSH_KEY }}
SSH_HOST : ${{ secrets.BUILDER_SSH_HOST }}
2024-08-27 18:31:49 +03:00
SSH_T_USER : ${{ secrets.TAISHAN_SSH_USER }}
SSH_T_PORT : ${{ secrets.TAISHAN_SSH_PORT }}
SSH_T_HOST : ${{ secrets.TAISHAN_SSH_HOST }}
2024-04-26 18:25:50 +03:00
- name : Display Python version
run : ssh builder 'python3 --version'
- name : Check script folder
run : |
2024-08-27 18:31:49 +03:00
ssh builder 'ls -a cloud-build/'
2024-04-26 18:25:50 +03:00
- name : Update building script from git
run : |
2024-09-16 12:42:47 +03:00
ssh builder 'cd cloud-build && git fetch origin && git pull -f origin configs --rebase'
2024-04-26 18:25:50 +03:00
- name : Run script for x86
run : |
2024-08-27 18:31:49 +03:00
ssh builder 'cd cloud-build && ./cloud-build.py -c ./configs/cb-ve-x86.yaml \
2024-04-26 18:25:50 +03:00
--stages build test sync --create-remote-dirs'
- name : Check scripts result for x86
run : |
2024-08-27 18:31:49 +03:00
ssh builder 'ls -a images/Sisyphus/x86_64/'
2024-04-26 18:25:50 +03:00
- name : Run script for vm
run : |
2024-08-27 18:31:49 +03:00
ssh builder 'cd cloud-build && ./cloud-build.py -c ./configs/cb-vm.yaml \
2024-04-26 18:25:50 +03:00
--stages build test sync --create-remote-dirs'
- name : Check scripts result for vm
run : |
2024-08-27 18:31:49 +03:00
ssh builder 'ls -a images/Sisyphus/x86_64/'
2024-09-16 12:42:47 +03:00
- name : Update building script from git
run : |
ssh taishan 'cd cloud-build && git fetch origin && git pull -f origin configs --rebase'
2024-04-26 18:25:50 +03:00
- name : Run script for aarch
2024-08-27 18:31:49 +03:00
run : |
2024-09-16 12:42:47 +03:00
ssh taishan 'cd cloud-build && ./cloud-build.py -c ./configs/cb-aarch64.yaml \
2024-08-27 18:31:49 +03:00
--stages build test sync --create-remote-dirs'
2024-04-26 18:25:50 +03:00
- name : Check scripts result for aarch
2024-08-27 18:31:49 +03:00
run : |
ssh builder 'ls -a images/Sisyphus/aarch64/'
2024-04-26 18:25:50 +03:00
- run : echo "This job's status is ${{ job.status }}."