Compare commits
3 Commits
master
...
test-scrip
| Author | SHA1 | Date | |
|---|---|---|---|
| e659731d7b | |||
| 8c81cfecf0 | |||
| bf4dedb221 |
@@ -60,15 +60,13 @@ def main() -> None:
|
||||
for ver in vers_branch:
|
||||
kube_ver = ver.get("kube-version")
|
||||
dns_ver = ver.get("coredns")
|
||||
etcd_ver = ver.get("etcd", kube_ver)
|
||||
if kube_ver != None and dns_ver != None:
|
||||
packs_string=f"-b {args.branch} " + "--package-versions '{\"k8s/kube-apiserver\":" + f"\"{kube_ver}\",\"k8s/kube-scheduler\":\"{kube_ver}\",\"k8s/kube-controller-manager\":\"{kube_ver}\",\"k8s/kube-proxy\":\"{kube_ver}\",\"k8s/kubelet\":\"{kube_ver}\",\"k8s/coredns\":\"{dns_ver}\",\"k8s/etcd\":\"{etcd_ver}\"" + "}'"
|
||||
packs_string=f"-b {args.branch} " + "--package-versions '{\"k8s/kube-apiserver\":" + f"\"{kube_ver}\",\"k8s/kube-scheduler\":\"{kube_ver}\",\"k8s/kube-controller-manager\":\"{kube_ver}\",\"k8s/kube-proxy\":\"{kube_ver}\",\"k8s/kubelet\":\"{kube_ver}\",\"k8s/coredns\":\"{dns_ver}\",\"k8s/etcd\":\"{kube_ver}\"" + "}'"
|
||||
if ver.get("latest") != None and ver.get("latest"):
|
||||
packs_string=f"-o k8s --latest {args.branch} "+packs_string
|
||||
else:
|
||||
packs_string=f"-i {images_to_rebuild} "+packs_string
|
||||
|
||||
print(f'Run build command: {args.workspace}/build.py {args.other_build_args} {packs_string}')
|
||||
subprocess.run(f"{args.workspace}/build.py {args.other_build_args} {packs_string}", shell=True)
|
||||
subprocess.run("podman rmi -f --all", shell=True)
|
||||
|
||||
|
||||
@@ -5,13 +5,11 @@
|
||||
"versions": [
|
||||
{
|
||||
"kube-version": "1.27",
|
||||
"coredns": "0",
|
||||
"etcd": "3.5.15"
|
||||
"coredns": "1.10.1"
|
||||
},
|
||||
{
|
||||
"kube-version": "1.28",
|
||||
"coredns": "0",
|
||||
"etcd": "3.5.16",
|
||||
"coredns": "1.10.1",
|
||||
"latest": true
|
||||
}
|
||||
]
|
||||
@@ -22,30 +20,30 @@
|
||||
{
|
||||
"kube-version": "1.31",
|
||||
"coredns": "1.11.3"
|
||||
},
|
||||
},
|
||||
{
|
||||
"kube-version": "1.32",
|
||||
"coredns": "1.11.3"
|
||||
},
|
||||
{
|
||||
"kube-version": "1.33",
|
||||
},
|
||||
{
|
||||
"kube-version": "1.33",
|
||||
"coredns": "1.33",
|
||||
"latest": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "c10f2",
|
||||
"versions": [
|
||||
{
|
||||
"name": "c10f2",
|
||||
"versions": [
|
||||
{
|
||||
"kube-version": "1.31",
|
||||
"coredns": "1.11.3"
|
||||
},
|
||||
{
|
||||
"coredns": "1.11.3"
|
||||
},
|
||||
{
|
||||
"kube-version": "1.32",
|
||||
"coredns": "1.11.3"
|
||||
},
|
||||
{
|
||||
},
|
||||
{
|
||||
"kube-version": "1.33",
|
||||
"coredns": "1.33",
|
||||
"latest": true
|
||||
@@ -55,15 +53,15 @@
|
||||
{
|
||||
"name": "sisyphus",
|
||||
"versions": [
|
||||
{
|
||||
{
|
||||
"kube-version": "1.31",
|
||||
"coredns": "1.11.3"
|
||||
},
|
||||
{
|
||||
"kube-version": "1.32",
|
||||
"coredns": "1.11.3"
|
||||
},
|
||||
{
|
||||
},
|
||||
{
|
||||
"kube-version": "1.33",
|
||||
"coredns": "1.33",
|
||||
"latest": true
|
||||
|
||||
@@ -15,13 +15,13 @@ wosp=${5:-"."}
|
||||
errors=''
|
||||
haserr=false
|
||||
for IM in $(ls $wosp/org/$org/ | xargs)
|
||||
do
|
||||
do
|
||||
echo "image=$IM"
|
||||
if test -f $wosp/org/$org/$IM/test
|
||||
then
|
||||
then
|
||||
test=$(cat $wosp/org/$org/$IM/test)
|
||||
else test=''
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "test script=$test"
|
||||
imgpath="$repo/$branch/$IM:latest"
|
||||
@@ -38,40 +38,35 @@ do
|
||||
if [ "$IM" = distroless-true ]; then
|
||||
command="podman run -q --rm $url/$imgpath \"true\""
|
||||
fi
|
||||
if [ "$IM" = distroless-gotop ]; then
|
||||
if [ "$IM" = distroless-gotop ]; then
|
||||
command="podman run -q --rm $url/$imgpath \"--version\""
|
||||
fi
|
||||
fi
|
||||
if [ "$IM" = flannel-cni-plugin ]; then
|
||||
command="podman run -q --rm $url/$imgpath \"/flannel\""
|
||||
fi
|
||||
if [ "$IM" == pause ]; then
|
||||
if [ "$IM" == pause ]; then
|
||||
command="podman run -q --rm $url/$imgpath \"/pause\" \"-v\""
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
echo $command
|
||||
eval $command 2>$IM.log
|
||||
if [ "$(echo $?)" == "0" ]; then
|
||||
rm -rf $IM.log ||:
|
||||
else
|
||||
haserr=true
|
||||
fi
|
||||
eval $command 2>$IM.log || haserr=true
|
||||
|
||||
echo "podman rmi --all"
|
||||
podman rmi --all
|
||||
|
||||
if $haserr
|
||||
then
|
||||
if [ -f $IM.log ]
|
||||
then errors="TEST ERROR OF IMAGE $IM: $(cat $IM.log)\n $errors"
|
||||
if [ "$haserr" ]
|
||||
then
|
||||
if [[ -n $(cat $IM.log) ]]
|
||||
then errors="TEST ERROR OF IMAGE $IM: $(cat $IM.log); $errors"
|
||||
#else errors="TEST ERROR OF IMAGE $IM: test returned empty error, but exit status was nozero; $errors"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
haserr=false
|
||||
done
|
||||
|
||||
echo "$errors"
|
||||
if [ -n "$errors" ]
|
||||
then haserr=true
|
||||
then haserr=true
|
||||
fi
|
||||
echo "ERR=$haserr" > haserr.log
|
||||
echo $errors > errors.log
|
||||
|
||||
@@ -1,30 +1,16 @@
|
||||
name: Full building alt images
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
branch:
|
||||
description: 'Branch'
|
||||
required: true
|
||||
default: 'sisyphus'
|
||||
type: choice
|
||||
options:
|
||||
- sisyphus
|
||||
- p10
|
||||
- p11
|
||||
- c10f2
|
||||
group:
|
||||
description: 'Images group'
|
||||
required: true
|
||||
type: choice
|
||||
options:
|
||||
- base
|
||||
- alt
|
||||
- kubevirt
|
||||
push:
|
||||
tags:
|
||||
- '*_*'
|
||||
- '!*_k8s'
|
||||
|
||||
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 }}
|
||||
@@ -33,27 +19,34 @@ jobs:
|
||||
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 golang"
|
||||
apt-get install -y python3-module-tomli python3-module-jinja2 python3-module-yaml python3-module-requests podman buildah jq curl golang
|
||||
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-riscv qemu-user-static-binfmt-loongarch"
|
||||
apt-get install -y qemu-user-static-binfmt-aarch64 qemu-user-static-binfmt-arm qemu-user-static-binfmt-riscv qemu-user-static-binfmt-loongarch
|
||||
- name: Check workspace
|
||||
run: |
|
||||
repourl=$(echo $GU | cut -d '/' -f 3)
|
||||
echo "URL=$repourl" >> ${GITHUB_ENV}
|
||||
echo "URL=$repourl"
|
||||
echo $repourl
|
||||
reponame=$(echo $GR | cut -d '/' -f 1)
|
||||
echo "REPO=$reponame" >> ${GITHUB_ENV}
|
||||
echo "REPO=$reponame"
|
||||
echo "GROUP=${{ inputs.group }}"
|
||||
echo "BRANCH=${{ inputs.branch }}"
|
||||
echo $reponame
|
||||
env:
|
||||
GU: ${{ gitea.server_url }}
|
||||
GR: ${{ gitea.repository }}
|
||||
- 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: Check out current repo
|
||||
uses: actions/checkout@v4
|
||||
- name: Change vendor label for c10f
|
||||
if: ${{ contains(inputs.branch, 'c10f') }}
|
||||
if: ${{ contains(github.ref_name, 'c10f') }}
|
||||
run: |
|
||||
echo "sed -i 's/ALT Linux Team/BaseALT LLC/g' ${{ gitea.workspace }}/org/$ORG/*/Dockerfile.template ||:"
|
||||
sed -i 's/ALT Linux Team/BaseALT LLC/g' ${{ gitea.workspace }}/org/$ORG/*/Dockerfile.template ||:
|
||||
@@ -62,10 +55,11 @@ jobs:
|
||||
echo "sed -i 's/ALT Linux Team/BaseALT LLC/g' ${{ gitea.workspace }}/org/$ORG/*/info.yaml ||:"
|
||||
sed -i 's/ALT Linux Team/BaseALT LLC/g' ${{ gitea.workspace }}/org/$ORG/*/info.yaml ||:
|
||||
env:
|
||||
ORG: ${{ inputs.group }}
|
||||
ORG: ${{ env.ORG }}
|
||||
- name: Set repo for c10f2 (Temporary)
|
||||
if: ${{ contains(inputs.branch, 'c10f2') }}
|
||||
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
|
||||
@@ -80,35 +74,50 @@ jobs:
|
||||
id: build-script
|
||||
run: |
|
||||
#build base with riskv64 for sisyphus if it is
|
||||
if [[ "$BR" == "sisyphus" && "$ORG" == "base" ]]; then echo "${{ gitea.workspace }}/build.py -i base/base -b $BR --latest $BR --registry $BUILD_URL"; ${{ gitea.workspace }}/build.py -i base/base -b "$BR" --latest "$BR" --registry "$BUILD_URL"; fi
|
||||
if [[ "$BR" == "sisyphus" && "$ORG" == "base" ]]; then echo "${{ gitea.workspace }}/build.py --log-level debug -i base/base -b $BR --latest $BR --registry $BUILD_URL"; ${{ gitea.workspace }}/build.py -i base/base -b "$BR" --latest "$BR" --registry "$BUILD_URL"; fi
|
||||
build_args="-b $BR --log-level debug --latest $BR -o $ORG --registry $BUILD_URL"
|
||||
if [[ "$BR" == "sisyphus" ]]; then arches="--arches amd64 386 arm64 loong64 --skip-images base/base"; else arches="--arches amd64 386 arm64"; fi
|
||||
if [[ "$BR" == "sisyphus" ]]; then arches="--arches amd64 386 arm64 loong64 --skip-images base/base"; else arches="--arches amd64 386 arm64"; fi
|
||||
echo "${{ gitea.workspace }}/build.py $build_args $arches"
|
||||
${{ gitea.workspace }}/build.py $build_args $arches
|
||||
env:
|
||||
ORG: ${{ inputs.group }}
|
||||
BR: ${{ inputs.branch }}
|
||||
BUILD_URL: "${{ env.URL }}/${{ env.REPO }}"
|
||||
ORG: ${{ env.ORG }}
|
||||
BR: ${{ env.BRANCH }}
|
||||
BUILD_URL: "gitea.basealt.ru/alt"
|
||||
continue-on-error: true
|
||||
- name: Send success notification
|
||||
- name: Send notification if build crashed
|
||||
if: ${{ steps.build-script.outcome != 'success' }}
|
||||
uses: actions/telegram-channel-action@v5
|
||||
with:
|
||||
bot_token: ${{ secrets.TELEGRAM_BOT }}
|
||||
channel_id: ${{ secrets.TELEGRAM_CHANNEL }}
|
||||
message: "Building of images org/${{ inputs.group }} for branch ${{ inputs.branch }} is failed"
|
||||
|
||||
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' }}
|
||||
if: ${{ needs.build-process.outputs.buildres == 'success' && needs.build-process.outputs.org != 'k8s' }}
|
||||
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 golang"
|
||||
apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah jq curl golang
|
||||
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
|
||||
@@ -117,25 +126,23 @@ jobs:
|
||||
run: |
|
||||
$WS/.gitea/workflows/testscript $BR $ORG $URL $REPO $WS
|
||||
cat haserr.log >> ${GITHUB_ENV}
|
||||
cat errors.log 2>/dev/null || echo ''
|
||||
echo "test process finished"
|
||||
env:
|
||||
BR: ${{ inputs.branch }}
|
||||
ORG: ${{ inputs.group }}
|
||||
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 building was crashed
|
||||
- name: Send notification if test crashed
|
||||
if: ${{ env.ERR == 'true' || steps.test-script.outcome == 'failure' }}
|
||||
uses: actions/telegram-channel-action@v5
|
||||
with:
|
||||
bot_token: ${{ secrets.TELEGRAM_BOT }}
|
||||
channel_id: ${{ secrets.TELEGRAM_CHANNEL }}
|
||||
message: "Testing of images org/${{ inputs.group }} for branch ${{ inputs.branch }} is failed"
|
||||
- name: Send notification if building was crashed
|
||||
if: ${{ env.ERR == 'false' && steps.test-script.outcome != 'failure' }}
|
||||
uses: actions/telegram-channel-action@v5
|
||||
with:
|
||||
bot_token: ${{ secrets.TELEGRAM_BOT }}
|
||||
channel_id: ${{ secrets.TELEGRAM_CHANNEL }}
|
||||
message: "Images group org/${{ inputs.group }} for branch ${{ inputs.branch }} are builed and ready to push into registry.altlinux.org"
|
||||
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,43 +1,34 @@
|
||||
name: Full building alt images
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
branch:
|
||||
description: 'Branch'
|
||||
required: true
|
||||
default: 'sisyphus'
|
||||
type: choice
|
||||
options:
|
||||
- sisyphus
|
||||
- p10
|
||||
- p11
|
||||
- c10f2
|
||||
env:
|
||||
ORG: k8s
|
||||
push:
|
||||
tags:
|
||||
- "*_k8s"
|
||||
|
||||
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 and inputs
|
||||
- name: Check workspace
|
||||
run: |
|
||||
repourl=$(echo $GU | cut -d '/' -f 3)
|
||||
echo "URL=$repourl" >> ${GITHUB_ENV}
|
||||
echo "URL=$repourl"
|
||||
echo $repourl
|
||||
reponame=$(echo $GR | cut -d '/' -f 1)
|
||||
echo "REPO=$reponame" >> ${GITHUB_ENV}
|
||||
echo "REPO=$reponame"
|
||||
echo "BRANCH=${{ inputs.branch }}"
|
||||
echo $reponame
|
||||
env:
|
||||
GU: ${{ gitea.server_url }}
|
||||
GR: ${{ gitea.repository }}
|
||||
- name: Set repo for c10f2 (Temporary)
|
||||
if: ${{ contains(inputs.branch, 'c10f2') }}
|
||||
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
|
||||
@@ -45,14 +36,23 @@ jobs:
|
||||
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 golang"
|
||||
apt-get install -y python3-module-tomli python3-module-jinja2 python3-module-yaml python3-module-requests podman buildah jq curl golang
|
||||
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-riscv qemu-user-static-binfmt-loongarch"
|
||||
apt-get install -y qemu-user-static-binfmt-aarch64 qemu-user-static-binfmt-arm qemu-user-static-binfmt-riscv qemu-user-static-binfmt-loongarch
|
||||
- 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: Check out current repo
|
||||
uses: actions/checkout@v4
|
||||
- name: Change vendor label for c10f
|
||||
if: ${{ contains(inputs.branch, 'c10f') }}
|
||||
if: ${{ contains(github.ref_name, 'c10f') }}
|
||||
run: |
|
||||
echo "sed -i 's/ALT Linux Team/BaseALT LLC/g' ${{ gitea.workspace }}/org/$ORG/*/Dockerfile.template ||:"
|
||||
sed -i 's/ALT Linux Team/BaseALT LLC/g' ${{ gitea.workspace }}/org/$ORG/*/Dockerfile.template ||:
|
||||
@@ -78,13 +78,29 @@ jobs:
|
||||
${{ gitea.workspace }}/.gitea/workflows/k8s_buildscript.py --branch "$BR" --other-build-args "$build_args" --workspace "${{ gitea.workspace }}"
|
||||
env:
|
||||
ORG: ${{ env.ORG }}
|
||||
BR: ${{ inputs.branch }}
|
||||
BR: ${{ env.BRANCH }}
|
||||
BUILD_URL: "gitea.basealt.ru/alt"
|
||||
continue-on-error: true
|
||||
- name: Send notification if build crashed
|
||||
if: ${{ steps.build-script.outcome != 'success' }}
|
||||
uses: actions/telegram-channel-action@v5
|
||||
with:
|
||||
bot_token: ${{ secrets.TELEGRAM_BOT }}
|
||||
channel_id: ${{ secrets.TELEGRAM_CHANNEL }}
|
||||
message: "Building of images org/k8s for branch ${{ inputs.branch }} is failed"
|
||||
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) }}
|
||||
|
||||
@@ -1,159 +0,0 @@
|
||||
name: Dispatch building alt images
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
branch:
|
||||
description: 'Branch'
|
||||
required: true
|
||||
default: 'sisyphus'
|
||||
type: choice
|
||||
options:
|
||||
- sisyphus
|
||||
- p10
|
||||
- p11
|
||||
- c10f2
|
||||
images:
|
||||
description: 'Json containing images with version to build it'
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
build-process:
|
||||
runs-on: alt-sisyphus
|
||||
outputs:
|
||||
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: Check inputs
|
||||
run: |
|
||||
echo "${{ inputs.images }}"
|
||||
echo "${{ inputs.branch }}"
|
||||
- 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 golang skopeo"
|
||||
apt-get install -y python3-module-tomli python3-module-jinja2 python3-module-yaml python3-module-requests podman buildah jq curl golang skopeo
|
||||
echo "apt-get install -y qemu-user-static-binfmt-aarch64 qemu-user-static-binfmt-arm 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-riscv qemu-user-static-binfmt-loongarch
|
||||
- name: Get images list to build
|
||||
env:
|
||||
BR: ${{ inputs.branch }}
|
||||
IMS: ${{ inputs.images }}
|
||||
run: |
|
||||
images=()
|
||||
declare -A versions
|
||||
|
||||
ims=$(echo $IMS | jq -c -r '.[]')
|
||||
for im in ${ims[@]}; do
|
||||
image=$(echo $im | jq -r .name)
|
||||
version=$(echo $im | jq -r .version)
|
||||
images+=("$image")
|
||||
versions["$image"]="$version"
|
||||
done
|
||||
|
||||
image_args="${images[*]}"
|
||||
|
||||
package_versions="{"
|
||||
first=1
|
||||
for image in "${!versions[@]}"; do
|
||||
[[ $first -eq 0 ]] && package_versions+=","
|
||||
package_versions+="\"$image\": \"${versions[$image]}\""
|
||||
first=0
|
||||
done
|
||||
package_versions+="}"
|
||||
|
||||
echo "IMAGES=$image_args"
|
||||
echo "PACKAGE_VERSIONS=$package_versions"
|
||||
|
||||
echo "BRANCH=$branch" >> ${GITHUB_ENV}
|
||||
echo "IMAGES=$image_args" >> $GITHUB_ENV
|
||||
echo "images=$image_args"
|
||||
echo "PACKAGE_VERSIONS=$package_versions" >> $GITHUB_ENV
|
||||
echo "package_versions=$package_versions"
|
||||
- name: Check out current repo
|
||||
uses: actions/checkout@v4
|
||||
- name: Change vendor label for c10f
|
||||
if: ${{ contains(github.ref_name, 'c10f') }}
|
||||
run: |
|
||||
echo "sed -i 's/ALT Linux Team/BaseALT LLC/g' ${{ gitea.workspace }}/org/*/*/Dockerfile.template ||:"
|
||||
sed -i 's/ALT Linux Team/BaseALT LLC/g' ${{ gitea.workspace }}/org/*/*/Dockerfile.template ||:
|
||||
echo "sed -i 's/ALT Linux Team/BaseALT LLC/g' ${{ gitea.workspace }}/org/*/*/distroless.toml ||:"
|
||||
sed -i 's/ALT Linux Team/BaseALT LLC/g' ${{ gitea.workspace }}/org/*/*/distroless.toml ||:
|
||||
echo "sed -i 's/ALT Linux Team/BaseALT LLC/g' ${{ gitea.workspace }}/org/*/*/info.yaml ||:"
|
||||
sed -i 's/ALT Linux Team/BaseALT LLC/g' ${{ gitea.workspace }}/org/*/*/info.yaml ||:
|
||||
- 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: 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: |
|
||||
if [[ "$BRANCH" == "sisyphus" ]]; then arches="amd64 386 arm64 loong64"; else arches="amd64 386 arm64"; fi
|
||||
echo "${{ gitea.workspace }}/build.py \
|
||||
--log-level debug \
|
||||
--branch $BRANCH \
|
||||
--registry $BUILD_URL \
|
||||
--arches $arches \
|
||||
-i $IMAGES \
|
||||
--package-versions \"$PACKAGE_VERSIONS\""
|
||||
|
||||
${{ gitea.workspace }}/build.py \
|
||||
--log-level debug \
|
||||
--branch $BRANCH \
|
||||
--registry $BUILD_URL \
|
||||
--arches $arches \
|
||||
-i $IMAGES \
|
||||
--package-versions "$PACKAGE_VERSIONS"
|
||||
|
||||
echo "start update latest tag"
|
||||
for im in $IMAGES; do \
|
||||
image=$(echo $im | cut -d '/' -f 2) ; \
|
||||
latest=$(skopeo list-tags docker://$BUILD_URL/$BRANCH/$image | jq '.Tags.[]' -r 2> /dev/null | sort -V -r | grep -v latest -m 1) ; \
|
||||
echo "image name: $image; latest version-tag: $latest" ; \
|
||||
echo "skopeo copy -a docker://$BUILD_URL/$BRANCH/$image:$latest docker://$BUILD_URL/$BRANCH/$image:latest"; \
|
||||
skopeo copy -a docker://$BUILD_URL/$BRANCH/$image:$latest docker://$BUILD_URL/$BRANCH/$image:latest ; \
|
||||
done
|
||||
echo "finish update latest tag"
|
||||
env:
|
||||
BRANCH: ${{ inputs.BRANCH }}
|
||||
IMAGES: ${{ env.IMAGES }}
|
||||
PACKAGE_VERSIONS: ${{ env.PACKAGE_VERSIONS }}
|
||||
BUILD_URL: "${{ env.URL }}/${{ env.REPO }}"
|
||||
continue-on-error: true
|
||||
- name: Send notification if building was crashed
|
||||
if: ${{ steps.build-script.outcome != 'success' }}
|
||||
uses: actions/telegram-channel-action@v5
|
||||
with:
|
||||
bot_token: ${{ secrets.TELEGRAM_BOT }}
|
||||
channel_id: ${{ secrets.TELEGRAM_CHANNEL }}
|
||||
message: "Building of images ${{ inputs.images }} for branch ${{ inputs.branch }} is failed"
|
||||
- name: Send success notification
|
||||
if: ${{ steps.build-script.outcome == 'success' }}
|
||||
uses: actions/telegram-channel-action@v5
|
||||
with:
|
||||
bot_token: ${{ secrets.TELEGRAM_BOT }}
|
||||
channel_id: ${{ secrets.TELEGRAM_CHANNEL }}
|
||||
message: "Images ${{ inputs.images }} for branch ${{ inputs.branch }} are builed and ready to push into registry.altlinux.org"
|
||||
@@ -1,51 +1,35 @@
|
||||
name: Building alt images
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
branch:
|
||||
description: 'Branch'
|
||||
required: true
|
||||
default: 'sisyphus'
|
||||
type: choice
|
||||
options:
|
||||
- sisyphus
|
||||
- p10
|
||||
- p11
|
||||
- c10f2
|
||||
image:
|
||||
description: 'Image name'
|
||||
required: true
|
||||
type: string
|
||||
version:
|
||||
description: 'Needed version'
|
||||
type: string
|
||||
push:
|
||||
tags:
|
||||
- '*_*/*_*'
|
||||
|
||||
jobs:
|
||||
build-process:
|
||||
runs-on: alt-sisyphus
|
||||
outputs:
|
||||
branch: ${{ env.BRANCH }}
|
||||
image: ${{ env.IMAGE }}
|
||||
url: ${{ env.URL }}
|
||||
repo: ${{ env.REPO }}
|
||||
buildres: ${{ steps.build-script.outcome }}
|
||||
test: ${{ env.TEST }}
|
||||
steps:
|
||||
- name: Check workspace and inputs
|
||||
- name: Check workspace
|
||||
run: |
|
||||
repourl=$(echo $GU | cut -d '/' -f 3)
|
||||
echo "URL=$repourl" >> ${GITHUB_ENV}
|
||||
echo "URL=$repourl"
|
||||
reponame=$(echo $GR | cut -d '/' -f 1)
|
||||
echo "REPO=$reponame" >> ${GITHUB_ENV}
|
||||
echo "REPO=$reponame" >> ${GITHUB_ENV}
|
||||
echo "REPO=$reponame"
|
||||
echo "BRANCH=${{ inputs.branch }}"
|
||||
echo "IMAGE=${{ inputs.image }}"
|
||||
echo "VERSION=${{ inputs.version }}"
|
||||
env:
|
||||
GU: ${{ gitea.server_url }}
|
||||
GR: ${{ gitea.repository }}
|
||||
- name: Set repo for c10f2 (Temporary)
|
||||
if: ${{ contains(inputs.branch, 'c10f2') }}
|
||||
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
|
||||
@@ -53,8 +37,8 @@ jobs:
|
||||
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 golang"
|
||||
apt-get install -y python3-module-tomli python3-module-jinja2 python3-module-yaml python3-module-requests podman buildah jq curl golang
|
||||
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
|
||||
@@ -62,48 +46,83 @@ jobs:
|
||||
- name: Login podman gitea
|
||||
run: |
|
||||
echo "podman login ${{ env.URL }}"
|
||||
podman login --username $P_USER --password $P_PASS ${{ env.URL }}
|
||||
podman login --username $P_USER --password $P_PASS ${{ env.URL }}
|
||||
env:
|
||||
P_USER: ${{ secrets.PODMAN_USER }}
|
||||
P_PASS: ${{ secrets.PODMAN_PASS }}
|
||||
- name: Change vendor label for c10f
|
||||
if: ${{ contains(inputs.branch, 'c10f') }}
|
||||
- name: Check files in the repository
|
||||
run: |
|
||||
echo "sed -i 's/ALT Linux Team/BaseALT LLC/g' ${{ gitea.workspace }}/org/$IM/Dockerfile.template ||:"
|
||||
sed -i 's/ALT Linux Team/BaseALT LLC/g' ${{ gitea.workspace }}/org/$IM/Dockerfile.template ||:
|
||||
echo "sed -i 's/ALT Linux Team/BaseALT LLC/g' ${{ gitea.workspace }}/org/$IM/distroless.toml ||:"
|
||||
sed -i 's/ALT Linux Team/BaseALT LLC/g' ${{ gitea.workspace }}/org/$IM/distroless.toml ||:
|
||||
echo "sed -i 's/ALT Linux Team/BaseALT LLC/g' ${{ gitea.workspace }}/org/$IM/info.yaml ||:"
|
||||
sed -i 's/ALT Linux Team/BaseALT LLC/g' ${{ gitea.workspace }}/org/$IM/info.yaml ||:
|
||||
ls -a ${{ gitea.workspace }}
|
||||
- name: Parse target branch and tag from events context, save to env
|
||||
env:
|
||||
IM: ${{ inputs.image }}
|
||||
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}
|
||||
localimage=$(echo $EV | jq '.ref' -r | sed 's/refs\/tags\///g' | cut -d '_' -f 2)
|
||||
echo "IMAGE=$localimage" >> ${GITHUB_ENV}
|
||||
echo "IMAGE=$localimage"
|
||||
org=$(echo "$localimage" | cut -d '/' -f 1)
|
||||
echo "ORG=$org" >> ${GITHUB_ENV}
|
||||
echo "ORG=$org"
|
||||
ver=$(echo $EV | jq '.ref' -r | sed 's/refs\/tags\///g' | cut -d '_' -f 3)
|
||||
echo "VER=$ver" >> ${GITHUB_ENV}
|
||||
echo "VER=$ver"
|
||||
- name: Change vendor label for c10f
|
||||
if: ${{ contains(github.ref_name, 'c10f') }}
|
||||
run: |
|
||||
echo "sed -i 's/ALT Linux Team/BaseALT LLC/g' ${{ gitea.workspace }}/org/$ORG/*/Dockerfile.template ||:"
|
||||
sed -i 's/ALT Linux Team/BaseALT LLC/g' ${{ gitea.workspace }}/org/$ORG/*/Dockerfile.template ||:
|
||||
echo "sed -i 's/ALT Linux Team/BaseALT LLC/g' ${{ gitea.workspace }}/org/$ORG/*/distroless.toml ||:"
|
||||
sed -i 's/ALT Linux Team/BaseALT LLC/g' ${{ gitea.workspace }}/org/$ORG/*/distroless.toml ||:
|
||||
echo "sed -i 's/ALT Linux Team/BaseALT LLC/g' ${{ gitea.workspace }}/org/$ORG/*/info.yaml ||:"
|
||||
sed -i 's/ALT Linux Team/BaseALT LLC/g' ${{ gitea.workspace }}/org/$ORG/*/info.yaml ||:
|
||||
env:
|
||||
ORG: ${{ env.ORG }}
|
||||
- name: Get test for image
|
||||
run: |
|
||||
if test -f ${{ gitea.workspace }}/org/$IM/test; then testscript=$(cat ${{ gitea.workspace }}/org/$IM/test); else testscript=""; fi
|
||||
echo "TEST=$testscript" >> ${GITHUB_ENV}
|
||||
env:
|
||||
IM: ${{ inputs.image }}
|
||||
BR: ${{ inputs.branch }}
|
||||
IM: ${{ env.IMAGE }}
|
||||
BR: ${{ env.BRANCH }}
|
||||
- name: Run building script
|
||||
id: build-script
|
||||
run: |
|
||||
if [[ "$IM" == *"k8s"* ]]; then k8sarg="--package-versions {\"$IM\":\"$VER\"}"; else k8sarg=""; fi
|
||||
if [[ "$BR" == "sisyphus" ]]; then arches="--arches amd64 386 arm64 loong64"; else arches="--arches amd64 386 arm64"; fi
|
||||
echo "build.py -i $IM -b $BR $arches --latest $BR --log-level debug --registry $BUILD_URL $k8sarg"
|
||||
${{ gitea.workspace }}/build.py -i $IM -b $BR $arches --latest $BR --log-level debug --registry $BUILD_URL $k8sarg
|
||||
echo "build.py -i $IM -b $BR $arches $k8sarg"
|
||||
${{ gitea.workspace }}/build.py -i $IM -b $BR $arches --latest $BR --log-level debug --registry gitea.basealt.ru/alt $k8sarg
|
||||
env:
|
||||
IM: ${{ inputs.image }}
|
||||
VER: ${{ inputs.version }}
|
||||
BR: ${{ inputs.branch }}
|
||||
BUILD_URL: "${{ env.URL }}/${{ env.REPO }}"
|
||||
IM: ${{ env.IMAGE }}
|
||||
VER: ${{ env.VER }}
|
||||
BR: ${{ env.BRANCH }}
|
||||
ORG: ${{ env.ORG }}
|
||||
continue-on-error: true
|
||||
- name: Send notification if build crashed
|
||||
if: ${{ steps.build-script.outcome != 'success' }}
|
||||
uses: actions/telegram-channel-action@v5
|
||||
with:
|
||||
bot_token: ${{ secrets.TELEGRAM_BOT }}
|
||||
channel_id: ${{ secrets.TELEGRAM_CHANNEL }}
|
||||
message: "Building of image ${{ inputs.image }} for branch ${{ inputs.branch }} is failed"
|
||||
run: |
|
||||
issueid=1
|
||||
body="Building image $IM 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 }}
|
||||
IM: ${{ env.IMAGE }}
|
||||
- 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' }}
|
||||
@@ -113,8 +132,8 @@ jobs:
|
||||
uses: https://gitea.basealt.ru/actions/init-alt-env@v1
|
||||
- name: Install requires
|
||||
run: |
|
||||
echo "apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah curl golang"
|
||||
apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah curl golang
|
||||
echo "apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah curl"
|
||||
apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah curl
|
||||
- name: Run test
|
||||
id: test-script
|
||||
if: ${{ needs.build-process.outputs.test != '' }}
|
||||
@@ -123,9 +142,9 @@ jobs:
|
||||
imname=$(echo "$IM" | cut -d "/" -f2)
|
||||
if [[ "$IM" == *"k8s"* ]]; then echo "skip tests for k8s images"; else podman run --rm --entrypoint="/bin/sh" $URL/$REPO/$BR/$imname:latest -c "$TEST"; fi
|
||||
env:
|
||||
IM: ${{ inputs.image }}
|
||||
BR: ${{ inputs.branch }}
|
||||
URL: ${{ needs.build-process.outputs.url }}
|
||||
IM: ${{ needs.build-process.outputs.image }}
|
||||
BR: ${{ needs.build-process.outputs.branch }}
|
||||
URL: ${{ needs.build-process.outputs.url }}
|
||||
REPO: ${{ needs.build-process.outputs.repo }}
|
||||
TEST: ${{ needs.build-process.outputs.test }}
|
||||
- name: Run special test
|
||||
@@ -137,7 +156,22 @@ jobs:
|
||||
if [[ $IM = 'alt/distroless-true' ]]; then podman run --rm $URL/$REPO/$BR/$imname:latest true; fi
|
||||
if [[ $IM = 'alt/distroless-gotop' ]]; then podman run --rm $URL/$REPO/$BR/$imname:latest --version; fi
|
||||
env:
|
||||
IM: ${{ inputs.image }}
|
||||
BR: ${{ inputs.branch }}
|
||||
IM: ${{ needs.build-process.outputs.image }}
|
||||
BR: ${{ needs.build-process.outputs.branch }}
|
||||
URL: ${{ needs.build-process.outputs.url }}
|
||||
REPO: ${{ needs.build-process.outputs.repo }}
|
||||
- name: Send notification if test crashed
|
||||
if: ${{ steps.test-script.outcome == 'failure' || steps.special-test.outcome == 'failure' }}
|
||||
run: |
|
||||
issueid=1
|
||||
errors=$(cat errors.log)
|
||||
body="Testing image $IM 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: ${{ needs.build-process.outputs.branch }}
|
||||
URL: ${{ gitea.server_url }}
|
||||
REPO: ${{ needs.build-process.outputs.repo }}
|
||||
IM: ${{ needs.build-process.outputs.image }}
|
||||
|
||||
|
||||
14
build.py
14
build.py
@@ -432,12 +432,22 @@ class DockerBuilder:
|
||||
else:
|
||||
registry = ""
|
||||
alt_image = "alt"
|
||||
|
||||
if self.branch == "c10f2":
|
||||
base_image_prefix = "c10f"
|
||||
label_vendor = "BaseALT LLC"
|
||||
else:
|
||||
base_image_prefix = self.branch
|
||||
label_vendor = "ALT Linux Team"
|
||||
|
||||
rendered = JINJA_ENV.from_string(template).render(
|
||||
alt_image=alt_image,
|
||||
branch=self.branch,
|
||||
base_image_prefix=base_image_prefix,
|
||||
install_packages=install_packages,
|
||||
organization=organization,
|
||||
registry=registry,
|
||||
label_vendor=label_vendor,
|
||||
pkg_versions=PKG_VERSIONS,
|
||||
**kwargs,
|
||||
)
|
||||
@@ -785,7 +795,7 @@ class DockerBuilder:
|
||||
".",
|
||||
]
|
||||
|
||||
if image.annotations is not None:
|
||||
if image.annotations is not None and self.branch != "c10f2":
|
||||
build_cmd = [
|
||||
"podman",
|
||||
"build",
|
||||
@@ -799,7 +809,7 @@ class DockerBuilder:
|
||||
f"--annotation={akey}={avalue}")
|
||||
|
||||
d = datetime.now()
|
||||
build_cmd.append(f"--annotation=org.opencontainers.image.created={d.isoformat('T') + 'Z'}")
|
||||
build_cmd.append(f"--annotation=org.opencontainers.image.created={d.isoformat("T") + "Z"}")
|
||||
|
||||
ver = next((tag for tag in tags if tag != 'latest'), '')
|
||||
if ver != '':
|
||||
|
||||
@@ -10,18 +10,12 @@ skip-arches = [ "386" ]
|
||||
["alt/kafka"]
|
||||
skip-arches = [ "386" ]
|
||||
|
||||
["alt/grafana"]
|
||||
skip-arches = [ "386" ]
|
||||
|
||||
["alt/ansible"]
|
||||
skip-branches = [ "c10f2", "c10f1", "p10" ]
|
||||
|
||||
["alt/buildkit"]
|
||||
skip-branches = [ "c10f1", "p10" ]
|
||||
|
||||
["k8s/metrics-server"]
|
||||
skip-branches = [ "c10f1", "c10f2", "p11", "p10" ]
|
||||
|
||||
["kubevirt/virt-api"]
|
||||
skip-arches = [ "386", "loong64" ]
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- "{{ version }}"
|
||||
version_template: "{{ version }}"
|
||||
source_packages:
|
||||
- ansible-core
|
||||
- ansible-vim
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- "{{ version }}"
|
||||
version_template: "{{ version }}"
|
||||
source_packages:
|
||||
- apache2
|
||||
annotations:
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- "{{ version }}"
|
||||
version_template: "{{ version }}"
|
||||
source_packages:
|
||||
- buildkit
|
||||
annotations:
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- "{{ version }}"
|
||||
version_template: "{{ version }}"
|
||||
source_packages:
|
||||
- gitea
|
||||
annotations:
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- "{{ version }}"
|
||||
version_template: "{{ version }}"
|
||||
source_packages:
|
||||
- golang
|
||||
annotations:
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- "{{ version }}"
|
||||
version_template: "{{ version }}"
|
||||
source_packages:
|
||||
- grafana
|
||||
annotations:
|
||||
|
||||
@@ -5,7 +5,7 @@ Command for run kafka server:
|
||||
podman run --rm -it -p 9092:9092 <REGISTRY>/<BRANCH>/kafka:latest
|
||||
```
|
||||
|
||||
To lead images running need use kafka-entrypoint.sh or change it. As default login kafka need runnig zookeeper and than kafka's start script.
|
||||
To lead images running need use kafka-entrypoint.sh or change it. As default login kafka need runnig zookeeper and than kafka's start script.
|
||||
|
||||
Commnad for using kafka:
|
||||
```
|
||||
@@ -18,7 +18,7 @@ Created topic quickstart-events.
|
||||
```
|
||||
sh-5.2$ /usr/lib/kafka/bin/kafka-topics.sh --describe --topic quickstart-events --bootstrap-server localhost:9092
|
||||
```
|
||||
Topic: quickstart-events TopicId: kPjhCFFAS-Sg5J3Hpgr-PA PartitionCount: 1 ReplicationFactor: 1 Configs:
|
||||
Topic: quickstart-events TopicId: kPjhCFFAS-Sg5J3Hpgr-PA PartitionCount: 1 ReplicationFactor: 1 Configs:
|
||||
Topic: quickstart-events Partition: 0 Leader: 0 Replicas: 0 Isr: 0 Elr: N/A LastKnownElr: N/A
|
||||
```
|
||||
sh-5.2$ /usr/lib/kafka/bin/kafka-console-producer.sh --topic quickstart-events --bootstrap-server localhost:9092
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- "{{ version }}"
|
||||
version_template: "{{ version }}"
|
||||
source_packages:
|
||||
- kafka
|
||||
annotations:
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- "{{ version }}"
|
||||
version_template: "{{ version }}"
|
||||
source_packages:
|
||||
- loki
|
||||
annotations:
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- "{{ version }}"
|
||||
version_template: "{{ version }}"
|
||||
source_packages:
|
||||
- nginx
|
||||
- apache2
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- "{{ version }}"
|
||||
version_template: "{{ version }}"
|
||||
source_packages:
|
||||
- node
|
||||
- yarn
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- "{{ version }}"
|
||||
version_template: "{{ version }}"
|
||||
source_packages:
|
||||
- java-21-openjdk
|
||||
annotations:
|
||||
|
||||
@@ -13,14 +13,9 @@ LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
||||
"php8.2",
|
||||
"php8.2-xdebug",
|
||||
) }}
|
||||
{% elif branch == 'c10f2' %}
|
||||
{{ install_packages(
|
||||
"php8.3",
|
||||
"php8.3-xdebug",
|
||||
) }}
|
||||
{% else %}
|
||||
{{ install_packages(
|
||||
"php8.4",
|
||||
"php8.4-xdebug",
|
||||
"php8.3",
|
||||
"php8.3-xdebug",
|
||||
) }}
|
||||
{% endif %}
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- "{{ version }}"
|
||||
version_template: "{{ version }}"
|
||||
source_packages:
|
||||
- >
|
||||
{%- if branch in ["p10", "c10f1"] -%}
|
||||
{%- if branch in [ "p10", "c10f1", "c10f2"] -%}
|
||||
php8.2
|
||||
{%- elif branch in ["c10f2"] -%}
|
||||
php8.3
|
||||
{%- else -%}
|
||||
php8.4
|
||||
php8.3
|
||||
{%- endif -%}
|
||||
annotations:
|
||||
org.opencontainers.image.revision: ''
|
||||
|
||||
@@ -1,18 +1,14 @@
|
||||
FROM {{ registry }}{{ branch }}/base:latest
|
||||
|
||||
MAINTAINER alt-cloud
|
||||
|
||||
|
||||
LABEL org.opencontainers.image.title="postgresql16"
|
||||
LABEL org.opencontainers.image.description="PostgreSQL rograms and libraries"
|
||||
LABEL org.opencontainers.image.source="https://github.com/postgres/postgres"
|
||||
LABEL org.opencontainers.image.licenses="PostgreSQL"
|
||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
||||
|
||||
{% if branch == 'c10f2' %}
|
||||
|
||||
{{ install_packages("postgresql16","postgresql16-server") }}
|
||||
{% else %}
|
||||
{{ install_packages("postgresql17","postgresql17-server") }}
|
||||
{% endif %}
|
||||
|
||||
RUN usermod -a -G postgres postgres
|
||||
RUN chown -R postgres:postgres /var/lib/pgsql
|
||||
|
||||
@@ -1,14 +1,8 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- "{{ version }}"
|
||||
version_template: "{{ version }}"
|
||||
source_packages:
|
||||
- >
|
||||
{%- if branch in ["c10f2"] -%}
|
||||
postgresql16
|
||||
{%- else -%}
|
||||
postgresql17
|
||||
{%- endif -%}
|
||||
- postgresql16
|
||||
annotations:
|
||||
org.opencontainers.image.revision: ''
|
||||
org.opencontainers.image.source: 'https://github.com/postgres/postgres'
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- "{{ version }}"
|
||||
version_template: "{{ version }}"
|
||||
source_packages:
|
||||
- prometheus-alertmanager
|
||||
annotations:
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- "{{ version }}"
|
||||
version_template: "{{ version }}"
|
||||
source_packages:
|
||||
- prometheus-node_exporter
|
||||
annotations:
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- "{{ version }}"
|
||||
version_template: "{{ version }}"
|
||||
source_packages:
|
||||
- prometheus
|
||||
annotations:
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- "{{ version }}"
|
||||
version_template: "{{ version }}"
|
||||
source_packages:
|
||||
- python3
|
||||
- python3-module-setuptools
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
FROM {{ registry }}{{ branch }}/base:latest
|
||||
|
||||
MAINTAINER alt-cloud
|
||||
|
||||
|
||||
LABEL org.opencontainers.image.title="python"
|
||||
LABEL org.opencontainers.image.description="Python 2 and tools needed for development"
|
||||
LABEL org.opencontainers.image.source="https://www.python.org/downloads/source"
|
||||
@@ -9,9 +9,9 @@ LABEL org.opencontainers.image.licenses="Python-2.0"
|
||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
||||
|
||||
{{ install_packages(
|
||||
"python-module-setuptools",
|
||||
"python-dev",
|
||||
"python-module-setuptools",
|
||||
"python-dev",
|
||||
"gcc",
|
||||
) }}
|
||||
|
||||
CMD ["python2"]
|
||||
CMD ["python2"]
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- "{{ version }}"
|
||||
version_template: "{{ version }}"
|
||||
source_packages:
|
||||
- python
|
||||
- python-module-setuptools
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
FROM {{ registry }}{{ branch }}/base:latest
|
||||
|
||||
MAINTAINER alt-cloud
|
||||
|
||||
|
||||
LABEL org.opencontainers.image.title="rabbitmq"
|
||||
LABEL org.opencontainers.image.description="The RabbitMQ server"
|
||||
LABEL org.opencontainers.image.source="https://github.com/rabbitmq/rabbitmq-server"
|
||||
LABEL org.opencontainers.image.licenses="MPL-1.1"
|
||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
||||
|
||||
|
||||
{{ install_packages("rabbitmq-server") }}
|
||||
|
||||
USER rabbitmq
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- "{{ version }}"
|
||||
version_template: "{{ version }}"
|
||||
source_packages:
|
||||
- rabbitmq-server
|
||||
annotations:
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- "{{ version }}"
|
||||
version_template: "{{ version }}"
|
||||
source_packages:
|
||||
- redis
|
||||
annotations:
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- "{{ version }}"
|
||||
version_template: "{{ version }}"
|
||||
source_packages:
|
||||
- docker-registry
|
||||
annotations:
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- "{{ version }}"
|
||||
version_template: "{{ version }}"
|
||||
source_packages:
|
||||
- >
|
||||
{%- if branch in ["p10", "c10f2", "c10f1"] -%}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- "{{ version }}"
|
||||
version_template: "{{ version }}"
|
||||
source_packages:
|
||||
- systemd
|
||||
annotations:
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- "{{ version }}"
|
||||
version_template: "{{ version }}"
|
||||
source_packages:
|
||||
- trivy
|
||||
annotations:
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- "{{ version }}"
|
||||
version_template: "{{ version }}"
|
||||
source_packages:
|
||||
- unit
|
||||
- curl
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- "{{ version }}"
|
||||
version_template: "{{ version }}"
|
||||
source_packages:
|
||||
- zot
|
||||
annotations:
|
||||
|
||||
@@ -14,4 +14,4 @@ LABEL org.opencontainers.image.title="cert-manager-acmesolver"
|
||||
LABEL org.opencontainers.image.description="HTTP server used to solve ACME challenges."
|
||||
LABEL org.opencontainers.image.source="https://github.com/cert-manager/cert-manager"
|
||||
LABEL org.opencontainers.image.licenses="Apache-2.0"
|
||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
||||
LABEL org.opencontainers.image.vendor="{{ label_vendor }}"
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- v{{ version }}
|
||||
version_template: v{{ version }}
|
||||
source_packages:
|
||||
- cert-manager
|
||||
annotations:
|
||||
|
||||
@@ -14,4 +14,4 @@ LABEL org.opencontainers.image.title="cert-manager-cainjector"
|
||||
LABEL org.opencontainers.image.description="cert-manager CA injector is a Kubernetes addon to automate the injection of CA data into webhooks and APIServices from cert-manager certificates."
|
||||
LABEL org.opencontainers.image.source="https://github.com/cert-manager/cert-manager"
|
||||
LABEL org.opencontainers.image.licenses="Apache-2.0"
|
||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
||||
LABEL org.opencontainers.image.vendor="{{ label_vendor }}"
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- v{{ version }}
|
||||
version_template: v{{ version }}
|
||||
source_packages:
|
||||
- cert-manager
|
||||
annotations:
|
||||
|
||||
@@ -14,4 +14,4 @@ LABEL org.opencontainers.image.title="cert-manager-controller"
|
||||
LABEL org.opencontainers.image.description="Automatically provision and manage TLS certificates in Kubernetes."
|
||||
LABEL org.opencontainers.image.source="https://github.com/cert-manager/cert-manager"
|
||||
LABEL org.opencontainers.image.licenses="Apache-2.0"
|
||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
||||
LABEL org.opencontainers.image.vendor="{{ label_vendor }}"
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- v{{ version }}
|
||||
version_template: v{{ version }}
|
||||
source_packages:
|
||||
- cert-manager
|
||||
annotations:
|
||||
|
||||
@@ -14,4 +14,4 @@ LABEL org.opencontainers.image.title="cert-manager-startupapicheck"
|
||||
LABEL org.opencontainers.image.description="Check that cert-manager started successfully."
|
||||
LABEL org.opencontainers.image.source="https://github.com/cert-manager/cert-manager"
|
||||
LABEL org.opencontainers.image.licenses="Apache-2.0"
|
||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
||||
LABEL org.opencontainers.image.vendor="{{ label_vendor }}"
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- v{{ version }}
|
||||
version_template: v{{ version }}
|
||||
source_packages:
|
||||
- cert-manager
|
||||
annotations:
|
||||
|
||||
@@ -14,4 +14,4 @@ LABEL org.opencontainers.image.title="cert-manager-webhook"
|
||||
LABEL org.opencontainers.image.description="The webhook component provides API validation, mutation and conversion functionality for cert-manager."
|
||||
LABEL org.opencontainers.image.source="https://github.com/cert-manager/cert-manager"
|
||||
LABEL org.opencontainers.image.licenses="Apache-2.0"
|
||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
||||
LABEL org.opencontainers.image.vendor="{{ label_vendor }}"
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- v{{ version }}
|
||||
version_template: v{{ version }}
|
||||
source_packages:
|
||||
- cert-manager
|
||||
annotations:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM {{ registry }}{{ branch }}/{{ alt_image }}:latest
|
||||
FROM {{ registry }}{{ base_image_prefix }}/{{ alt_image }}:latest
|
||||
|
||||
MAINTAINER alt-cloud
|
||||
|
||||
@@ -6,7 +6,7 @@ LABEL org.opencontainers.image.title="coredns"
|
||||
LABEL org.opencontainers.image.description="CoreDNS is a DNS server that chains plugins"
|
||||
LABEL org.opencontainers.image.source="https://github.com/coredns/coredns"
|
||||
LABEL org.opencontainers.image.licenses="Apache-2.0"
|
||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
||||
LABEL org.opencontainers.image.vendor="{{ label_vendor }}"
|
||||
|
||||
{% if pkg_versions and "k8s/coredns" in pkg_versions %}
|
||||
{% set num_version_parts = (pkg_versions["k8s/coredns"].split('.') | length) %}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- v{{ version }}
|
||||
version_template: v{{ version }}
|
||||
source_packages:
|
||||
- >
|
||||
{%- set num_version_parts = (version.split('.') | length) -%}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM {{ registry }}{{ branch }}/{{ alt_image }}:latest
|
||||
FROM {{ registry }}{{ base_image_prefix }}/{{ alt_image }}:latest
|
||||
|
||||
MAINTAINER alt-cloud
|
||||
|
||||
@@ -6,15 +6,11 @@ LABEL org.opencontainers.image.title="etcd"
|
||||
LABEL org.opencontainers.image.description="Distributed reliable key-value store for the most critical data of a distributed system"
|
||||
LABEL org.opencontainers.image.source="https://github.com/etcd-io/etcd"
|
||||
LABEL org.opencontainers.image.licenses="Apache-2.0"
|
||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
||||
LABEL org.opencontainers.image.vendor="{{ label_vendor }}"
|
||||
|
||||
ARG PKG_VERSION
|
||||
|
||||
{% if branch == 'p10' %}
|
||||
{{ install_packages("etcd${PKG_VERSION}") }}
|
||||
{% else %}
|
||||
{{ install_packages("etcd-for-kubernetes${PKG_VERSION}") }}
|
||||
{% endif %}
|
||||
|
||||
RUN ln -s /usr/sbin/etcd /usr/local/bin/etcd && ln -s /usr/bin/etcdctl /usr/local/bin/etcdctl
|
||||
|
||||
|
||||
@@ -5,12 +5,7 @@ version_template:
|
||||
- "{{ version }}"
|
||||
- "{{ version }}-0"
|
||||
source_packages:
|
||||
- >
|
||||
{%- if branch in ["p10"] -%}
|
||||
etcd{{ version }}
|
||||
{%- else -%}
|
||||
etcd-for-kubernetes{{ version }}
|
||||
{%- endif -%}
|
||||
- etcd-for-kubernetes{{ version }}
|
||||
annotations:
|
||||
org.opencontainers.image.revision: ''
|
||||
org.opencontainers.image.source: 'https://github.com/etcd-io/etcd'
|
||||
|
||||
@@ -6,7 +6,7 @@ LABEL org.opencontainers.image.title="flannel-cni-plugin" \
|
||||
org.opencontainers.image.description="CNI network plugin that is powered by flannel" \
|
||||
org.opencontainers.image.source="https://github.com/flannel-io/cni-plugin" \
|
||||
org.opencontainers.image.licenses="Apache-2.0" \
|
||||
org.opencontainers.image.vendor="ALT Linux Team"
|
||||
org.opencontainers.image.vendor="{{ label_vendor }}"
|
||||
|
||||
{{ install_packages("cni-plugin-flannel") }}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ LABEL org.opencontainers.image.title="flannel"
|
||||
LABEL org.opencontainers.image.description="Network fabric for containers"
|
||||
LABEL org.opencontainers.image.source="https://github.com/flannel-io/flannel"
|
||||
LABEL org.opencontainers.image.licenses="Apache-2.0"
|
||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
||||
LABEL org.opencontainers.image.vendor="{{ label_vendor }}"
|
||||
|
||||
{{ install_packages(
|
||||
"iproute2",
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- v{{ version }}
|
||||
version_template: v{{ version }}
|
||||
source_packages:
|
||||
- flannel
|
||||
annotations:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM {{ registry }}{{ branch }}/{{ alt_image }}:latest
|
||||
FROM {{ registry }}{{ base_image_prefix }}/{{ alt_image }}:latest
|
||||
|
||||
MAINTAINER alt-cloud
|
||||
|
||||
@@ -14,4 +14,4 @@ LABEL org.opencontainers.image.title="kube-apiserver"
|
||||
LABEL org.opencontainers.image.description="The Kubernetes API server validates and configures data for the api objects which include pods, services, replicationcontrollers, and others."
|
||||
LABEL org.opencontainers.image.source="https://github.com/kubernetes/kubernetes"
|
||||
LABEL org.opencontainers.image.licenses="Apache-2.0"
|
||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
||||
LABEL org.opencontainers.image.vendor="{{ label_vendor }}"
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- v{{ version }}
|
||||
version_template: v{{ version }}
|
||||
source_packages:
|
||||
- kubernetes{{ version }}
|
||||
annotations:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM {{ registry }}{{ branch }}/{{ alt_image }}:latest
|
||||
FROM {{ registry }}{{ base_image_prefix }}/{{ alt_image }}:latest
|
||||
|
||||
MAINTAINER alt-cloud
|
||||
|
||||
@@ -14,4 +14,4 @@ LABEL org.opencontainers.image.title="kube-controller-manager"
|
||||
LABEL org.opencontainers.image.description="The Kubernetes controller manager is a daemon that embeds the core control loops shipped with Kubernetes."
|
||||
LABEL org.opencontainers.image.source="https://github.com/kubernetes/kubernetes"
|
||||
LABEL org.opencontainers.image.licenses="Apache-2.0"
|
||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
||||
LABEL org.opencontainers.image.vendor="{{ label_vendor }}"
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- v{{ version }}
|
||||
version_template: v{{ version }}
|
||||
source_packages:
|
||||
- kubernetes{{ version }}
|
||||
annotations:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM {{ registry }}{{ branch }}/{{ alt_image }}:latest
|
||||
FROM {{ registry }}{{ base_image_prefix }}/{{ alt_image }}:latest
|
||||
|
||||
MAINTAINER alt-cloud
|
||||
|
||||
@@ -14,4 +14,4 @@ LABEL org.opencontainers.image.title="kube-proxy"
|
||||
LABEL org.opencontainers.image.description="The Kubernetes network proxy runs on each node."
|
||||
LABEL org.opencontainers.image.source="https://github.com/kubernetes/kubernetes"
|
||||
LABEL org.opencontainers.image.licenses="Apache-2.0"
|
||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
||||
LABEL org.opencontainers.image.vendor="{{ label_vendor }}"
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- v{{ version }}
|
||||
version_template: v{{ version }}
|
||||
source_packages:
|
||||
- kubernetes{{ version }}
|
||||
annotations:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM {{ registry }}{{ branch }}/{{ alt_image }}:latest
|
||||
FROM {{ registry }}{{ base_image_prefix }}/{{ alt_image }}:latest
|
||||
|
||||
MAINTAINER alt-cloud
|
||||
|
||||
@@ -14,4 +14,4 @@ LABEL org.opencontainers.image.title="kube-scheduler"
|
||||
LABEL org.opencontainers.image.description="The Kubernetes scheduler is a control plane process which assigns Pods to Nodes."
|
||||
LABEL org.opencontainers.image.source="https://github.com/kubernetes/kubernetes"
|
||||
LABEL org.opencontainers.image.licenses="Apache-2.0"
|
||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
||||
LABEL org.opencontainers.image.vendor="{{ label_vendor }}"
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- v{{ version }}
|
||||
version_template: v{{ version }}
|
||||
source_packages:
|
||||
- kubernetes{{ version }}
|
||||
annotations:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM {{ registry }}{{ branch }}/{{ alt_image }}:latest
|
||||
FROM {{ registry }}{{ base_image_prefix }}/{{ alt_image }}:latest
|
||||
|
||||
MAINTAINER alt-cloud
|
||||
|
||||
@@ -14,4 +14,4 @@ LABEL org.opencontainers.image.title="kubelet" \
|
||||
org.opencontainers.image.description="An agent that runs on each node in the cluster. It makes sure that containers are running in a Pod." \
|
||||
org.opencontainers.image.source="https://github.com/kubernetes/kubernetes" \
|
||||
org.opencontainers.image.licenses="Apache-2.0" \
|
||||
org.opencontainers.image.vendor="ALT Linux Team" \
|
||||
org.opencontainers.image.vendor="{{ label_vendor }}" \
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- v{{ version }}
|
||||
version_template: v{{ version }}
|
||||
source_packages:
|
||||
- kubernetes{{ version }}
|
||||
annotations:
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
FROM {{ registry }}{{ branch }}/{{ alt_image }}:latest
|
||||
|
||||
{{ install_packages("metrics-server") }}
|
||||
|
||||
USER 65534
|
||||
|
||||
ENTRYPOINT ["/usr/bin/metrics-server"]
|
||||
|
||||
LABEL org.opencontainers.image.title="metrics-server"
|
||||
LABEL org.opencontainers.image.description="Scalable and efficient source of container resource metrics for Kubernetes built-in autoscaling pipelines."
|
||||
LABEL org.opencontainers.image.source="https://github.com/kubernetes-sigs/metrics-server"
|
||||
LABEL org.opencontainers.image.licenses="Apache-2.0"
|
||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
||||
@@ -1,16 +0,0 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- v{{ version }}
|
||||
source_packages:
|
||||
- metrics-server
|
||||
annotations:
|
||||
org.opencontainers.image.revision: ''
|
||||
org.opencontainers.image.source: ''
|
||||
org.opencontainers.image.url: ''
|
||||
org.opencontainers.image.version: ''
|
||||
org.opencontainers.image.title: 'metrics-server'
|
||||
org.opencontainers.image.description: 'Scalable and efficient source of container resource metrics for Kubernetes built-in autoscaling pipelines.'
|
||||
org.opencontainers.image.licenses: 'Apache-2.0'
|
||||
org.opencontainers.image.vendor: 'ALT Linux Team'
|
||||
...
|
||||
@@ -1 +0,0 @@
|
||||
metrics-server --version
|
||||
@@ -5,7 +5,7 @@ MAINTAINER alt-cloud
|
||||
LABEL org.opencontainers.image.title="pause" \
|
||||
org.opencontainers.image.description="Simple pause image" \
|
||||
org.opencontainers.image.licenses="GPLv2" \
|
||||
org.opencontainers.image.vendor="ALT Linux Team"
|
||||
org.opencontainers.image.vendor="{{ label_vendor }}"
|
||||
|
||||
{{ install_packages("kubernetes-pause") }}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ LABEL org.opencontainers.image.title="trivy-node-collector"
|
||||
LABEL org.opencontainers.image.description="Open source collector who collect Node information (fs and process data) and output in a table/json format"
|
||||
LABEL org.opencontainers.image.source="https://github.com/aquasecurity/k8s-node-collector"
|
||||
LABEL org.opencontainers.image.licenses="Apache-2.0"
|
||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
||||
LABEL org.opencontainers.image.vendor="{{ label_vendor }}"
|
||||
|
||||
{{ install_packages(
|
||||
"k8s-trivy-node-collector",
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- "{{ version }}"
|
||||
version_template: "{{ version }}"
|
||||
source_packages:
|
||||
- kubevirt
|
||||
annotations:
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- "{{ version }}"
|
||||
version_template: "{{ version }}"
|
||||
source_packages:
|
||||
- kubevirt
|
||||
annotations:
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- "{{ version }}"
|
||||
version_template: "{{ version }}"
|
||||
source_packages:
|
||||
- kubevirt
|
||||
annotations:
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- "{{ version }}"
|
||||
version_template: "{{ version }}"
|
||||
source_packages:
|
||||
- kubevirt
|
||||
annotations:
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- "{{ version }}"
|
||||
version_template: "{{ version }}"
|
||||
source_packages:
|
||||
- kubevirt
|
||||
annotations:
|
||||
|
||||
@@ -8,7 +8,7 @@ LABEL org.opencontainers.image.source="https://github.com/kubevirt/kubevirt"
|
||||
LABEL org.opencontainers.image.licenses="Apache-2.0"
|
||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
||||
|
||||
RUN groupadd -f -g 107 qemu > /dev/null 2>&1 ||:
|
||||
RUN groupadd -f -g 107 qemu > /dev/null 2>&1 ||:
|
||||
RUN useradd -g qemu -m -d /home/qemu -s /bin/bash -c "qemu user" -u 107 qemu > /dev/null 2>&1 ||:
|
||||
|
||||
{{ install_packages(
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- "{{ version }}"
|
||||
version_template: "{{ version }}"
|
||||
source_packages:
|
||||
- kubevirt
|
||||
annotations:
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
is_versioned: true
|
||||
version_template:
|
||||
- "{{ version }}"
|
||||
version_template: "{{ version }}"
|
||||
source_packages:
|
||||
- kubevirt
|
||||
annotations:
|
||||
|
||||
192
test.py
Executable file
192
test.py
Executable file
@@ -0,0 +1,192 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import logging
|
||||
import subprocess
|
||||
import os
|
||||
import tempfile
|
||||
from pathlib import Path
|
||||
|
||||
import requests
|
||||
import yaml
|
||||
from jinja2 import Template
|
||||
|
||||
from build import AltAPIError
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
def api_get_package_versions_from_task(task_id: str) -> dict[str, str]:
|
||||
api_url = f"https://rdb.altlinux.org/api/task/packages/{task_id}"
|
||||
response = requests.get(api_url)
|
||||
if response.status_code != 200:
|
||||
raise AltAPIError(
|
||||
f"failed to retrieve kubernetes versions from task: task_id {task_id}"
|
||||
)
|
||||
|
||||
result = response.json()
|
||||
|
||||
packages = {}
|
||||
for subtask in result["subtasks"]:
|
||||
packages[subtask["source"]["name"]] = subtask["source"]["version"]
|
||||
|
||||
return packages
|
||||
|
||||
def api_get_latest_flannel_tag(branch: str):
|
||||
api_url = f"https://registry.altlinux.org/v2/{branch}/flannel/tags/list"
|
||||
response = requests.get(api_url)
|
||||
if response.status_code != 200:
|
||||
raise AltAPIError(
|
||||
f"failed to get latest flannel version for branch {branch}"
|
||||
)
|
||||
|
||||
result = response.json()
|
||||
|
||||
return result["tags"][-1]
|
||||
|
||||
def run(cmd: list[str]):
|
||||
global DRY_RUN
|
||||
|
||||
logger.debug("%s", cmd)
|
||||
if not DRY_RUN:
|
||||
subprocess.run(cmd, check=True)
|
||||
|
||||
def parse_args():
|
||||
log_levels = ["debug", "info", "warning", "error", "critical"]
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument(
|
||||
"--log-level",
|
||||
default="debug",
|
||||
choices=log_levels,
|
||||
help="log messages above specified level",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--dry-run",
|
||||
action="store_true",
|
||||
help="don't run commands",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--skip-packages",
|
||||
nargs="+",
|
||||
help="log messages above specified level",
|
||||
)
|
||||
parser.add_argument("branch")
|
||||
parser.add_argument("task_id")
|
||||
return parser.parse_args()
|
||||
|
||||
def main():
|
||||
global DRY_RUN
|
||||
|
||||
args = parse_args()
|
||||
DRY_RUN = args.dry_run
|
||||
|
||||
numeric_level = getattr(logging, args.log_level.upper(), logging.DEBUG)
|
||||
logging.basicConfig(
|
||||
level=numeric_level, format="%(asctime)s - %(levelname)s\t- %(message)s"
|
||||
)
|
||||
|
||||
package_versions = api_get_package_versions_from_task(args.task_id)
|
||||
test_registry = "10.4.5.110:5000"
|
||||
image_forge_dir = Path(".").resolve()
|
||||
tests_dir = Path("../kubernetes-tests").resolve()
|
||||
|
||||
registry_prefix = args.branch
|
||||
if args.branch == "c10f2":
|
||||
registry_prefix = "c10f"
|
||||
|
||||
srpm_to_images = yaml.safe_load(Path("srpm_to_images.yaml").read_text())
|
||||
|
||||
temp_tasks_config = tempfile.NamedTemporaryFile(mode="w+", delete=False, delete_on_close=False)
|
||||
temp_tasks_config.write(f"""\
|
||||
[{args.branch}]
|
||||
{args.task_id} = [{",".join([f'"{image}"' for pkg_name in package_versions if pkg_name in srpm_to_images for image in srpm_to_images[pkg_name]])}]
|
||||
""")
|
||||
temp_tasks_config.close()
|
||||
|
||||
k8s_dir = image_forge_dir / "org" / "k8s"
|
||||
image_to_version_template: dict[str, str | list[str]] = {}
|
||||
for image_dir in k8s_dir.iterdir():
|
||||
info_file = image_dir / "info.yaml"
|
||||
info = yaml.safe_load(info_file.read_text())
|
||||
image_to_version_template[f"{image_dir.parent.name}/{image_dir.name}"] = info.get("version_template", None)
|
||||
|
||||
run([
|
||||
"podman",
|
||||
"login",
|
||||
test_registry,
|
||||
"--username", "admin",
|
||||
"--password", "123"
|
||||
])
|
||||
|
||||
flannel_tag = api_get_latest_flannel_tag(registry_prefix)
|
||||
run(["skopeo", "copy", "-a", f"docker://registry.altlinux.org/{registry_prefix}/flannel:{flannel_tag}", f"docker://{test_registry}/{registry_prefix}/flannel:{flannel_tag}"])
|
||||
|
||||
if args.skip_packages is not None:
|
||||
package_versions = {name: version for name, version in package_versions.items() if name not in args.skip_packages}
|
||||
|
||||
for pkg_name, pkg_version in package_versions.items():
|
||||
os.chdir(image_forge_dir)
|
||||
|
||||
if pkg_name not in srpm_to_images:
|
||||
continue
|
||||
|
||||
cmd = [
|
||||
"./build.py",
|
||||
"--branch", args.branch,
|
||||
"--registry", "registry.altlinux.org",
|
||||
"--overwrite-organization", registry_prefix,
|
||||
"--skip-arches", "riscv64", "loong64",
|
||||
"--skip-stage", "push",
|
||||
"--log-level", "debug",
|
||||
"--tasks", temp_tasks_config.name,
|
||||
"-i",
|
||||
]
|
||||
|
||||
|
||||
cmd += srpm_to_images[pkg_name]
|
||||
|
||||
version_for_template = pkg_version[:4]
|
||||
if pkg_name.startswith("coredns-for-kubernetes") or pkg_name.startswith("etcd-for-kubernetes"):
|
||||
version_for_template = pkg_name[-4:]
|
||||
|
||||
versions_arg = {image: version_for_template for image in srpm_to_images[pkg_name]}
|
||||
|
||||
cmd += [
|
||||
"--package-versions",
|
||||
json.dumps(versions_arg),
|
||||
]
|
||||
|
||||
run(cmd)
|
||||
|
||||
for image in srpm_to_images[pkg_name]:
|
||||
version_template = image_to_version_template[image]
|
||||
|
||||
tags = []
|
||||
if version_template is not None:
|
||||
if isinstance(version_template, str):
|
||||
tags.append(Template(version_template).render(version=pkg_version).strip())
|
||||
elif isinstance(version_template, list):
|
||||
for template in version_template:
|
||||
tags.append(Template(template).render(version=pkg_version).strip())
|
||||
else:
|
||||
tags = [pkg_version]
|
||||
|
||||
image_name = image[4:]
|
||||
for tag in tags:
|
||||
run([
|
||||
"podman",
|
||||
"manifest",
|
||||
"push",
|
||||
f"registry.altlinux.org/{registry_prefix}/{image_name}:{tag}",
|
||||
f"docker://{test_registry}/{registry_prefix}/{image_name}:{tag}"
|
||||
])
|
||||
|
||||
os.chdir(tests_dir)
|
||||
for pkg_name, pkg_version in package_versions.items():
|
||||
if pkg_name.startswith("kubernetes"):
|
||||
run(["./run.sh", args.branch, pkg_version, flannel_tag, test_registry, args.task_id, "iptables"])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
122
test.sh
Executable file
122
test.sh
Executable file
@@ -0,0 +1,122 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -efu
|
||||
|
||||
dry_run=0
|
||||
while true; do
|
||||
case "$1" in
|
||||
--dry-run)
|
||||
dry_run=1
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
r()
|
||||
{
|
||||
if [[ $dry_run == 1 ]]; then
|
||||
echo "$@"
|
||||
else
|
||||
"$@"
|
||||
fi
|
||||
}
|
||||
|
||||
branch=$1
|
||||
task_id=$2
|
||||
|
||||
# kubernetes_package_versions=()
|
||||
declare -A kubernetes_package_versions
|
||||
api_url="https://rdb.altlinux.org/api/task/packages/$task_id"
|
||||
test_registry=10.4.5.110:5000
|
||||
image_forge_dir=$PWD
|
||||
tests_dir=$(realpath ../kubernetes-tests)
|
||||
kubernetes_images=(k8s/kube-apiserver k8s/kube-controller-manager k8s/kube-scheduler k8s/kube-proxy k8s/kubelet)
|
||||
temp_tasks_config=$(mktemp)
|
||||
|
||||
registry_prefix=$branch
|
||||
if [[ $branch == c10f2 ]]; then
|
||||
registry_prefix=c10f
|
||||
fi
|
||||
|
||||
api_response=$(curl -s "$api_url")
|
||||
|
||||
while read -r subtask; do
|
||||
package_name=$(jq -r '.source.name' <<< "$subtask")
|
||||
package_version=$(jq -r '.source.version' <<< "$subtask")
|
||||
if [[ $package_name =~ ^kubernetes1\.[0-9]{2}$ ]]; then
|
||||
kubernetes_package_versions[$package_name]=$package_version
|
||||
elif [[ $package_name =~ ^etcd-for-kubernetes ]]; then
|
||||
kubernetes_package_versions[$package_name]=$package_version
|
||||
fi
|
||||
done < <(jq -c '.subtasks[]' <<< "$api_response")
|
||||
|
||||
printf -v kubernetes_images_joined '"%s", ' "${kubernetes_images[@]}"
|
||||
cat <<EOF > "$temp_tasks_config"
|
||||
[$branch]
|
||||
$task_id = [${kubernetes_images_joined%, }]
|
||||
EOF
|
||||
|
||||
r podman login "$test_registry" --username admin --password 123
|
||||
|
||||
flannel_tag=$(curl -s "https://registry.altlinux.org/v2/$registry_prefix/flannel/tags/list" | jq -r '.tags[-1]')
|
||||
r skopeo copy -a "docker://registry.altlinux.org/$registry_prefix/flannel:$flannel_tag" "docker://$test_registry/$registry_prefix/flannel:$flannel_tag"
|
||||
|
||||
if [[ ${!kubernetes_package_versions[*]} =~ cni-plugin-flannel ]]; then
|
||||
r ./build.py \
|
||||
--branch "$branch" \
|
||||
--registry registry.altlinux.org \
|
||||
--overwrite-organization "$registry_prefix" \
|
||||
--skip-arches riscv64 loong64 \
|
||||
--skip-stage push \
|
||||
--log-level debug \
|
||||
--tasks "$temp_tasks_config" \
|
||||
-i k8s/flannel-cni-plugin
|
||||
|
||||
r podman manifest push "registry.altlinux.org/$registry_prefix/flannel-cni-plugin:v$version" "docker://$test_registry/$registry_prefix/$image_name:v$version"
|
||||
fi
|
||||
|
||||
for name in "${!kubernetes_package_versions[@]}"; do
|
||||
version=${kubernetes_package_versions[$name]}
|
||||
images=()
|
||||
versions='{'
|
||||
if [[ $name =~ ^kubernetes1\.[0-9]{2}$ ]]; then
|
||||
images+=("${kubernetes_images[@]}")
|
||||
for image in "${kubernetes_images[@]}"; do
|
||||
versions+="\"$image\":\"${version::4}\","
|
||||
done
|
||||
fi
|
||||
if [[ $name =~ ^etcd-for-kubernetes(1\.[0-9]{2})$ ]]; then
|
||||
images+=("k8s/etcd")
|
||||
versions+="\"k8s/etcd\":\"${BASH_REMATCH[1]::4}\","
|
||||
fi
|
||||
versions="${versions%,}}"
|
||||
|
||||
cd "$image_forge_dir"
|
||||
r ./build.py \
|
||||
--branch "$branch" \
|
||||
--registry registry.altlinux.org \
|
||||
--overwrite-organization "$registry_prefix" \
|
||||
--skip-arches riscv64 loong64 \
|
||||
--skip-stage push \
|
||||
--log-level debug \
|
||||
--tasks "$temp_tasks_config" \
|
||||
-i "${images[@]}" \
|
||||
--package-versions "$versions"
|
||||
|
||||
for image in "${images[@]}"; do
|
||||
image_name=${image:4}
|
||||
r podman manifest push "registry.altlinux.org/$registry_prefix/$image_name:v$version" "docker://$test_registry/$registry_prefix/$image_name:v$version"
|
||||
if [[ $image_name == etcd ]]; then
|
||||
r podman manifest push "registry.altlinux.org/$registry_prefix/$image_name:v$version" "docker://$test_registry/$registry_prefix/$image_name:$version-0"
|
||||
r podman manifest push "registry.altlinux.org/$registry_prefix/$image_name:v$version" "docker://$test_registry/$registry_prefix/$image_name:$version"
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
if [[ =~ ^kubernetes1\.[0-9]{2}$ ]]; then
|
||||
cd "$tests_dir"
|
||||
r ./run.sh "$branch" "$version" "$flannel_tag" "$test_registry" "$task_id" iptables
|
||||
fi
|
||||
Reference in New Issue
Block a user