Compare commits
1 Commits
master
...
fix_vers_t
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
172c934c3c |
@@ -67,7 +67,7 @@ def main() -> None:
|
||||
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)
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
{
|
||||
"kube-version": "1.27",
|
||||
"coredns": "0",
|
||||
"etcd": "3.5.15"
|
||||
"etcd": "3.5.15"
|
||||
},
|
||||
{
|
||||
"kube-version": "1.28",
|
||||
"coredns": "0",
|
||||
"etcd": "3.5.16",
|
||||
"etcd": "3.5.16",
|
||||
"latest": true
|
||||
}
|
||||
]
|
||||
@@ -22,30 +22,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 +55,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,40 @@ 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 ||:
|
||||
rm -rf $IM.log ||:
|
||||
else
|
||||
haserr=true
|
||||
haserr=true
|
||||
fi
|
||||
|
||||
echo "podman rmi --all"
|
||||
podman rmi --all
|
||||
|
||||
if $haserr
|
||||
then
|
||||
then
|
||||
if [ -f $IM.log ]
|
||||
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"
|
||||
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
|
||||
|
||||
@@ -82,9 +82,9 @@ jobs:
|
||||
#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
|
||||
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
|
||||
${{ gitea.workspace }}/build.py $build_args $arches
|
||||
env:
|
||||
ORG: ${{ inputs.group }}
|
||||
BR: ${{ inputs.branch }}
|
||||
|
||||
@@ -88,3 +88,4 @@ jobs:
|
||||
bot_token: ${{ secrets.TELEGRAM_BOT }}
|
||||
channel_id: ${{ secrets.TELEGRAM_CHANNEL }}
|
||||
message: "Building of images org/k8s for branch ${{ inputs.branch }} is failed"
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ on:
|
||||
- p11
|
||||
- c10f2
|
||||
images:
|
||||
description: 'Json containing images with version to build it'
|
||||
description: 'Json containing images with version to build it'
|
||||
required: true
|
||||
type: string
|
||||
|
||||
@@ -37,15 +37,15 @@ jobs:
|
||||
GU: ${{ gitea.server_url }}
|
||||
GR: ${{ gitea.repository }}
|
||||
- name: Check inputs
|
||||
run: |
|
||||
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 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 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
|
||||
@@ -57,7 +57,7 @@ jobs:
|
||||
declare -A versions
|
||||
|
||||
ims=$(echo $IMS | jq -c -r '.[]')
|
||||
for im in ${ims[@]}; do
|
||||
for im in ${ims[@]}; do
|
||||
image=$(echo $im | jq -r .name)
|
||||
version=$(echo $im | jq -r .version)
|
||||
images+=("$image")
|
||||
@@ -97,7 +97,7 @@ jobs:
|
||||
- name: Set repo for c10f2 (Temporary)
|
||||
if: ${{ contains(github.ref_name, 'c10f2') }}
|
||||
run: |
|
||||
echo "event tag=${{ github.ref_name }}"
|
||||
echo "event tag=${{ github.ref_name }}"
|
||||
echo "10.4.0.3 update.altsp.su" >> /etc/hosts
|
||||
echo "cat /etc/hosts"
|
||||
cat /etc/hosts
|
||||
@@ -111,30 +111,32 @@ jobs:
|
||||
- name: Run building script
|
||||
id: build-script
|
||||
run: |
|
||||
if [[ "$BRANCH" == "sisyphus" ]]; then arches="amd64 386 arm64 loong64"; else arches="amd64 386 arm64"; fi
|
||||
if [[ "$BRANCH" == "sisyphus" ]]; then arches="--arches amd64 386 arm64 loong64"; else arches="--arches amd64 386 arm64"; fi
|
||||
echo "${{ gitea.workspace }}/build.py \
|
||||
--log-level debug \
|
||||
--skip-stages push \
|
||||
--branch $BRANCH \
|
||||
--registry $BUILD_URL \
|
||||
--arches $arches \
|
||||
-i $IMAGES \
|
||||
--package-versions \"$PACKAGE_VERSIONS\""
|
||||
|
||||
|
||||
${{ gitea.workspace }}/build.py \
|
||||
--log-level debug \
|
||||
--skip-stages push \
|
||||
--branch $BRANCH \
|
||||
--registry $BUILD_URL \
|
||||
--arches $arches \
|
||||
-i $IMAGES \
|
||||
--package-versions "$PACKAGE_VERSIONS"
|
||||
--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 ; \
|
||||
echo "image: $image; latest version-tag: $latest" ; \
|
||||
echo "skopeo copy -a docker://$BUILD_URL/$BRANCH/$im:$latest docker://BUILD_URL/$BRANCH/$im:latest"; \
|
||||
skopeo copy -a docker://$BUILD_URL/$BRANCH/$im:$latest docker://BUILD_URL/$BRANCH/$im:latest ; \
|
||||
done
|
||||
echo "finish update latest tag"
|
||||
env:
|
||||
|
||||
@@ -35,7 +35,7 @@ jobs:
|
||||
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 }}"
|
||||
@@ -62,7 +62,7 @@ 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 }}
|
||||
@@ -90,7 +90,7 @@ jobs:
|
||||
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
|
||||
${{ gitea.workspace }}/build.py -i $IM -b $BR $arches --latest $BR --log-level debug --registry $BUILD_URL $k8sarg
|
||||
env:
|
||||
IM: ${{ inputs.image }}
|
||||
VER: ${{ inputs.version }}
|
||||
@@ -114,7 +114,7 @@ jobs:
|
||||
- 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
|
||||
apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah curl golang
|
||||
- name: Run test
|
||||
id: test-script
|
||||
if: ${{ needs.build-process.outputs.test != '' }}
|
||||
@@ -123,9 +123,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 }}
|
||||
IM: ${{ inputs.image }}
|
||||
BR: ${{ inputs.branch }}
|
||||
URL: ${{ needs.build-process.outputs.url }}
|
||||
URL: ${{ needs.build-process.outputs.url }}
|
||||
REPO: ${{ needs.build-process.outputs.repo }}
|
||||
TEST: ${{ needs.build-process.outputs.test }}
|
||||
- name: Run special test
|
||||
@@ -141,3 +141,4 @@ jobs:
|
||||
BR: ${{ inputs.branch }}
|
||||
URL: ${{ needs.build-process.outputs.url }}
|
||||
REPO: ${{ needs.build-process.outputs.repo }}
|
||||
|
||||
|
||||
2
build.py
2
build.py
@@ -799,7 +799,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 != '':
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -14,9 +14,9 @@ LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
||||
"php8.2-xdebug",
|
||||
) }}
|
||||
{% elif branch == 'c10f2' %}
|
||||
{{ install_packages(
|
||||
"php8.3",
|
||||
"php8.3-xdebug",
|
||||
{{ install_packages(
|
||||
"php8.3",
|
||||
"php8.3-xdebug",
|
||||
) }}
|
||||
{% else %}
|
||||
{{ install_packages(
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
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"
|
||||
|
||||
@@ -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,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
|
||||
|
||||
@@ -4,7 +4,7 @@ version_template:
|
||||
- "v{{ version }}"
|
||||
- "{{ version }}"
|
||||
- "{{ version }}-0"
|
||||
source_packages:
|
||||
source_packages:
|
||||
- >
|
||||
{%- if branch in ["p10"] -%}
|
||||
etcd{{ version }}
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user