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-11-06 16:32:19 +03:00
building-x86-container :
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
cat >>~/.ssh/config <<END
Host builder
HostName $SSH_HOST
User $SSH_USER
IdentityFile ~/.ssh/builder.key
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 }}
- 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-11-06 16:32:19 +03:00
- name : Run script for containers on x86
2024-04-26 18:25:50 +03:00
run : |
2024-08-27 18:31:49 +03:00
ssh builder 'cd cloud-build && ./cloud-build.py -c ./configs/cb-ve-x86.yaml \
2024-11-06 16:32:19 +03:00
--stages build test sync --create-remote-dirs'
building-other-container :
runs-on : alt-sisyphus
if : ${{ always() }}
needs : building-x86-container
steps :
- name : Configure ssh
run : |
mkdir -p ~/.ssh/
echo "$SSH_KEY" > ~/.ssh/builder.key
chmod 600 ~/.ssh/builder.key
cat >>~/.ssh/config <<END
Host builder
HostName $SSH_HOST
User $SSH_USER
IdentityFile ~/.ssh/builder.key
StrictHostKeyChecking no
END
env :
SSH_USER : ${{ secrets.BUILDER_SSH_USER }}
SSH_KEY : ${{ secrets.BUILDER_SSH_KEY }}
SSH_HOST : ${{ secrets.BUILDER_SSH_HOST }}
- name : Update building script from git
run : |
ssh builder 'cd cloud-build && git fetch origin && git pull -f origin configs --rebase'
- name : Run script for containers on other arches
2024-10-15 17:32:08 +03:00
run : |
2024-11-06 16:32:19 +03:00
ssh builder 'cd cloud-build && ./cloud-build.py -c ./configs/cb-ve-other.yaml \
2024-10-15 17:32:08 +03:00
--stages build test sync --create-remote-dirs'
2024-10-15 17:24:01 +03:00
building-x86-vm :
runs-on : alt-sisyphus
2024-10-15 18:48:10 +03:00
if : ${{ always() }}
2024-11-06 16:32:19 +03:00
needs : [ building-x86-container, building-other-container]
2024-10-15 17:24:01 +03:00
steps :
- name : Configure ssh
2024-04-26 18:25:50 +03:00
run : |
2024-10-15 17:24:01 +03:00
mkdir -p ~/.ssh/
echo "$SSH_KEY" > ~/.ssh/builder.key
chmod 600 ~/.ssh/builder.key
cat >>~/.ssh/config <<END
Host builder
HostName $SSH_HOST
User $SSH_USER
IdentityFile ~/.ssh/builder.key
StrictHostKeyChecking no
END
env :
SSH_USER : ${{ secrets.BUILDER_SSH_USER }}
SSH_KEY : ${{ secrets.BUILDER_SSH_KEY }}
SSH_HOST : ${{ secrets.BUILDER_SSH_HOST }}
- name : Update building script from git
2024-04-26 18:25:50 +03:00
run : |
2024-10-15 17:24:01 +03:00
ssh builder 'cd cloud-build && git fetch origin && git pull -f origin configs --rebase'
2024-11-06 16:32:19 +03:00
- name : Run script for vm x86
2024-10-15 17:24:01 +03:00
run : |
2024-08-27 18:31:49 +03:00
ssh builder 'cd cloud-build && ./cloud-build.py -c ./configs/cb-vm.yaml \
2024-10-15 17:24:01 +03:00
--stages build test sync --create-remote-dirs'
building-aarch :
runs-on : alt-sisyphus
steps :
- name : Configure ssh
2024-04-26 18:25:50 +03:00
run : |
2024-10-15 17:24:01 +03:00
mkdir -p ~/.ssh/
echo "$SSH_KEY" > ~/.ssh/builder.key
chmod 600 ~/.ssh/builder.key
cat >>~/.ssh/config <<END
Host abuilder
HostName $SSH_T_HOST
User $SSH_T_USER
IdentityFile ~/.ssh/builder.key
IdentitiesOnly yes
StrictHostKeyChecking no
END
env :
SSH_KEY : ${{ secrets.BUILDER_SSH_KEY }}
SSH_T_USER : ${{ secrets.TAISHAN_SSH_USER }}
SSH_T_HOST : ${{ secrets.TAISHAN_SSH_HOST }}
2024-09-16 12:42:47 +03:00
- name : Update building script from git
run : |
2024-10-15 17:24:01 +03:00
ssh -A abuilder "ssh builder 'cd cloud-build && git fetch origin && git pull -f origin configs --rebase'"
2024-11-06 16:32:19 +03:00
- name : Run script for container on aarch
2024-08-27 18:31:49 +03:00
run : |
2024-11-06 16:32:19 +03:00
ssh -A abuilder "ssh builder 'cd cloud-build && ./cloud-build.py -c ./configs/cb-ve-aarch64.yaml --stages build test sync --create-remote-dirs'"
- name : Run script for vm aarch
2024-10-15 17:32:08 +03:00
run : |
2024-11-06 16:32:19 +03:00
ssh -A abuilder "ssh builder 'cd cloud-build && ./cloud-build.py -c ./configs/cb-vm-aarch64.yaml --stages build test sync --create-remote-dirs'"