Compare commits
41 Commits
remove-whi
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
100774c093 | ||
|
|
d2f559807e | ||
|
|
fba0ad7a19 | ||
|
|
e2cbdbbfeb | ||
|
|
77ddff82da | ||
| bc393cf9bf | |||
| 1e175655f0 | |||
|
|
b320f030c0 | ||
|
|
0efbca5122 | ||
|
|
6a56767489 | ||
|
|
f5262e5e76 | ||
|
|
1e8c1a4a09 | ||
|
|
18d74c23b5 | ||
|
|
e9627bfd2e | ||
|
|
34d1a8b766 | ||
|
|
01b33b1d5b | ||
|
|
743d6fffd0 | ||
|
|
a192690134 | ||
|
|
29128ecd3b | ||
| b9af26e503 | |||
|
|
b96a51b8df | ||
|
|
61276ad9fc | ||
|
|
eedd903ee0 | ||
|
|
4534622c3d | ||
|
|
87e8fd010e | ||
|
|
1cd238d6a8 | ||
|
|
7820b657bd | ||
|
|
6b5cd17bb6 | ||
|
|
7e089c45b0 | ||
|
|
498eec0b05 | ||
|
|
b3fe149faa | ||
|
|
f7b261f245 | ||
| fc2a686fc1 | |||
| fccd2998fe | |||
| bc457107f1 | |||
| 81d5297c7c | |||
|
|
ebfa49dd1d | ||
|
|
d609016659 | ||
|
|
a3de7f8261 | ||
|
|
0a105aace4 | ||
|
|
2db6b03aa8 |
@@ -60,13 +60,15 @@ def main() -> None:
|
|||||||
for ver in vers_branch:
|
for ver in vers_branch:
|
||||||
kube_ver = ver.get("kube-version")
|
kube_ver = ver.get("kube-version")
|
||||||
dns_ver = ver.get("coredns")
|
dns_ver = ver.get("coredns")
|
||||||
|
etcd_ver = ver.get("etcd", kube_ver)
|
||||||
if kube_ver != None and dns_ver != None:
|
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\":\"{kube_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\":\"{etcd_ver}\"" + "}'"
|
||||||
if ver.get("latest") != None and ver.get("latest"):
|
if ver.get("latest") != None and ver.get("latest"):
|
||||||
packs_string=f"-o k8s --latest {args.branch} "+packs_string
|
packs_string=f"-o k8s --latest {args.branch} "+packs_string
|
||||||
else:
|
else:
|
||||||
packs_string=f"-i {images_to_rebuild} "+packs_string
|
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(f"{args.workspace}/build.py {args.other_build_args} {packs_string}", shell=True)
|
||||||
subprocess.run("podman rmi -f --all", shell=True)
|
subprocess.run("podman rmi -f --all", shell=True)
|
||||||
|
|
||||||
|
|||||||
@@ -5,11 +5,13 @@
|
|||||||
"versions": [
|
"versions": [
|
||||||
{
|
{
|
||||||
"kube-version": "1.27",
|
"kube-version": "1.27",
|
||||||
"coredns": "1.10.1"
|
"coredns": "0",
|
||||||
|
"etcd": "3.5.15"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"kube-version": "1.28",
|
"kube-version": "1.28",
|
||||||
"coredns": "1.10.1",
|
"coredns": "0",
|
||||||
|
"etcd": "3.5.16",
|
||||||
"latest": true
|
"latest": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -49,15 +49,20 @@ do
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
echo $command
|
echo $command
|
||||||
eval $command 2>$IM.log || haserr=true
|
eval $command 2>$IM.log
|
||||||
|
if [ "$(echo $?)" == "0" ]; then
|
||||||
|
rm -rf $IM.log ||:
|
||||||
|
else
|
||||||
|
haserr=true
|
||||||
|
fi
|
||||||
|
|
||||||
echo "podman rmi --all"
|
echo "podman rmi --all"
|
||||||
podman rmi --all
|
podman rmi --all
|
||||||
|
|
||||||
if [ "$haserr" ]
|
if $haserr
|
||||||
then
|
then
|
||||||
if [[ -n $(cat $IM.log) ]]
|
if [ -f $IM.log ]
|
||||||
then errors="TEST ERROR OF IMAGE $IM: $(cat $IM.log); $errors"
|
then errors="TEST ERROR OF IMAGE $IM: $(cat $IM.log)\n $errors"
|
||||||
#else errors="TEST ERROR OF IMAGE $IM: test returned empty error, but exit status was nozero; $errors"
|
#else errors="TEST ERROR OF IMAGE $IM: test returned empty error, but exit status was nozero; $errors"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,16 +1,30 @@
|
|||||||
name: Full building alt images
|
name: Full building alt images
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_dispatch:
|
||||||
tags:
|
inputs:
|
||||||
- '*_*'
|
branch:
|
||||||
- '!*_k8s'
|
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
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-process:
|
build-process:
|
||||||
runs-on: alt-sisyphus
|
runs-on: alt-sisyphus
|
||||||
outputs:
|
outputs:
|
||||||
branch: ${{ env.BRANCH }}
|
|
||||||
org: ${{ env.ORG }}
|
|
||||||
url: ${{ env.URL }}
|
url: ${{ env.URL }}
|
||||||
repo: ${{ env.REPO }}
|
repo: ${{ env.REPO }}
|
||||||
buildres: ${{ steps.build-script.outcome }}
|
buildres: ${{ steps.build-script.outcome }}
|
||||||
@@ -19,34 +33,27 @@ jobs:
|
|||||||
uses: actions/init-alt-env@v1
|
uses: actions/init-alt-env@v1
|
||||||
- name: Install requires
|
- name: Install requires
|
||||||
run: |
|
run: |
|
||||||
echo "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 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
|
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 qemu-user-static-binfmt-aarch64 qemu-user-static-binfmt-arm qemu-user-static-binfmt-riscv qemu-user-static-binfmt-loongarch"
|
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
|
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
|
- name: Check workspace
|
||||||
run: |
|
run: |
|
||||||
repourl=$(echo $GU | cut -d '/' -f 3)
|
repourl=$(echo $GU | cut -d '/' -f 3)
|
||||||
echo "URL=$repourl" >> ${GITHUB_ENV}
|
echo "URL=$repourl" >> ${GITHUB_ENV}
|
||||||
echo $repourl
|
echo "URL=$repourl"
|
||||||
reponame=$(echo $GR | cut -d '/' -f 1)
|
reponame=$(echo $GR | cut -d '/' -f 1)
|
||||||
echo "REPO=$reponame" >> ${GITHUB_ENV}
|
echo "REPO=$reponame" >> ${GITHUB_ENV}
|
||||||
echo $reponame
|
echo "REPO=$reponame"
|
||||||
|
echo "GROUP=${{ inputs.group }}"
|
||||||
|
echo "BRANCH=${{ inputs.branch }}"
|
||||||
env:
|
env:
|
||||||
GU: ${{ gitea.server_url }}
|
GU: ${{ gitea.server_url }}
|
||||||
GR: ${{ gitea.repository }}
|
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
|
- name: Check out current repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Change vendor label for c10f
|
- name: Change vendor label for c10f
|
||||||
if: ${{ contains(github.ref_name, 'c10f') }}
|
if: ${{ contains(inputs.branch, 'c10f') }}
|
||||||
run: |
|
run: |
|
||||||
echo "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/*/Dockerfile.template ||:"
|
||||||
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 ||:
|
||||||
@@ -55,11 +62,10 @@ jobs:
|
|||||||
echo "sed -i 's/ALT Linux Team/BaseALT LLC/g' ${{ gitea.workspace }}/org/$ORG/*/info.yaml ||:"
|
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 ||:
|
sed -i 's/ALT Linux Team/BaseALT LLC/g' ${{ gitea.workspace }}/org/$ORG/*/info.yaml ||:
|
||||||
env:
|
env:
|
||||||
ORG: ${{ env.ORG }}
|
ORG: ${{ inputs.group }}
|
||||||
- name: Set repo for c10f2 (Temporary)
|
- name: Set repo for c10f2 (Temporary)
|
||||||
if: ${{ contains(github.ref_name, 'c10f2') }}
|
if: ${{ contains(inputs.branch, 'c10f2') }}
|
||||||
run: |
|
run: |
|
||||||
echo "event tag=${{ github.ref_name }}"
|
|
||||||
echo "10.4.0.3 update.altsp.su" >> /etc/hosts
|
echo "10.4.0.3 update.altsp.su" >> /etc/hosts
|
||||||
echo "cat /etc/hosts"
|
echo "cat /etc/hosts"
|
||||||
cat /etc/hosts
|
cat /etc/hosts
|
||||||
@@ -74,50 +80,35 @@ jobs:
|
|||||||
id: build-script
|
id: build-script
|
||||||
run: |
|
run: |
|
||||||
#build base with riskv64 for sisyphus if it is
|
#build base with riskv64 for sisyphus if it is
|
||||||
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
|
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
|
||||||
build_args="-b $BR --log-level debug --latest $BR -o $ORG --registry $BUILD_URL"
|
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"
|
echo "${{ gitea.workspace }}/build.py $build_args $arches"
|
||||||
${{ gitea.workspace }}/build.py $build_args $arches
|
${{ gitea.workspace }}/build.py $build_args $arches
|
||||||
env:
|
env:
|
||||||
ORG: ${{ env.ORG }}
|
ORG: ${{ inputs.group }}
|
||||||
BR: ${{ env.BRANCH }}
|
BR: ${{ inputs.branch }}
|
||||||
BUILD_URL: "gitea.basealt.ru/alt"
|
BUILD_URL: "${{ env.URL }}/${{ env.REPO }}"
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: Send notification if build crashed
|
- name: Send success notification
|
||||||
if: ${{ steps.build-script.outcome != 'success' }}
|
if: ${{ steps.build-script.outcome != 'success' }}
|
||||||
run: |
|
uses: actions/telegram-channel-action@v5
|
||||||
issueid=1
|
with:
|
||||||
body="Building images finish with some errors."
|
bot_token: ${{ secrets.TELEGRAM_BOT }}
|
||||||
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
|
channel_id: ${{ secrets.TELEGRAM_CHANNEL }}
|
||||||
echo "notification about test error is sent to issue $issueid"
|
message: "Building of images org/${{ inputs.group }} for branch ${{ inputs.branch }} is failed"
|
||||||
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:
|
test-process:
|
||||||
needs: build-process
|
needs: build-process
|
||||||
if: ${{ needs.build-process.outputs.buildres == 'success' && needs.build-process.outputs.org != 'k8s' }}
|
if: ${{ needs.build-process.outputs.buildres == 'success' }}
|
||||||
runs-on: alt-sisyphus
|
runs-on: alt-sisyphus
|
||||||
steps:
|
steps:
|
||||||
- name: Update apt
|
- name: Update apt
|
||||||
uses: actions/init-alt-env@v1
|
uses: actions/init-alt-env@v1
|
||||||
- name: Install requires
|
- name: Install requires
|
||||||
run: |
|
run: |
|
||||||
echo "apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah jq curl"
|
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
|
apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah jq curl golang
|
||||||
- name: Check out current repo
|
- name: Check out current repo
|
||||||
uses: https://gitea.com/actions/checkout@v4
|
uses: https://gitea.com/actions/checkout@v4
|
||||||
- name: Test
|
- name: Test
|
||||||
@@ -126,23 +117,25 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
$WS/.gitea/workflows/testscript $BR $ORG $URL $REPO $WS
|
$WS/.gitea/workflows/testscript $BR $ORG $URL $REPO $WS
|
||||||
cat haserr.log >> ${GITHUB_ENV}
|
cat haserr.log >> ${GITHUB_ENV}
|
||||||
|
cat errors.log 2>/dev/null || echo ''
|
||||||
echo "test process finished"
|
echo "test process finished"
|
||||||
env:
|
env:
|
||||||
BR: ${{ needs.build-process.outputs.branch }}
|
BR: ${{ inputs.branch }}
|
||||||
ORG: ${{ needs.build-process.outputs.org }}
|
ORG: ${{ inputs.group }}
|
||||||
URL: ${{ needs.build-process.outputs.url }}
|
URL: ${{ needs.build-process.outputs.url }}
|
||||||
REPO: ${{ needs.build-process.outputs.repo }}
|
REPO: ${{ needs.build-process.outputs.repo }}
|
||||||
WS: ${{ gitea.workspace }}
|
WS: ${{ gitea.workspace }}
|
||||||
- name: Send notification if test crashed
|
- name: Send notification if building was crashed
|
||||||
if: ${{ env.ERR == 'true' || steps.test-script.outcome == 'failure' }}
|
if: ${{ env.ERR == 'true' || steps.test-script.outcome == 'failure' }}
|
||||||
run: |
|
uses: actions/telegram-channel-action@v5
|
||||||
issueid=1
|
with:
|
||||||
errors=$(cat errors.log)
|
bot_token: ${{ secrets.TELEGRAM_BOT }}
|
||||||
body="Testing images finish with some errors. $errors"
|
channel_id: ${{ secrets.TELEGRAM_CHANNEL }}
|
||||||
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
|
message: "Testing of images org/${{ inputs.group }} for branch ${{ inputs.branch }} is failed"
|
||||||
echo "notification about test error is sent to issue $issueid"
|
- name: Send notification if building was crashed
|
||||||
env:
|
if: ${{ env.ERR == 'false' && steps.test-script.outcome != 'failure' }}
|
||||||
T: ${{ secrets.TOKEN }}
|
uses: actions/telegram-channel-action@v5
|
||||||
BR: ${{ needs.build-process.outputs.branch }}
|
with:
|
||||||
URL: ${{ gitea.server_url }}
|
bot_token: ${{ secrets.TELEGRAM_BOT }}
|
||||||
REPO: ${{ needs.build-process.outputs.repo }}
|
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"
|
||||||
|
|||||||
@@ -1,34 +1,43 @@
|
|||||||
name: Full building alt images
|
name: Full building alt images
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_dispatch:
|
||||||
tags:
|
inputs:
|
||||||
- "*_k8s"
|
branch:
|
||||||
|
description: 'Branch'
|
||||||
|
required: true
|
||||||
|
default: 'sisyphus'
|
||||||
|
type: choice
|
||||||
|
options:
|
||||||
|
- sisyphus
|
||||||
|
- p10
|
||||||
|
- p11
|
||||||
|
- c10f2
|
||||||
|
env:
|
||||||
|
ORG: k8s
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-process:
|
build-process:
|
||||||
runs-on: alt-sisyphus
|
runs-on: alt-sisyphus
|
||||||
outputs:
|
outputs:
|
||||||
branch: ${{ env.BRANCH }}
|
|
||||||
org: ${{ env.ORG }}
|
|
||||||
url: ${{ env.URL }}
|
url: ${{ env.URL }}
|
||||||
repo: ${{ env.REPO }}
|
repo: ${{ env.REPO }}
|
||||||
buildres: ${{ steps.build-script.outcome }}
|
buildres: ${{ steps.build-script.outcome }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check workspace
|
- name: Check workspace and inputs
|
||||||
run: |
|
run: |
|
||||||
repourl=$(echo $GU | cut -d '/' -f 3)
|
repourl=$(echo $GU | cut -d '/' -f 3)
|
||||||
echo "URL=$repourl" >> ${GITHUB_ENV}
|
echo "URL=$repourl" >> ${GITHUB_ENV}
|
||||||
echo $repourl
|
echo "URL=$repourl"
|
||||||
reponame=$(echo $GR | cut -d '/' -f 1)
|
reponame=$(echo $GR | cut -d '/' -f 1)
|
||||||
echo "REPO=$reponame" >> ${GITHUB_ENV}
|
echo "REPO=$reponame" >> ${GITHUB_ENV}
|
||||||
echo $reponame
|
echo "REPO=$reponame"
|
||||||
|
echo "BRANCH=${{ inputs.branch }}"
|
||||||
env:
|
env:
|
||||||
GU: ${{ gitea.server_url }}
|
GU: ${{ gitea.server_url }}
|
||||||
GR: ${{ gitea.repository }}
|
GR: ${{ gitea.repository }}
|
||||||
- name: Set repo for c10f2 (Temporary)
|
- name: Set repo for c10f2 (Temporary)
|
||||||
if: ${{ contains(github.ref_name, 'c10f2') }}
|
if: ${{ contains(inputs.branch, 'c10f2') }}
|
||||||
run: |
|
run: |
|
||||||
echo "event tag=${{ github.ref_name }}"
|
|
||||||
echo "10.4.0.3 update.altsp.su" >> /etc/hosts
|
echo "10.4.0.3 update.altsp.su" >> /etc/hosts
|
||||||
echo "cat /etc/hosts"
|
echo "cat /etc/hosts"
|
||||||
cat /etc/hosts
|
cat /etc/hosts
|
||||||
@@ -36,23 +45,14 @@ jobs:
|
|||||||
uses: actions/init-alt-env@v1
|
uses: actions/init-alt-env@v1
|
||||||
- name: Install requires
|
- name: Install requires
|
||||||
run: |
|
run: |
|
||||||
echo "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 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
|
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 qemu-user-static-binfmt-aarch64 qemu-user-static-binfmt-arm qemu-user-static-binfmt-riscv qemu-user-static-binfmt-loongarch"
|
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
|
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
|
- name: Check out current repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Change vendor label for c10f
|
- name: Change vendor label for c10f
|
||||||
if: ${{ contains(github.ref_name, 'c10f') }}
|
if: ${{ contains(inputs.branch, 'c10f') }}
|
||||||
run: |
|
run: |
|
||||||
echo "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/*/Dockerfile.template ||:"
|
||||||
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,29 +78,13 @@ jobs:
|
|||||||
${{ gitea.workspace }}/.gitea/workflows/k8s_buildscript.py --branch "$BR" --other-build-args "$build_args" --workspace "${{ gitea.workspace }}"
|
${{ gitea.workspace }}/.gitea/workflows/k8s_buildscript.py --branch "$BR" --other-build-args "$build_args" --workspace "${{ gitea.workspace }}"
|
||||||
env:
|
env:
|
||||||
ORG: ${{ env.ORG }}
|
ORG: ${{ env.ORG }}
|
||||||
BR: ${{ env.BRANCH }}
|
BR: ${{ inputs.branch }}
|
||||||
BUILD_URL: "gitea.basealt.ru/alt"
|
BUILD_URL: "gitea.basealt.ru/alt"
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: Send notification if build crashed
|
- name: Send notification if build crashed
|
||||||
if: ${{ steps.build-script.outcome != 'success' }}
|
if: ${{ steps.build-script.outcome != 'success' }}
|
||||||
run: |
|
uses: actions/telegram-channel-action@v5
|
||||||
issueid=1
|
with:
|
||||||
body="Building images finish with some errors."
|
bot_token: ${{ secrets.TELEGRAM_BOT }}
|
||||||
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
|
channel_id: ${{ secrets.TELEGRAM_CHANNEL }}
|
||||||
echo "notification about test error is sent to issue $issueid"
|
message: "Building of images org/k8s for branch ${{ inputs.branch }} is failed"
|
||||||
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) }}
|
|
||||||
|
|||||||
159
.gitea/workflows/wf_multiple.yaml
Normal file
159
.gitea/workflows/wf_multiple.yaml
Normal file
@@ -0,0 +1,159 @@
|
|||||||
|
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,21 +1,35 @@
|
|||||||
name: Building alt images
|
name: Building alt images
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_dispatch:
|
||||||
tags:
|
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
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-process:
|
build-process:
|
||||||
runs-on: alt-sisyphus
|
runs-on: alt-sisyphus
|
||||||
outputs:
|
outputs:
|
||||||
branch: ${{ env.BRANCH }}
|
|
||||||
image: ${{ env.IMAGE }}
|
|
||||||
url: ${{ env.URL }}
|
url: ${{ env.URL }}
|
||||||
repo: ${{ env.REPO }}
|
repo: ${{ env.REPO }}
|
||||||
buildres: ${{ steps.build-script.outcome }}
|
buildres: ${{ steps.build-script.outcome }}
|
||||||
test: ${{ env.TEST }}
|
test: ${{ env.TEST }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check workspace
|
- name: Check workspace and inputs
|
||||||
run: |
|
run: |
|
||||||
repourl=$(echo $GU | cut -d '/' -f 3)
|
repourl=$(echo $GU | cut -d '/' -f 3)
|
||||||
echo "URL=$repourl" >> ${GITHUB_ENV}
|
echo "URL=$repourl" >> ${GITHUB_ENV}
|
||||||
@@ -23,13 +37,15 @@ jobs:
|
|||||||
reponame=$(echo $GR | cut -d '/' -f 1)
|
reponame=$(echo $GR | cut -d '/' -f 1)
|
||||||
echo "REPO=$reponame" >> ${GITHUB_ENV}
|
echo "REPO=$reponame" >> ${GITHUB_ENV}
|
||||||
echo "REPO=$reponame"
|
echo "REPO=$reponame"
|
||||||
|
echo "BRANCH=${{ inputs.branch }}"
|
||||||
|
echo "IMAGE=${{ inputs.image }}"
|
||||||
|
echo "VERSION=${{ inputs.version }}"
|
||||||
env:
|
env:
|
||||||
GU: ${{ gitea.server_url }}
|
GU: ${{ gitea.server_url }}
|
||||||
GR: ${{ gitea.repository }}
|
GR: ${{ gitea.repository }}
|
||||||
- name: Set repo for c10f2 (Temporary)
|
- name: Set repo for c10f2 (Temporary)
|
||||||
if: ${{ contains(github.ref_name, 'c10f2') }}
|
if: ${{ contains(inputs.branch, 'c10f2') }}
|
||||||
run: |
|
run: |
|
||||||
echo "event tag=${{ github.ref_name }}"
|
|
||||||
echo "10.4.0.3 update.altsp.su" >> /etc/hosts
|
echo "10.4.0.3 update.altsp.su" >> /etc/hosts
|
||||||
echo "cat /etc/hosts"
|
echo "cat /etc/hosts"
|
||||||
cat /etc/hosts
|
cat /etc/hosts
|
||||||
@@ -37,8 +53,8 @@ jobs:
|
|||||||
uses: actions/init-alt-env@v1
|
uses: actions/init-alt-env@v1
|
||||||
- name: Install requires
|
- name: Install requires
|
||||||
run: |
|
run: |
|
||||||
echo "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 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
|
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 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"
|
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
|
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
|
- name: Check out current repo
|
||||||
@@ -50,79 +66,44 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
P_USER: ${{ secrets.PODMAN_USER }}
|
P_USER: ${{ secrets.PODMAN_USER }}
|
||||||
P_PASS: ${{ secrets.PODMAN_PASS }}
|
P_PASS: ${{ secrets.PODMAN_PASS }}
|
||||||
- name: Check files in the repository
|
|
||||||
run: |
|
|
||||||
ls -a ${{ gitea.workspace }}
|
|
||||||
- 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}
|
|
||||||
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
|
- name: Change vendor label for c10f
|
||||||
if: ${{ contains(github.ref_name, 'c10f') }}
|
if: ${{ contains(inputs.branch, 'c10f') }}
|
||||||
run: |
|
run: |
|
||||||
echo "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/$IM/Dockerfile.template ||:"
|
||||||
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/$IM/Dockerfile.template ||:
|
||||||
echo "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/$IM/distroless.toml ||:"
|
||||||
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/$IM/distroless.toml ||:
|
||||||
echo "sed -i 's/ALT Linux Team/BaseALT LLC/g' ${{ gitea.workspace }}/org/$ORG/*/info.yaml ||:"
|
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/$ORG/*/info.yaml ||:
|
sed -i 's/ALT Linux Team/BaseALT LLC/g' ${{ gitea.workspace }}/org/$IM/info.yaml ||:
|
||||||
env:
|
env:
|
||||||
ORG: ${{ env.ORG }}
|
IM: ${{ inputs.image }}
|
||||||
- name: Get test for image
|
- name: Get test for image
|
||||||
run: |
|
run: |
|
||||||
if test -f ${{ gitea.workspace }}/org/$IM/test; then testscript=$(cat ${{ gitea.workspace }}/org/$IM/test); else testscript=""; fi
|
if test -f ${{ gitea.workspace }}/org/$IM/test; then testscript=$(cat ${{ gitea.workspace }}/org/$IM/test); else testscript=""; fi
|
||||||
echo "TEST=$testscript" >> ${GITHUB_ENV}
|
echo "TEST=$testscript" >> ${GITHUB_ENV}
|
||||||
env:
|
env:
|
||||||
IM: ${{ env.IMAGE }}
|
IM: ${{ inputs.image }}
|
||||||
BR: ${{ env.BRANCH }}
|
BR: ${{ inputs.branch }}
|
||||||
- name: Run building script
|
- name: Run building script
|
||||||
id: build-script
|
id: build-script
|
||||||
run: |
|
run: |
|
||||||
if [[ "$IM" == *"k8s"* ]]; then k8sarg="--package-versions {\"$IM\":\"$VER\"}"; else k8sarg=""; fi
|
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
|
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 $k8sarg"
|
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 gitea.basealt.ru/alt $k8sarg
|
${{ gitea.workspace }}/build.py -i $IM -b $BR $arches --latest $BR --log-level debug --registry $BUILD_URL $k8sarg
|
||||||
env:
|
env:
|
||||||
IM: ${{ env.IMAGE }}
|
IM: ${{ inputs.image }}
|
||||||
VER: ${{ env.VER }}
|
VER: ${{ inputs.version }}
|
||||||
BR: ${{ env.BRANCH }}
|
BR: ${{ inputs.branch }}
|
||||||
ORG: ${{ env.ORG }}
|
BUILD_URL: "${{ env.URL }}/${{ env.REPO }}"
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: Send notification if build crashed
|
- name: Send notification if build crashed
|
||||||
if: ${{ steps.build-script.outcome != 'success' }}
|
if: ${{ steps.build-script.outcome != 'success' }}
|
||||||
run: |
|
uses: actions/telegram-channel-action@v5
|
||||||
issueid=1
|
with:
|
||||||
body="Building image $IM finish with some errors."
|
bot_token: ${{ secrets.TELEGRAM_BOT }}
|
||||||
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
|
channel_id: ${{ secrets.TELEGRAM_CHANNEL }}
|
||||||
echo "notification about test error is sent to issue $issueid"
|
message: "Building of image ${{ inputs.image }} for branch ${{ inputs.branch }} is failed"
|
||||||
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:
|
test-process:
|
||||||
needs: build-process
|
needs: build-process
|
||||||
if: ${{ needs.build-process.outputs.buildres == 'success' }}
|
if: ${{ needs.build-process.outputs.buildres == 'success' }}
|
||||||
@@ -132,8 +113,8 @@ jobs:
|
|||||||
uses: https://gitea.basealt.ru/actions/init-alt-env@v1
|
uses: https://gitea.basealt.ru/actions/init-alt-env@v1
|
||||||
- name: Install requires
|
- name: Install requires
|
||||||
run: |
|
run: |
|
||||||
echo "apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah curl"
|
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
|
apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah curl golang
|
||||||
- name: Run test
|
- name: Run test
|
||||||
id: test-script
|
id: test-script
|
||||||
if: ${{ needs.build-process.outputs.test != '' }}
|
if: ${{ needs.build-process.outputs.test != '' }}
|
||||||
@@ -142,8 +123,8 @@ jobs:
|
|||||||
imname=$(echo "$IM" | cut -d "/" -f2)
|
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
|
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:
|
env:
|
||||||
IM: ${{ needs.build-process.outputs.image }}
|
IM: ${{ inputs.image }}
|
||||||
BR: ${{ needs.build-process.outputs.branch }}
|
BR: ${{ inputs.branch }}
|
||||||
URL: ${{ needs.build-process.outputs.url }}
|
URL: ${{ needs.build-process.outputs.url }}
|
||||||
REPO: ${{ needs.build-process.outputs.repo }}
|
REPO: ${{ needs.build-process.outputs.repo }}
|
||||||
TEST: ${{ needs.build-process.outputs.test }}
|
TEST: ${{ needs.build-process.outputs.test }}
|
||||||
@@ -156,22 +137,7 @@ jobs:
|
|||||||
if [[ $IM = 'alt/distroless-true' ]]; then podman run --rm $URL/$REPO/$BR/$imname:latest true; fi
|
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
|
if [[ $IM = 'alt/distroless-gotop' ]]; then podman run --rm $URL/$REPO/$BR/$imname:latest --version; fi
|
||||||
env:
|
env:
|
||||||
IM: ${{ needs.build-process.outputs.image }}
|
IM: ${{ inputs.image }}
|
||||||
BR: ${{ needs.build-process.outputs.branch }}
|
BR: ${{ inputs.branch }}
|
||||||
URL: ${{ needs.build-process.outputs.url }}
|
URL: ${{ needs.build-process.outputs.url }}
|
||||||
REPO: ${{ needs.build-process.outputs.repo }}
|
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 }}
|
|
||||||
|
|
||||||
|
|||||||
70
build.py
70
build.py
@@ -19,8 +19,6 @@ import yaml
|
|||||||
from jinja2 import Environment, BaseLoader
|
from jinja2 import Environment, BaseLoader
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
clean_images_counter = 0
|
|
||||||
clean_images_limit_count = 5
|
|
||||||
|
|
||||||
ORG_DIR = Path("org")
|
ORG_DIR = Path("org")
|
||||||
|
|
||||||
@@ -103,6 +101,8 @@ class Tasks:
|
|||||||
if image.canonical_name in i or len(i) == 0
|
if image.canonical_name in i or len(i) == 0
|
||||||
]
|
]
|
||||||
|
|
||||||
|
class AltAPIError(Exception):
|
||||||
|
pass
|
||||||
|
|
||||||
def api_get_source_package_version(branch: str, package_name: str) -> str:
|
def api_get_source_package_version(branch: str, package_name: str) -> str:
|
||||||
api_url = "https://rdb.altlinux.org/api/site/package_versions_from_tasks"
|
api_url = "https://rdb.altlinux.org/api/site/package_versions_from_tasks"
|
||||||
@@ -113,7 +113,7 @@ def api_get_source_package_version(branch: str, package_name: str) -> str:
|
|||||||
params = {"arch": "x86_64", "package_type": "source", "name": package_name}
|
params = {"arch": "x86_64", "package_type": "source", "name": package_name}
|
||||||
response = requests.get(api_url, params)
|
response = requests.get(api_url, params)
|
||||||
if response.status_code != 200:
|
if response.status_code != 200:
|
||||||
raise RuntimeError(
|
raise AltAPIError(
|
||||||
f"failed to retrieve source package version: source package {package_name!r}, branch {branch!r} "
|
f"failed to retrieve source package version: source package {package_name!r}, branch {branch!r} "
|
||||||
)
|
)
|
||||||
result = response.json()
|
result = response.json()
|
||||||
@@ -121,7 +121,7 @@ def api_get_source_package_version(branch: str, package_name: str) -> str:
|
|||||||
if v["branch"] == branch:
|
if v["branch"] == branch:
|
||||||
return v["version"]
|
return v["version"]
|
||||||
|
|
||||||
raise RuntimeError(
|
raise AltAPIError(
|
||||||
f"failed to retrieve source package version: source package {package_name!r}, branch {branch!r} "
|
f"failed to retrieve source package version: source package {package_name!r}, branch {branch!r} "
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -134,7 +134,7 @@ def api_get_source_package_version_from_task(task_id: str, package_name: str):
|
|||||||
api_url = f"https://rdb.altlinux.org/api/task/packages/{task_id}"
|
api_url = f"https://rdb.altlinux.org/api/task/packages/{task_id}"
|
||||||
response = requests.get(api_url)
|
response = requests.get(api_url)
|
||||||
if response.status_code != 200:
|
if response.status_code != 200:
|
||||||
raise RuntimeError(
|
raise AltAPIError(
|
||||||
f"failed to retrieve source package version from task: source package {package_name!r}, task_id {task_id}"
|
f"failed to retrieve source package version from task: source package {package_name!r}, task_id {task_id}"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -143,7 +143,7 @@ def api_get_source_package_version_from_task(task_id: str, package_name: str):
|
|||||||
if subtask["source"]["name"] == package_name:
|
if subtask["source"]["name"] == package_name:
|
||||||
return subtask["source"]["version"]
|
return subtask["source"]["version"]
|
||||||
|
|
||||||
raise RuntimeError(
|
raise AltAPIError(
|
||||||
f"failed to retrieve source package version from task: source package {package_name!r}, task_id {task_id}"
|
f"failed to retrieve source package version from task: source package {package_name!r}, task_id {task_id}"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -202,9 +202,22 @@ class Tags:
|
|||||||
package_name,
|
package_name,
|
||||||
task_ids[0],
|
task_ids[0],
|
||||||
)
|
)
|
||||||
|
try:
|
||||||
version = api_get_source_package_version_from_task(
|
version = api_get_source_package_version_from_task(
|
||||||
task_ids[0], package_name
|
task_ids[0], package_name
|
||||||
)
|
)
|
||||||
|
except AltAPIError:
|
||||||
|
logger.warning(
|
||||||
|
"failed getting %s package version from task %s",
|
||||||
|
package_name,
|
||||||
|
task_ids[0],
|
||||||
|
)
|
||||||
|
logger.info(
|
||||||
|
"getting %s package version from repo %s",
|
||||||
|
package_name,
|
||||||
|
branch,
|
||||||
|
)
|
||||||
|
version = api_get_source_package_version(branch, package_name)
|
||||||
else:
|
else:
|
||||||
logger.info(
|
logger.info(
|
||||||
"getting %s package version from repo %s",
|
"getting %s package version from repo %s",
|
||||||
@@ -772,7 +785,7 @@ class DockerBuilder:
|
|||||||
".",
|
".",
|
||||||
]
|
]
|
||||||
|
|
||||||
if image.annotations != None:
|
if image.annotations is not None:
|
||||||
build_cmd = [
|
build_cmd = [
|
||||||
"podman",
|
"podman",
|
||||||
"build",
|
"build",
|
||||||
@@ -786,7 +799,7 @@ class DockerBuilder:
|
|||||||
f"--annotation={akey}={avalue}")
|
f"--annotation={akey}={avalue}")
|
||||||
|
|
||||||
d = datetime.now()
|
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'), '')
|
ver = next((tag for tag in tags if tag != 'latest'), '')
|
||||||
if ver != '':
|
if ver != '':
|
||||||
@@ -829,23 +842,6 @@ class DockerBuilder:
|
|||||||
|
|
||||||
self.run(cmd)
|
self.run(cmd)
|
||||||
|
|
||||||
global clean_images_counter
|
|
||||||
|
|
||||||
if clean_images_limit_count <= clean_images_counter:
|
|
||||||
cmd = [
|
|
||||||
"podman",
|
|
||||||
"rmi",
|
|
||||||
"--all",
|
|
||||||
"-f",
|
|
||||||
]
|
|
||||||
self.run(cmd,
|
|
||||||
check=False,
|
|
||||||
stderr=subprocess.DEVNULL,
|
|
||||||
stdout=subprocess.DEVNULL,
|
|
||||||
)
|
|
||||||
clean_images_counter = 0
|
|
||||||
else:
|
|
||||||
clean_images_counter += 1
|
|
||||||
|
|
||||||
|
|
||||||
class ImagesInfo:
|
class ImagesInfo:
|
||||||
@@ -994,6 +990,10 @@ def parse_args():
|
|||||||
type=json.loads,
|
type=json.loads,
|
||||||
help="json string where key is image name, value is the package version",
|
help="json string where key is image name, value is the package version",
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--clean-images-limit",
|
||||||
|
help="remove all the images in the container storage when number of images hits the limit",
|
||||||
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--log-level",
|
"--log-level",
|
||||||
default="warning",
|
default="warning",
|
||||||
@@ -1023,6 +1023,8 @@ def main():
|
|||||||
|
|
||||||
logger.info("PKG_VERSIONS=%s", PKG_VERSIONS)
|
logger.info("PKG_VERSIONS=%s", PKG_VERSIONS)
|
||||||
|
|
||||||
|
clean_images_counter = 0
|
||||||
|
|
||||||
arches = args.arches
|
arches = args.arches
|
||||||
images_info = ImagesInfo()
|
images_info = ImagesInfo()
|
||||||
tags = Tags(args.tags, args.latest)
|
tags = Tags(args.tags, args.latest)
|
||||||
@@ -1044,6 +1046,7 @@ def main():
|
|||||||
if "render_dockerfiles" in args.stages:
|
if "render_dockerfiles" in args.stages:
|
||||||
db.render_dockerfiles()
|
db.render_dockerfiles()
|
||||||
db.load_distrolesses()
|
db.load_distrolesses()
|
||||||
|
|
||||||
for image in db.get_build_order():
|
for image in db.get_build_order():
|
||||||
if image.canonical_name not in args.images:
|
if image.canonical_name not in args.images:
|
||||||
continue
|
continue
|
||||||
@@ -1057,6 +1060,23 @@ def main():
|
|||||||
if "push" in args.stages:
|
if "push" in args.stages:
|
||||||
db.podman_push(image, args.sign)
|
db.podman_push(image, args.sign)
|
||||||
|
|
||||||
|
if args.clean_images_limit is not None:
|
||||||
|
if clean_images_counter >= args.clean_images_limit:
|
||||||
|
cmd = [
|
||||||
|
"podman",
|
||||||
|
"rmi",
|
||||||
|
"--all",
|
||||||
|
"-f",
|
||||||
|
]
|
||||||
|
db.run(cmd,
|
||||||
|
check=False,
|
||||||
|
stderr=subprocess.DEVNULL,
|
||||||
|
stdout=subprocess.DEVNULL,
|
||||||
|
)
|
||||||
|
clean_images_counter = 0
|
||||||
|
else:
|
||||||
|
clean_images_counter += 1
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|||||||
@@ -7,8 +7,38 @@ skip-arches = [ "386" ]
|
|||||||
["alt/zot"]
|
["alt/zot"]
|
||||||
skip-arches = [ "386" ]
|
skip-arches = [ "386" ]
|
||||||
|
|
||||||
|
["alt/kafka"]
|
||||||
|
skip-arches = [ "386" ]
|
||||||
|
|
||||||
|
["alt/grafana"]
|
||||||
|
skip-arches = [ "386" ]
|
||||||
|
|
||||||
["alt/ansible"]
|
["alt/ansible"]
|
||||||
skip-branches = [ "c10f2", "c10f1", "p10" ]
|
skip-branches = [ "c10f2", "c10f1", "p10" ]
|
||||||
|
|
||||||
["alt/buildkit"]
|
["alt/buildkit"]
|
||||||
skip-branches = [ "c10f1", "p10" ]
|
skip-branches = [ "c10f1", "p10" ]
|
||||||
|
|
||||||
|
["k8s/metrics-server"]
|
||||||
|
skip-branches = [ "c10f1", "c10f2", "p11", "p10" ]
|
||||||
|
|
||||||
|
["kubevirt/virt-api"]
|
||||||
|
skip-arches = [ "386", "loong64" ]
|
||||||
|
|
||||||
|
["kubevirt/virt-controller"]
|
||||||
|
skip-arches = [ "386", "loong64" ]
|
||||||
|
|
||||||
|
["kubevirt/virt-exportproxy"]
|
||||||
|
skip-arches = [ "386", "loong64" ]
|
||||||
|
|
||||||
|
["kubevirt/virt-exportserver"]
|
||||||
|
skip-arches = [ "386", "loong64" ]
|
||||||
|
|
||||||
|
["kubevirt/virt-handler"]
|
||||||
|
skip-arches = [ "386", "loong64" ]
|
||||||
|
|
||||||
|
["kubevirt/virt-launcher"]
|
||||||
|
skip-arches = [ "386", "loong64" ]
|
||||||
|
|
||||||
|
["kubevirt/virt-operator"]
|
||||||
|
skip-arches = [ "386", "loong64" ]
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: "{{ version }}"
|
version_template:
|
||||||
|
- "{{ version }}"
|
||||||
source_packages:
|
source_packages:
|
||||||
- ansible-core
|
- ansible-core
|
||||||
- ansible-vim
|
- ansible-vim
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: "{{ version }}"
|
version_template:
|
||||||
|
- "{{ version }}"
|
||||||
source_packages:
|
source_packages:
|
||||||
- apache2
|
- apache2
|
||||||
annotations:
|
annotations:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: "{{ version }}"
|
version_template:
|
||||||
|
- "{{ version }}"
|
||||||
source_packages:
|
source_packages:
|
||||||
- buildkit
|
- buildkit
|
||||||
annotations:
|
annotations:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: "{{ version }}"
|
version_template:
|
||||||
|
- "{{ version }}"
|
||||||
source_packages:
|
source_packages:
|
||||||
- gitea
|
- gitea
|
||||||
annotations:
|
annotations:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: "{{ version }}"
|
version_template:
|
||||||
|
- "{{ version }}"
|
||||||
source_packages:
|
source_packages:
|
||||||
- golang
|
- golang
|
||||||
annotations:
|
annotations:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: "{{ version }}"
|
version_template:
|
||||||
|
- "{{ version }}"
|
||||||
source_packages:
|
source_packages:
|
||||||
- grafana
|
- grafana
|
||||||
annotations:
|
annotations:
|
||||||
|
|||||||
21
org/alt/kafka/Dockerfile.template
Normal file
21
org/alt/kafka/Dockerfile.template
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
FROM {{ registry }}{{ branch }}/{{ alt_image }}:latest
|
||||||
|
|
||||||
|
MAINTAINER alt-cloud
|
||||||
|
|
||||||
|
LABEL org.opencontainers.image.title="kafka"
|
||||||
|
LABEL org.opencontainers.image.description="Apache Kafka is a distributed event store and stream-processing platform"
|
||||||
|
LABEL org.opencontainers.image.source="https://github.com/apache/kafka"
|
||||||
|
LABEL org.opencontainers.image.licenses="Apache-2.0"
|
||||||
|
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
||||||
|
|
||||||
|
{{ install_packages("kafka", "ca-certificates", "gpg") }}
|
||||||
|
|
||||||
|
USER kafka:kafka
|
||||||
|
EXPOSE 9092 2181
|
||||||
|
WORKDIR /var/lib/kafka
|
||||||
|
VOLUME ["/var/lib/kafka","/var/log/kafka"]
|
||||||
|
|
||||||
|
COPY kafka-entrypoint.sh /kafka-entrypoint.sh
|
||||||
|
|
||||||
|
ENTRYPOINT [ "/bin/bash" ]
|
||||||
|
CMD ["/kafka-entrypoint.sh"]
|
||||||
37
org/alt/kafka/README.md
Normal file
37
org/alt/kafka/README.md
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
# Kafka image
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
Commnad for using kafka:
|
||||||
|
```
|
||||||
|
podman exec -it -u kafka <CONTAINER ID> /usr/bin/sh
|
||||||
|
```
|
||||||
|
```
|
||||||
|
sh-5.2$ /usr/lib/kafka/bin/kafka-topics.sh --create --topic quickstart-events --bootstrap-server localhost:9092
|
||||||
|
```
|
||||||
|
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 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
|
||||||
|
```
|
||||||
|
>hello 1
|
||||||
|
>hello 2
|
||||||
|
>hello 3
|
||||||
|
```
|
||||||
|
sh-5.2$ /usr/lib/kafka/bin/kafka-console-consumer.sh --topic quickstart-events --from-beginning --bootstrap-server localhost:9092
|
||||||
|
```
|
||||||
|
hello 1
|
||||||
|
hello 2
|
||||||
|
hello 3
|
||||||
|
^CProcessed a total of 3 messages
|
||||||
|
|
||||||
|
|
||||||
16
org/alt/kafka/info.yaml
Normal file
16
org/alt/kafka/info.yaml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
is_versioned: true
|
||||||
|
version_template:
|
||||||
|
- "{{ version }}"
|
||||||
|
source_packages:
|
||||||
|
- kafka
|
||||||
|
annotations:
|
||||||
|
org.opencontainers.image.revision: ''
|
||||||
|
org.opencontainers.image.source: 'https://github.com/apache/kafka'
|
||||||
|
org.opencontainers.image.url: ''
|
||||||
|
org.opencontainers.image.version: ''
|
||||||
|
org.opencontainers.image.title: 'kafka'
|
||||||
|
org.opencontainers.image.description: 'Apache Kafka is a distributed event store and stream-processing platform'
|
||||||
|
org.opencontainers.image.licenses: Apache-2.0
|
||||||
|
org.opencontainers.image.vendor: 'ALT Linux Team'
|
||||||
|
...
|
||||||
4
org/alt/kafka/kafka-entrypoint.sh
Normal file
4
org/alt/kafka/kafka-entrypoint.sh
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh -eux
|
||||||
|
|
||||||
|
nohup /usr/lib/kafka/bin/zookeeper-server-start.sh /etc/kafka/zookeeper.properties &
|
||||||
|
/usr/lib/kafka/bin/kafka-server-start.sh /etc/kafka/server.properties
|
||||||
1
org/alt/kafka/test
Normal file
1
org/alt/kafka/test
Normal file
@@ -0,0 +1 @@
|
|||||||
|
ls -a /usr/lib/kafka/bin/ | grep kafka && /usr/lib/kafka/bin/kafka-topics.sh --version
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: "{{ version }}"
|
version_template:
|
||||||
|
- "{{ version }}"
|
||||||
source_packages:
|
source_packages:
|
||||||
- loki
|
- loki
|
||||||
annotations:
|
annotations:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: "{{ version }}"
|
version_template:
|
||||||
|
- "{{ version }}"
|
||||||
source_packages:
|
source_packages:
|
||||||
- nginx
|
- nginx
|
||||||
- apache2
|
- apache2
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: "{{ version }}"
|
version_template:
|
||||||
|
- "{{ version }}"
|
||||||
source_packages:
|
source_packages:
|
||||||
- node
|
- node
|
||||||
- yarn
|
- yarn
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: "{{ version }}"
|
version_template:
|
||||||
|
- "{{ version }}"
|
||||||
source_packages:
|
source_packages:
|
||||||
- java-21-openjdk
|
- java-21-openjdk
|
||||||
annotations:
|
annotations:
|
||||||
|
|||||||
@@ -13,9 +13,14 @@ LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
|||||||
"php8.2",
|
"php8.2",
|
||||||
"php8.2-xdebug",
|
"php8.2-xdebug",
|
||||||
) }}
|
) }}
|
||||||
{% else %}
|
{% elif branch == 'c10f2' %}
|
||||||
{{ install_packages(
|
{{ install_packages(
|
||||||
"php8.3",
|
"php8.3",
|
||||||
"php8.3-xdebug",
|
"php8.3-xdebug",
|
||||||
) }}
|
) }}
|
||||||
|
{% else %}
|
||||||
|
{{ install_packages(
|
||||||
|
"php8.4",
|
||||||
|
"php8.4-xdebug",
|
||||||
|
) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@@ -1,12 +1,15 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: "{{ version }}"
|
version_template:
|
||||||
|
- "{{ version }}"
|
||||||
source_packages:
|
source_packages:
|
||||||
- >
|
- >
|
||||||
{%- if branch in [ "p10", "c10f1", "c10f2"] -%}
|
{%- if branch in ["p10", "c10f1"] -%}
|
||||||
php8.2
|
php8.2
|
||||||
{%- else -%}
|
{%- elif branch in ["c10f2"] -%}
|
||||||
php8.3
|
php8.3
|
||||||
|
{%- else -%}
|
||||||
|
php8.4
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
annotations:
|
annotations:
|
||||||
org.opencontainers.image.revision: ''
|
org.opencontainers.image.revision: ''
|
||||||
|
|||||||
@@ -8,7 +8,11 @@ LABEL org.opencontainers.image.source="https://github.com/postgres/postgres"
|
|||||||
LABEL org.opencontainers.image.licenses="PostgreSQL"
|
LABEL org.opencontainers.image.licenses="PostgreSQL"
|
||||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
||||||
|
|
||||||
|
{% if branch == 'c10f2' %}
|
||||||
{{ install_packages("postgresql16","postgresql16-server") }}
|
{{ install_packages("postgresql16","postgresql16-server") }}
|
||||||
|
{% else %}
|
||||||
|
{{ install_packages("postgresql17","postgresql17-server") }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
RUN usermod -a -G postgres postgres
|
RUN usermod -a -G postgres postgres
|
||||||
RUN chown -R postgres:postgres /var/lib/pgsql
|
RUN chown -R postgres:postgres /var/lib/pgsql
|
||||||
|
|||||||
@@ -1,8 +1,14 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: "{{ version }}"
|
version_template:
|
||||||
|
- "{{ version }}"
|
||||||
source_packages:
|
source_packages:
|
||||||
- postgresql16
|
- >
|
||||||
|
{%- if branch in ["c10f2"] -%}
|
||||||
|
postgresql16
|
||||||
|
{%- else -%}
|
||||||
|
postgresql17
|
||||||
|
{%- endif -%}
|
||||||
annotations:
|
annotations:
|
||||||
org.opencontainers.image.revision: ''
|
org.opencontainers.image.revision: ''
|
||||||
org.opencontainers.image.source: 'https://github.com/postgres/postgres'
|
org.opencontainers.image.source: 'https://github.com/postgres/postgres'
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: "{{ version }}"
|
version_template:
|
||||||
|
- "{{ version }}"
|
||||||
source_packages:
|
source_packages:
|
||||||
- prometheus-alertmanager
|
- prometheus-alertmanager
|
||||||
annotations:
|
annotations:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: "{{ version }}"
|
version_template:
|
||||||
|
- "{{ version }}"
|
||||||
source_packages:
|
source_packages:
|
||||||
- prometheus-node_exporter
|
- prometheus-node_exporter
|
||||||
annotations:
|
annotations:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: "{{ version }}"
|
version_template:
|
||||||
|
- "{{ version }}"
|
||||||
source_packages:
|
source_packages:
|
||||||
- prometheus
|
- prometheus
|
||||||
annotations:
|
annotations:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: "{{ version }}"
|
version_template:
|
||||||
|
- "{{ version }}"
|
||||||
source_packages:
|
source_packages:
|
||||||
- python3
|
- python3
|
||||||
- python3-module-setuptools
|
- python3-module-setuptools
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: "{{ version }}"
|
version_template:
|
||||||
|
- "{{ version }}"
|
||||||
source_packages:
|
source_packages:
|
||||||
- python
|
- python
|
||||||
- python-module-setuptools
|
- python-module-setuptools
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: "{{ version }}"
|
version_template:
|
||||||
|
- "{{ version }}"
|
||||||
source_packages:
|
source_packages:
|
||||||
- rabbitmq-server
|
- rabbitmq-server
|
||||||
annotations:
|
annotations:
|
||||||
|
|||||||
19
org/alt/redis/Dockerfile.template
Normal file
19
org/alt/redis/Dockerfile.template
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
FROM {{ registry }}{{ branch }}/{{ alt_image }}:latest
|
||||||
|
|
||||||
|
MAINTAINER alt-cloud
|
||||||
|
|
||||||
|
LABEL org.opencontainers.image.title="redis"
|
||||||
|
LABEL org.opencontainers.image.description="Redis is an advanced key-value store"
|
||||||
|
LABEL org.opencontainers.image.source="http://redis.io"
|
||||||
|
LABEL org.opencontainers.image.licenses="BSD-3-Clause AND BSD-2-Clause AND MIT AND BSL-1.0"
|
||||||
|
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
||||||
|
|
||||||
|
{{ install_packages("ca-certificates","redis","redis-cli") }}
|
||||||
|
|
||||||
|
USER _redis:_redis
|
||||||
|
EXPOSE 6379
|
||||||
|
VOLUME ["/var/lib/redis","/var/log/redis"]
|
||||||
|
WORKDIR /var/lib/redis
|
||||||
|
|
||||||
|
ENTRYPOINT [ "/usr/sbin/redis-server" ]
|
||||||
|
CMD [ "/etc/redis/redis.conf" ]
|
||||||
8
org/alt/redis/README.md
Normal file
8
org/alt/redis/README.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# Redis image
|
||||||
|
|
||||||
|
Command for run redis-db server:
|
||||||
|
```
|
||||||
|
podman run --rm -it -v ./redis.conf:/etc/redis/redis.conf -p 6379:6379 <REGISTRY>/<BRANCH>/redis:latest
|
||||||
|
```
|
||||||
|
For testing running server you can run redis.py, if it's working you will see version redis
|
||||||
|
|
||||||
16
org/alt/redis/info.yaml
Normal file
16
org/alt/redis/info.yaml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
is_versioned: true
|
||||||
|
version_template:
|
||||||
|
- "{{ version }}"
|
||||||
|
source_packages:
|
||||||
|
- redis
|
||||||
|
annotations:
|
||||||
|
org.opencontainers.image.revision: ''
|
||||||
|
org.opencontainers.image.source: 'http://redis.io/'
|
||||||
|
org.opencontainers.image.url: ''
|
||||||
|
org.opencontainers.image.version: ''
|
||||||
|
org.opencontainers.image.title: 'redis'
|
||||||
|
org.opencontainers.image.description: 'Redis is an advanced key-value store'
|
||||||
|
org.opencontainers.image.licenses: 'BSD-3-Clause AND BSD-2-Clause AND MIT AND BSL-1.0'
|
||||||
|
org.opencontainers.image.vendor: 'ALT Linux Team'
|
||||||
|
...
|
||||||
22
org/alt/redis/redis.py
Executable file
22
org/alt/redis/redis.py
Executable file
@@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/python3
|
||||||
|
|
||||||
|
import redis
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
r = redis.Redis(host='127.0.0.1', port=6379, db=0, username='test', password='test')
|
||||||
|
|
||||||
|
try:
|
||||||
|
info = r.info()
|
||||||
|
print(info['redis_version'])
|
||||||
|
response = r.ping()
|
||||||
|
if response:
|
||||||
|
print("Подключение успешно!")
|
||||||
|
else:
|
||||||
|
print("Не удалось подключиться к Redis.")
|
||||||
|
except redis.exceptions.RedisError as e:
|
||||||
|
print(f"Ошибка: {e}")
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
|
||||||
1
org/alt/redis/test
Normal file
1
org/alt/redis/test
Normal file
@@ -0,0 +1 @@
|
|||||||
|
redis-cli --version && redis-server --version
|
||||||
5
org/alt/redis/test.redis.conf
Normal file
5
org/alt/redis/test.redis.conf
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
bind 0.0.0.0
|
||||||
|
requirepass test
|
||||||
|
appendonly yes
|
||||||
|
appendfsync everysec
|
||||||
|
user test on -DEBUG +@all ~* >test
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: "{{ version }}"
|
version_template:
|
||||||
|
- "{{ version }}"
|
||||||
source_packages:
|
source_packages:
|
||||||
- docker-registry
|
- docker-registry
|
||||||
annotations:
|
annotations:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: "{{ version }}"
|
version_template:
|
||||||
|
- "{{ version }}"
|
||||||
source_packages:
|
source_packages:
|
||||||
- >
|
- >
|
||||||
{%- if branch in ["p10", "c10f2", "c10f1"] -%}
|
{%- if branch in ["p10", "c10f2", "c10f1"] -%}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: "{{ version }}"
|
version_template:
|
||||||
|
- "{{ version }}"
|
||||||
source_packages:
|
source_packages:
|
||||||
- systemd
|
- systemd
|
||||||
annotations:
|
annotations:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: "{{ version }}"
|
version_template:
|
||||||
|
- "{{ version }}"
|
||||||
source_packages:
|
source_packages:
|
||||||
- trivy
|
- trivy
|
||||||
annotations:
|
annotations:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: "{{ version }}"
|
version_template:
|
||||||
|
- "{{ version }}"
|
||||||
source_packages:
|
source_packages:
|
||||||
- unit
|
- unit
|
||||||
- curl
|
- curl
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: "{{ version }}"
|
version_template:
|
||||||
|
- "{{ version }}"
|
||||||
source_packages:
|
source_packages:
|
||||||
- zot
|
- zot
|
||||||
annotations:
|
annotations:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: v{{ version }}
|
version_template:
|
||||||
|
- v{{ version }}
|
||||||
source_packages:
|
source_packages:
|
||||||
- cert-manager
|
- cert-manager
|
||||||
annotations:
|
annotations:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: v{{ version }}
|
version_template:
|
||||||
|
- v{{ version }}
|
||||||
source_packages:
|
source_packages:
|
||||||
- cert-manager
|
- cert-manager
|
||||||
annotations:
|
annotations:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: v{{ version }}
|
version_template:
|
||||||
|
- v{{ version }}
|
||||||
source_packages:
|
source_packages:
|
||||||
- cert-manager
|
- cert-manager
|
||||||
annotations:
|
annotations:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: v{{ version }}
|
version_template:
|
||||||
|
- v{{ version }}
|
||||||
source_packages:
|
source_packages:
|
||||||
- cert-manager
|
- cert-manager
|
||||||
annotations:
|
annotations:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: v{{ version }}
|
version_template:
|
||||||
|
- v{{ version }}
|
||||||
source_packages:
|
source_packages:
|
||||||
- cert-manager
|
- cert-manager
|
||||||
annotations:
|
annotations:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: v{{ version }}
|
version_template:
|
||||||
|
- v{{ version }}
|
||||||
source_packages:
|
source_packages:
|
||||||
- >
|
- >
|
||||||
{%- set num_version_parts = (version.split('.') | length) -%}
|
{%- set num_version_parts = (version.split('.') | length) -%}
|
||||||
|
|||||||
@@ -10,7 +10,11 @@ LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
|||||||
|
|
||||||
ARG PKG_VERSION
|
ARG PKG_VERSION
|
||||||
|
|
||||||
|
{% if branch == 'p10' %}
|
||||||
|
{{ install_packages("etcd${PKG_VERSION}") }}
|
||||||
|
{% else %}
|
||||||
{{ install_packages("etcd-for-kubernetes${PKG_VERSION}") }}
|
{{ 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
|
RUN ln -s /usr/sbin/etcd /usr/local/bin/etcd && ln -s /usr/bin/etcdctl /usr/local/bin/etcdctl
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,12 @@ version_template:
|
|||||||
- "{{ version }}"
|
- "{{ version }}"
|
||||||
- "{{ version }}-0"
|
- "{{ version }}-0"
|
||||||
source_packages:
|
source_packages:
|
||||||
- etcd-for-kubernetes{{ version }}
|
- >
|
||||||
|
{%- if branch in ["p10"] -%}
|
||||||
|
etcd{{ version }}
|
||||||
|
{%- else -%}
|
||||||
|
etcd-for-kubernetes{{ version }}
|
||||||
|
{%- endif -%}
|
||||||
annotations:
|
annotations:
|
||||||
org.opencontainers.image.revision: ''
|
org.opencontainers.image.revision: ''
|
||||||
org.opencontainers.image.source: 'https://github.com/etcd-io/etcd'
|
org.opencontainers.image.source: 'https://github.com/etcd-io/etcd'
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: v{{ version }}
|
version_template:
|
||||||
|
- v{{ version }}
|
||||||
source_packages:
|
source_packages:
|
||||||
- flannel
|
- flannel
|
||||||
annotations:
|
annotations:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: v{{ version }}
|
version_template:
|
||||||
|
- v{{ version }}
|
||||||
source_packages:
|
source_packages:
|
||||||
- kubernetes{{ version }}
|
- kubernetes{{ version }}
|
||||||
annotations:
|
annotations:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: v{{ version }}
|
version_template:
|
||||||
|
- v{{ version }}
|
||||||
source_packages:
|
source_packages:
|
||||||
- kubernetes{{ version }}
|
- kubernetes{{ version }}
|
||||||
annotations:
|
annotations:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: v{{ version }}
|
version_template:
|
||||||
|
- v{{ version }}
|
||||||
source_packages:
|
source_packages:
|
||||||
- kubernetes{{ version }}
|
- kubernetes{{ version }}
|
||||||
annotations:
|
annotations:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: v{{ version }}
|
version_template:
|
||||||
|
- v{{ version }}
|
||||||
source_packages:
|
source_packages:
|
||||||
- kubernetes{{ version }}
|
- kubernetes{{ version }}
|
||||||
annotations:
|
annotations:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: v{{ version }}
|
version_template:
|
||||||
|
- v{{ version }}
|
||||||
source_packages:
|
source_packages:
|
||||||
- kubernetes{{ version }}
|
- kubernetes{{ version }}
|
||||||
annotations:
|
annotations:
|
||||||
|
|||||||
13
org/k8s/metrics-server/Dockerfile.template
Normal file
13
org/k8s/metrics-server/Dockerfile.template
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
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"
|
||||||
16
org/k8s/metrics-server/info.yaml
Normal file
16
org/k8s/metrics-server/info.yaml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
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
org/k8s/metrics-server/test
Normal file
1
org/k8s/metrics-server/test
Normal file
@@ -0,0 +1 @@
|
|||||||
|
metrics-server --version
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: "{{ version }}"
|
version_template:
|
||||||
|
- "{{ version }}"
|
||||||
source_packages:
|
source_packages:
|
||||||
- kubevirt
|
- kubevirt
|
||||||
annotations:
|
annotations:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: "{{ version }}"
|
version_template:
|
||||||
|
- "{{ version }}"
|
||||||
source_packages:
|
source_packages:
|
||||||
- kubevirt
|
- kubevirt
|
||||||
annotations:
|
annotations:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: "{{ version }}"
|
version_template:
|
||||||
|
- "{{ version }}"
|
||||||
source_packages:
|
source_packages:
|
||||||
- kubevirt
|
- kubevirt
|
||||||
annotations:
|
annotations:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: "{{ version }}"
|
version_template:
|
||||||
|
- "{{ version }}"
|
||||||
source_packages:
|
source_packages:
|
||||||
- kubevirt
|
- kubevirt
|
||||||
annotations:
|
annotations:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: "{{ version }}"
|
version_template:
|
||||||
|
- "{{ version }}"
|
||||||
source_packages:
|
source_packages:
|
||||||
- kubevirt
|
- kubevirt
|
||||||
annotations:
|
annotations:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: "{{ version }}"
|
version_template:
|
||||||
|
- "{{ version }}"
|
||||||
source_packages:
|
source_packages:
|
||||||
- kubevirt
|
- kubevirt
|
||||||
annotations:
|
annotations:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
is_versioned: true
|
is_versioned: true
|
||||||
version_template: "{{ version }}"
|
version_template:
|
||||||
|
- "{{ version }}"
|
||||||
source_packages:
|
source_packages:
|
||||||
- kubevirt
|
- kubevirt
|
||||||
annotations:
|
annotations:
|
||||||
|
|||||||
Reference in New Issue
Block a user