forked from alt/image-forge
run all wf wf with alt-sisyphus
This commit is contained in:
parent
4da3ba20e1
commit
50e125d59d
@ -2,7 +2,7 @@ name: Full building alt images
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'sisyphus_*'
|
- '*_*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-process:
|
build-process:
|
||||||
@ -25,6 +25,13 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GU: ${{ gitea.server_url }}
|
GU: ${{ gitea.server_url }}
|
||||||
GR: ${{ gitea.repository }}
|
GR: ${{ gitea.repository }}
|
||||||
|
- name: Set repo for c10f2 (Temporary)
|
||||||
|
if: ${{ contains(github.ref_name, 'c10f2') }}
|
||||||
|
run: |
|
||||||
|
echo "event tag=${{ github.ref_name }}"
|
||||||
|
echo "10.4.0.3 update.altsp.su" >> /etc/hosts
|
||||||
|
echo "cat /etc/hosts"
|
||||||
|
cat /etc/hosts
|
||||||
- name: Update apt
|
- name: Update apt
|
||||||
uses: actions/init-alt-env@v1
|
uses: actions/init-alt-env@v1
|
||||||
- name: Install requires
|
- name: Install requires
|
||||||
@ -54,10 +61,11 @@ jobs:
|
|||||||
- name: Run building script
|
- name: Run building script
|
||||||
id: build-script
|
id: build-script
|
||||||
run: |
|
run: |
|
||||||
build_args="-b $BR -o $ORG --skip-images alt/distroless-devel --arches amd64 386 arm64 loong64"
|
build_args="-b $BR -o $ORG --skip-images alt/distroless-devel"
|
||||||
if [[ $ORG == 'k8s' ]]; then build_args="$build_args --overwrite-organization $ORG-$BR --package-versions {\"k8s/kube-apiserver\":\"1.31\",\"k8s/kube-scheduler\":\"1.31\",\"k8s/kube-controller-manager\":\"1.31\",\"k8s/kube-proxy\":\"1.31\",\"k8s/coredns\":\"1.11.3\",\"k8s/kubelet\":\"1.31\"}"; fi
|
if [[ "$BR" == "sisyphus" ]]; then arches="--arches amd64 386 arm64 loong64"; else arches="--arches amd64 386 arm64"; fi
|
||||||
echo "build.py $build_args"
|
if [[ "$ORG" == "k8s" ]]; then build_args="$build_args --overwrite-organization $ORG-$BR --package-versions {\"k8s/kube-apiserver\":\"1.31\",\"k8s/kube-scheduler\":\"1.31\",\"k8s/kube-controller-manager\":\"1.31\",\"k8s/kube-proxy\":\"1.31\",\"k8s/coredns\":\"1.11.3\",\"k8s/kubelet\":\"1.31\"}"; fi
|
||||||
${{ gitea.workspace }}/build.py $build_args
|
echo "build.py $build_args $arches"
|
||||||
|
${{ gitea.workspace }}/build.py $build_args $arches
|
||||||
env:
|
env:
|
||||||
ORG: ${{ env.ORG }}
|
ORG: ${{ env.ORG }}
|
||||||
BR: ${{ env.BRANCH }}
|
BR: ${{ env.BRANCH }}
|
@ -1,133 +0,0 @@
|
|||||||
name: Full building alt images
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- '*10*_*'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-process:
|
|
||||||
runs-on: alt-p10
|
|
||||||
outputs:
|
|
||||||
branch: ${{ env.BRANCH }}
|
|
||||||
org: ${{ env.ORG }}
|
|
||||||
url: ${{ env.URL }}
|
|
||||||
repo: ${{ env.REPO }}
|
|
||||||
buildres: ${{ steps.build-script.outcome }}
|
|
||||||
steps:
|
|
||||||
- name: Check workspace
|
|
||||||
run: |
|
|
||||||
repourl=$(echo $GU | cut -d '/' -f 3)
|
|
||||||
echo "URL=$repourl" >> ${GITHUB_ENV}
|
|
||||||
echo $repourl
|
|
||||||
reponame=$(echo $GR | cut -d '/' -f 1)
|
|
||||||
echo "REPO=$reponame" >> ${GITHUB_ENV}
|
|
||||||
echo $reponame
|
|
||||||
env:
|
|
||||||
GU: ${{ gitea.server_url }}
|
|
||||||
GR: ${{ gitea.repository }}
|
|
||||||
- name: Set repo for c10f2 (Temporary)
|
|
||||||
if: ${{ contains(github.ref_name, 'c10f2') }}
|
|
||||||
run: |
|
|
||||||
echo "event tag=${{ github.ref_name }}"
|
|
||||||
echo "10.4.0.3 update.altsp.su" >> /etc/hosts
|
|
||||||
echo "cat /etc/hosts"
|
|
||||||
cat /etc/hosts
|
|
||||||
- name: Update apt
|
|
||||||
uses: actions/init-alt-env@v1
|
|
||||||
- name: Install requires
|
|
||||||
run: |
|
|
||||||
echo "apt-get install -y python3-module-tomli python3-module-jinja2 python3-module-yaml python3-module-requests podman buildah jq curl"
|
|
||||||
apt-get install -y python3-module-tomli python3-module-jinja2 python3-module-yaml python3-module-requests podman buildah jq curl
|
|
||||||
echo "apt-get install -y qemu-user-static-binfmt-aarch64 qemu-user-static-binfmt-arm qemu-user-static-binfmt-ppc qemu-user-static-binfmt-riscv qemu-user-static-binfmt-loongarch"
|
|
||||||
apt-get install -y qemu-user-static-binfmt-aarch64 qemu-user-static-binfmt-arm qemu-user-static-binfmt-ppc qemu-user-static-binfmt-riscv qemu-user-static-binfmt-loongarch
|
|
||||||
- name: Check out current repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Parse target branch and tag from events context, save to env
|
|
||||||
env:
|
|
||||||
EV: ${{ toJson(gitea.event) }}
|
|
||||||
run: |
|
|
||||||
echo $EV | jq '.ref' -r | sed "s/refs\/tags\//BRANCH=/g" | cut -d '_' -f 1
|
|
||||||
echo $EV | jq '.ref' -r | sed "s/refs\/tags\//BRANCH=/g" | cut -d '_' -f 1 >> ${GITHUB_ENV}
|
|
||||||
org=$(echo $EV | jq '.ref' -r | sed 's/refs\/tags\///g' | cut -d '_' -f 2)
|
|
||||||
echo "ORG=$org" >> ${GITHUB_ENV}
|
|
||||||
echo "ORG=$org"
|
|
||||||
- name: Login podman gitea
|
|
||||||
run: |
|
|
||||||
echo "podman login ${{ env.URL }}"
|
|
||||||
podman login --username $P_USER --password $P_PASS ${{ env.URL }}
|
|
||||||
env:
|
|
||||||
P_USER: ${{ secrets.PODMAN_USER }}
|
|
||||||
P_PASS: ${{ secrets.PODMAN_PASS }}
|
|
||||||
- name: Run building script
|
|
||||||
id: build-script
|
|
||||||
run: |
|
|
||||||
build_args="-b $BR -o $ORG --skip-images alt/distroless-devel --arches amd64 386 arm64"
|
|
||||||
if [[ $ORG == 'k8s' ]]; then build_args="$build_args --tags tags.toml --overwrite-organization $ORG-$BR --skip-images k8s/kube-apiserver k8s/kube-controller-manager k8s/kube-proxy k8s/kube-scheduler"; fi
|
|
||||||
echo "build.py $build_args"
|
|
||||||
${{ gitea.workspace }}/build.py $build_args
|
|
||||||
env:
|
|
||||||
ORG: ${{ env.ORG }}
|
|
||||||
BR: ${{ env.BRANCH }}
|
|
||||||
continue-on-error: true
|
|
||||||
- name: Send notification if build crashed
|
|
||||||
if: ${{ steps.build-script.outcome != 'success' }}
|
|
||||||
run: |
|
|
||||||
issueid=1
|
|
||||||
body="Building images finish with some errors."
|
|
||||||
curl -X 'POST' "$URL/api/v1/repos/$REPO/image-forge/issues/$issueid/comments?token=$T" -H 'accept: application/json' -H 'Content-Type: application/json' -d "{ \"body\": \"$body\" }" -s
|
|
||||||
echo "notification about test error is sent to issue $issueid"
|
|
||||||
env:
|
|
||||||
T: ${{ secrets.TOKEN }}
|
|
||||||
BR: ${{ env.BRANCH }}
|
|
||||||
URL: ${{ gitea.server_url }}
|
|
||||||
REPO: ${{ env.REPO }}
|
|
||||||
- name: Delete event tag
|
|
||||||
run: |
|
|
||||||
tagname=$(echo $EV | jq '.ref' -r | sed "s/refs\/tags\///g")
|
|
||||||
curl -X 'DELETE' "$URL/api/v1/repos/$REPO/image-forge/tags/$tagname?token=$T" -H 'accept: application/json' -s
|
|
||||||
echo "tag $tagname is deleted"
|
|
||||||
env:
|
|
||||||
T: ${{ secrets.TOKEN }}
|
|
||||||
BR: ${{ env.BRANCH }}
|
|
||||||
URL: ${{ gitea.server_url }}
|
|
||||||
REPO: ${{ env.REPO }}
|
|
||||||
EV: ${{ toJson(gitea.event) }}
|
|
||||||
test-process:
|
|
||||||
needs: build-process
|
|
||||||
if: ${{ needs.build-process.outputs.buildres == 'success' }}
|
|
||||||
runs-on: alt-p10
|
|
||||||
steps:
|
|
||||||
- name: Update apt
|
|
||||||
uses: actions/init-alt-env@v1
|
|
||||||
- name: Install requires
|
|
||||||
run: |
|
|
||||||
echo "apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah jq curl"
|
|
||||||
apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah jq curl
|
|
||||||
- name: Check out current repo
|
|
||||||
uses: https://gitea.com/actions/checkout@v4
|
|
||||||
- name: Test
|
|
||||||
id: test-script
|
|
||||||
continue-on-error: true
|
|
||||||
run: |
|
|
||||||
$WS/.gitea/workflows/testscript $BR $ORG $URL $REPO $WS
|
|
||||||
cat haserr.log >> ${GITHUB_ENV}
|
|
||||||
echo "test process finished"
|
|
||||||
env:
|
|
||||||
BR: ${{ needs.build-process.outputs.branch }}
|
|
||||||
ORG: ${{ needs.build-process.outputs.org }}
|
|
||||||
URL: ${{ needs.build-process.outputs.url }}
|
|
||||||
REPO: ${{ needs.build-process.outputs.repo }}
|
|
||||||
WS: ${{ gitea.workspace }}
|
|
||||||
- name: Send notification if test crashed
|
|
||||||
if: ${{ env.ERR == 'true' || steps.test-script.outcome == 'failure' }}
|
|
||||||
run: |
|
|
||||||
issueid=1
|
|
||||||
errors=$(cat errors.log)
|
|
||||||
body="Testing images finish with some errors. $errors"
|
|
||||||
curl -X 'POST' "$URL/api/v1/repos/$REPO/image-forge/issues/$issueid/comments?token=$T" -H 'accept: application/json' -H 'Content-Type: application/json' -d "{ \"body\": \"$body\" }" -s
|
|
||||||
echo "notification about test error is sent to issue $issueid"
|
|
||||||
env:
|
|
||||||
T: ${{ secrets.TOKEN }}
|
|
||||||
BR: ${{ needs.build-process.outputs.branch }}
|
|
||||||
URL: ${{ gitea.server_url }}
|
|
||||||
REPO: ${{ needs.build-process.outputs.repo }}
|
|
@ -1,133 +0,0 @@
|
|||||||
name: Full building alt images
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- 'p11_*'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-process:
|
|
||||||
runs-on: alt-sisyphus
|
|
||||||
outputs:
|
|
||||||
branch: ${{ env.BRANCH }}
|
|
||||||
org: ${{ env.ORG }}
|
|
||||||
url: ${{ env.URL }}
|
|
||||||
repo: ${{ env.REPO }}
|
|
||||||
buildres: ${{ steps.build-script.outcome }}
|
|
||||||
steps:
|
|
||||||
- name: Check workspace
|
|
||||||
run: |
|
|
||||||
repourl=$(echo $GU | cut -d '/' -f 3)
|
|
||||||
echo "URL=$repourl" >> ${GITHUB_ENV}
|
|
||||||
echo $repourl
|
|
||||||
reponame=$(echo $GR | cut -d '/' -f 1)
|
|
||||||
echo "REPO=$reponame" >> ${GITHUB_ENV}
|
|
||||||
echo $reponame
|
|
||||||
env:
|
|
||||||
GU: ${{ gitea.server_url }}
|
|
||||||
GR: ${{ gitea.repository }}
|
|
||||||
- name: Set repo for p11 (Temporary)
|
|
||||||
if: ${{ contains(github.ref_name, 'p11') }}
|
|
||||||
run: |
|
|
||||||
echo "event tag=${{ github.ref_name }}"
|
|
||||||
echo "10.4.0.3 update.altsp.su" >> /etc/hosts
|
|
||||||
echo "cat /etc/hosts"
|
|
||||||
cat /etc/hosts
|
|
||||||
- name: Update apt
|
|
||||||
uses: actions/init-alt-env@v1
|
|
||||||
- name: Install requires
|
|
||||||
run: |
|
|
||||||
echo "apt-get install -y python3-module-tomli python3-module-jinja2 python3-module-yaml python3-module-requests podman buildah jq curl"
|
|
||||||
apt-get install -y python3-module-tomli python3-module-jinja2 python3-module-yaml python3-module-requests podman buildah jq curl
|
|
||||||
echo "apt-get install -y qemu-user-static-binfmt-aarch64 qemu-user-static-binfmt-arm qemu-user-static-binfmt-ppc qemu-user-static-binfmt-riscv qemu-user-static-binfmt-loongarch"
|
|
||||||
apt-get install -y qemu-user-static-binfmt-aarch64 qemu-user-static-binfmt-arm qemu-user-static-binfmt-ppc qemu-user-static-binfmt-riscv qemu-user-static-binfmt-loongarch
|
|
||||||
- name: Check out current repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Parse target branch and tag from events context, save to env
|
|
||||||
env:
|
|
||||||
EV: ${{ toJson(gitea.event) }}
|
|
||||||
run: |
|
|
||||||
echo $EV | jq '.ref' -r | sed "s/refs\/tags\//BRANCH=/g" | cut -d '_' -f 1
|
|
||||||
echo $EV | jq '.ref' -r | sed "s/refs\/tags\//BRANCH=/g" | cut -d '_' -f 1 >> ${GITHUB_ENV}
|
|
||||||
org=$(echo $EV | jq '.ref' -r | sed 's/refs\/tags\///g' | cut -d '_' -f 2)
|
|
||||||
echo "ORG=$org" >> ${GITHUB_ENV}
|
|
||||||
echo "ORG=$org"
|
|
||||||
- name: Login podman gitea
|
|
||||||
run: |
|
|
||||||
echo "podman login ${{ env.URL }}"
|
|
||||||
podman login --username $P_USER --password $P_PASS ${{ env.URL }}
|
|
||||||
env:
|
|
||||||
P_USER: ${{ secrets.PODMAN_USER }}
|
|
||||||
P_PASS: ${{ secrets.PODMAN_PASS }}
|
|
||||||
- name: Run building script
|
|
||||||
id: build-script
|
|
||||||
run: |
|
|
||||||
build_args="-b $BR -o $ORG --skip-images alt/distroless-devel --arches amd64 386 arm64"
|
|
||||||
if [[ $ORG == 'k8s' ]]; then build_args="$build_args --tags tags.toml --overwrite-organization $ORG-$BR --skip-images k8s/kube-apiserver k8s/kube-controller-manager k8s/kube-proxy k8s/kube-scheduler"; fi
|
|
||||||
echo "build.py $build_args"
|
|
||||||
${{ gitea.workspace }}/build.py $build_args
|
|
||||||
env:
|
|
||||||
ORG: ${{ env.ORG }}
|
|
||||||
BR: ${{ env.BRANCH }}
|
|
||||||
continue-on-error: true
|
|
||||||
- name: Send notification if build crashed
|
|
||||||
if: ${{ steps.build-script.outcome != 'success' }}
|
|
||||||
run: |
|
|
||||||
issueid=1
|
|
||||||
body="Building images finish with some errors."
|
|
||||||
curl -X 'POST' "$URL/api/v1/repos/$REPO/image-forge/issues/$issueid/comments?token=$T" -H 'accept: application/json' -H 'Content-Type: application/json' -d "{ \"body\": \"$body\" }" -s
|
|
||||||
echo "notification about test error is sent to issue $issueid"
|
|
||||||
env:
|
|
||||||
T: ${{ secrets.TOKEN }}
|
|
||||||
BR: ${{ env.BRANCH }}
|
|
||||||
URL: ${{ gitea.server_url }}
|
|
||||||
REPO: ${{ env.REPO }}
|
|
||||||
- name: Delete event tag
|
|
||||||
run: |
|
|
||||||
tagname=$(echo $EV | jq '.ref' -r | sed "s/refs\/tags\///g")
|
|
||||||
curl -X 'DELETE' "$URL/api/v1/repos/$REPO/image-forge/tags/$tagname?token=$T" -H 'accept: application/json' -s
|
|
||||||
echo "tag $tagname is deleted"
|
|
||||||
env:
|
|
||||||
T: ${{ secrets.TOKEN }}
|
|
||||||
BR: ${{ env.BRANCH }}
|
|
||||||
URL: ${{ gitea.server_url }}
|
|
||||||
REPO: ${{ env.REPO }}
|
|
||||||
EV: ${{ toJson(gitea.event) }}
|
|
||||||
test-process:
|
|
||||||
needs: build-process
|
|
||||||
if: ${{ needs.build-process.outputs.buildres == 'success' }}
|
|
||||||
runs-on: alt-sisyphus
|
|
||||||
steps:
|
|
||||||
- name: Update apt
|
|
||||||
uses: actions/init-alt-env@v1
|
|
||||||
- name: Install requires
|
|
||||||
run: |
|
|
||||||
echo "apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah jq curl"
|
|
||||||
apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah jq curl
|
|
||||||
- name: Check out current repo
|
|
||||||
uses: https://gitea.com/actions/checkout@v4
|
|
||||||
- name: Test
|
|
||||||
id: test-script
|
|
||||||
continue-on-error: true
|
|
||||||
run: |
|
|
||||||
$WS/.gitea/workflows/testscript $BR $ORG $URL $REPO $WS
|
|
||||||
cat haserr.log >> ${GITHUB_ENV}
|
|
||||||
echo "test process finished"
|
|
||||||
env:
|
|
||||||
BR: ${{ needs.build-process.outputs.branch }}
|
|
||||||
ORG: ${{ needs.build-process.outputs.org }}
|
|
||||||
URL: ${{ needs.build-process.outputs.url }}
|
|
||||||
REPO: ${{ needs.build-process.outputs.repo }}
|
|
||||||
WS: ${{ gitea.workspace }}
|
|
||||||
- name: Send notification if test crashed
|
|
||||||
if: ${{ env.ERR == 'true' || steps.test-script.outcome == 'failure' }}
|
|
||||||
run: |
|
|
||||||
issueid=1
|
|
||||||
errors=$(cat errors.log)
|
|
||||||
body="Testing images finish with some errors. $errors"
|
|
||||||
curl -X 'POST' "$URL/api/v1/repos/$REPO/image-forge/issues/$issueid/comments?token=$T" -H 'accept: application/json' -H 'Content-Type: application/json' -d "{ \"body\": \"$body\" }" -s
|
|
||||||
echo "notification about test error is sent to issue $issueid"
|
|
||||||
env:
|
|
||||||
T: ${{ secrets.TOKEN }}
|
|
||||||
BR: ${{ needs.build-process.outputs.branch }}
|
|
||||||
URL: ${{ gitea.server_url }}
|
|
||||||
REPO: ${{ needs.build-process.outputs.repo }}
|
|
@ -6,7 +6,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-process:
|
build-process:
|
||||||
runs-on: alt-latest
|
runs-on: alt-sisyphus
|
||||||
outputs:
|
outputs:
|
||||||
branch: ${{ env.BRANCH }}
|
branch: ${{ env.BRANCH }}
|
||||||
image: ${{ env.IMAGE }}
|
image: ${{ env.IMAGE }}
|
||||||
@ -115,7 +115,7 @@ jobs:
|
|||||||
test-process:
|
test-process:
|
||||||
needs: build-process
|
needs: build-process
|
||||||
if: ${{ needs.build-process.outputs.buildres == 'success' }}
|
if: ${{ needs.build-process.outputs.buildres == 'success' }}
|
||||||
runs-on: alt-latest
|
runs-on: alt-sisyphus
|
||||||
steps:
|
steps:
|
||||||
- name: Update apt
|
- name: Update apt
|
||||||
uses: https://gitea.basealt.ru/actions/init-alt-env@v1
|
uses: https://gitea.basealt.ru/actions/init-alt-env@v1
|
||||||
|
Loading…
Reference in New Issue
Block a user