5 Commits
test ... master

Author SHA1 Message Date
5d7af66514 + 2024-07-17 09:34:06 +05:00
55d9707d24 fix
All checks were successful
Building alt images / build_process (push) Successful in 10m10s
Building alt images / test_process (push) Has been skipped
Building alt images / finish_process (push) Has been skipped
2024-04-10 17:59:24 +03:00
4250455f66 add notification, fix process
All checks were successful
Building alt images / Building_process (push) Successful in 9m42s
2024-04-09 18:50:23 +03:00
d54807cce9 add workflow
Some checks failed
Building alt images / Building_process (push) Failing after 21m46s
2024-04-05 16:29:18 +03:00
2b7e1fec89 change registry url 2024-03-27 12:45:13 +03:00
129 changed files with 425 additions and 1003 deletions

View File

@ -1,15 +0,0 @@
name: Run tests wf
on:
registry_package:
types: [published, updated]
jobs:
build-process:
runs-on: alt-sisyphus
steps:
- name: Check event
run: |
echo "name package = ${{ github.event.registry_package.name }}"
echo "path package = ${{ github.event.registry_package.html_url }}"
echo "version package = ${{ github.event.registry_package.package_version.version }}"
echo "version package = ${{ github.event.registry_package.package_version.container_metadata.tag.name }}"

View File

@ -1,83 +0,0 @@
#!/bin/bash
#$1 - ${{ needs.build-process.outputs.branch }}
#$2 - ${{ needs.build-process.outputs.org }}
#$3 - ${{ needs.build-process.outputs.url }}
#$4 - ${{ needs.build-process.outputs.repo }}
#$5 - ${{ gitea.workspace }}
BR=${1:-"p10"}
ORG=${2:-"base"}
URL=${3:-"gitea.basealt.ru"}
REPO=${4:-"alt"}
WS=${5:-"image-forge"}
wspath="/workspace/$REPO/$WS"
errors=''
haserr=false
for IM in $(ls $wspath/org/$ORG/ | xargs)
do
echo "image=$IM"
imgpath="$REPO/$BR/$ORG/$IM:$BR"
command=''
testpath="$wspath/org/$ORG/$IM/test.yaml"
if test -f $testpath
then
entrypoint=''
testep=$(cat $testpath | yq '.entrypoint' -r 2> /dev/null)
if [[ $testep != '' ]]; then entrypoint="--entrypoint=\"$testep\""; fi
testcom=$(cat $testpath | yq '.command' -r 2> /dev/null)
if [[ $testcom != '' ]]
then command="podman run --rm $entrypoint $URL/$imgpath -c \"$testcom\""
else echo "test command is not found"
fi
else echo "test file is not found"
fi
echo "result test command: $command"
eval $command 2>$IM.log || haserr=true
if [ "$haserr" = false ]
then
echo "start change tag for $IM"
if [[ $ORG != 'base' ]]
then
package=$(podman images --filter reference=$URL/$imgpath --format='{{ json .Labels }}' | jq '."org.opencontainers.image.title"' -r 2> /dev/null)
if [[ $package != '' ]]
then
tag=$(podman run --rm --entrypoint="/bin/sh" $URL/$imgpath -c "rpm -qa --qf \"%{VERSION}\n\" $package" 2> /dev/null)
else
echo "not found package name in images labels"
fi
else tag=$(date +"%Y%m%d")
fi
if [[ $tag != '' ]]
then
echo "newtag=$tag"
newimgpath="$REPO/$BR/$ORG/$IM:$tag"
skopeo copy -a docker://$URL/$imgpath docker://$URL/$newimgpath
#skopeo delete docker://$URL/$imgpath
echo "tag is updated"
else echo "new tag is empty and is not sent to repository"
fi
else
if [[ $(cat $IM.log) != '' ]]
then errors="TEST ERROR OF IMAGE $IM: $(cat $IM.log); $errors"
else errors="TEST ERROR OF IMAGE $IM: test returned empty error, but exit status was nozero; $errors"
fi
fi
echo "podman rmi --all"
podman rmi --all
haserr=false
done
echo "$errors"
if [[ $errors != '' ]]
then haserr=true
fi
echo "ERR=$haserr" > haserr.log
echo $errors > errors.log

136
.gitea/workflows/wf.yaml Normal file
View File

@ -0,0 +1,136 @@
name: Building alt images
on:
push:
tags:
- '*_*/*'
jobs:
build_process:
runs-on: alt-latest
outputs:
branch: ${{ env.BRANCH }}
image: ${{ env.IMAGE }}
url: ${{ env.URL }}
repo: ${{ env.REPO }}
buildres: ${{ steps.build_script.outcome }}
test: ${{ env.TEST }}
steps:
- name: Check workspace
run: |
repourl=$(echo $GU | cut -d '/' -f 3)
echo "URL=$repourl" >> ${GITHUB_ENV}
reponame=$(echo $GR | cut -d '/' -f 1)
echo "REPO=$reponame" >> ${GITHUB_ENV}
env:
GU: ${{ gitea.server_url }}
GR: ${{ gitea.repository }}
- name: Update apt
run: |
echo "apt-get update -y && apt-get install -y apt rpm"
apt-get update -y && apt-get install -y apt rpm
- name: Install requires
run: |
echo "apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah jq"
apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah jq
echo "apt-get install -y qemu-user-static-binfmt-aarch64 qemu-user-static-binfmt-arm qemu-user-static-binfmt-ppc"
apt-get install -y qemu-user-static-binfmt-aarch64 qemu-user-static-binfmt-arm qemu-user-static-binfmt-ppc
- name: Check out current repo
uses: https://gitea.com/actions/checkout@v4
- 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: 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"
- name: Get test for image
run: |
testscript=$(cat ${{ gitea.workspace }}/org/$IM/test)
echo "TEST=$testscript">> ${GITHUB_ENV}
env:
IM: ${{ env.IMAGE }}
BR: ${{ env.BRANCH }}
- name: Run building script
id: build_script
run: |
echo "build.py -i $IM -b $BR"
if [[ $BR == 'sisyphus' ]]; then ${{ gitea.workspace }}/build.py -i $IM -b $BR --skip-arches arm; else ${{ gitea.workspace }}/build.py -i $IM -b $BR; fi
env:
IM: ${{ env.IMAGE }}
BR: ${{ env.BRANCH }}
continue-on-error: true
test_process:
if: ${{ jobs.build_process.env.BUILDRES == 'success' }}
needs: build_process
runs-on: alt-latest
outputs:
testres: ${{ steps.test_script.outcome }}
steps:
- name: Update apt
run: |
echo "apt-get update -y && apt-get install -y apt rpm"
apt-get update -y && apt-get install -y apt rpm
- name: Install requires
run: |
echo "apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah"
apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah
echo "apt-get install -y qemu-user-static-binfmt-aarch64 qemu-user-static-binfmt-arm qemu-user-static-binfmt-ppc"
apt-get install -y qemu-user-static-binfmt-aarch64 qemu-user-static-binfmt-arm qemu-user-static-binfmt-ppc
- name: Run test
id: test_script
continue-on-error: true
uses: https://gitea.basealt.ru/actions/podman-run-action@v2
with:
image: ${{ needs.build_process.outputs.url }}/${{ needs.build_process.outputs.repo }}/${{ needs.build_process.outputs.image }}:${{ needs.build_process.outputs.branch }}
options: --rm
run: ${{ needs.build_process.outputs.test }}
finish_process:
needs: [ build_process, test_process ]
runs-on: alt-latest
steps:
- name: Update apt
run: |
echo "apt-get update -y && apt-get install -y apt rpm"
apt-get update -y && apt-get install -y apt rpm
- name: Update apt
run: |
echo "apt-get install -y curl jq"
apt-get install -y curl jq
- name: Delete event tag
run: |
tagname=$(echo $EV | jq '.ref' -r | sed "s/refs\/tags\///g")
curl -X 'DELETE' "https://$URL/api/v1/repos/$REPO/gitea-image-forge/tags/$tagname?token=$T" -H 'accept: application/json' -s
echo "tag $BR_$IM is deleted"
env:
T: ${{ secrets.TOKEN }}
URL: ${{ needs.build_process.outputs.url }}
REPO: ${{ needs.build_process.outputs.repo }}
IM: ${{ needs.build_process.outputs.image}}
BR: ${{ needs.build_process.outputs.branch }}
EV: ${{ toJson(gitea.event) }}
continue-on-error: true
- name: Send comment to issue for notification
run: |
issueid=$(curl -X 'GET' "https://$URL/api/v1/repos/$REPO/gitea-image-forge/issues?state=all&type=issues&page=1&limit=1&token=$T" -H 'accept: application/json' -s | jq '.[].number' -r)
if [[ ${ needs.build_process.outputs.buildres }} = "success" ]] && [[ ${{ needs.test_process.outputs.testres }} = "success" ]]; then body="Building of image $IM for branch $BR finished success"; else body="Testing of image $IM for branch $BR is failed"; fi
if [[ ${{ needs.build_process.outputs.buildres }} != 'success' ]]; then body="Building of image $IM for branch $BR is failed"; fi
curl -X 'POST' "https://$URL/api/v1/repos/$REPO/gitea-image-forge/issues/$issueid/comments?token=$T" -H 'accept: application/json' -H 'Content-Type: application/json' -d "{ \"body\": \"$body\" }" -s
echo "notification is sent"
env:
T: ${{ secrets.TOKEN }}
URL: ${{ needs.build_process.outputs.url }}
REPO: ${{ needs.build_process.outputs.repo }}
IM: ${{ needs.build_process.outputs.image}}
BR: ${{ needs.build_process.outputs.image}}

View File

@ -1,195 +0,0 @@
name: Full building alt images
on:
push:
tags:
- '*_*'
tags-ignore:
- '*_k8s'
- 'sisyphus_*'
jobs:
build-process:
runs-on: alt-p10
outputs:
branch: ${{ env.BRANCH }}
org: ${{ env.ORG }}
url: ${{ env.URL }}
repo: ${{ env.REPO }}
ws: ${{ env.WS }}
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
repows=$(echo $GR | cut -d '/' -f 2)
echo "WS=$repows" >> ${GITHUB_ENV}
echo $repows
env:
GU: ${{ gitea.server_url }}
GR: ${{ gitea.repository }}
- name: Set repo for c10f2 (Temporary)
if: ${{ contains(github.ref_name, 'c10f2') }}
run: |
echo "event tag=${{ github.ref_name }}"
echo "10.4.0.3 update.altsp.su" >> /etc/hosts
echo "cat /etc/hosts"
cat /etc/hosts
- name: Update apt
uses: actions/init-alt-env@v1
- name: Install requires
run: |
echo "apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah jq curl"
apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah jq curl
echo "apt-get install -y qemu-user-static-binfmt-aarch64 qemu-user-static-binfmt-arm qemu-user-static-binfmt-ppc"
apt-get install -y qemu-user-static-binfmt-aarch64 qemu-user-static-binfmt-arm qemu-user-static-binfmt-ppc
- name: Check out current repo
uses: actions/checkout@v4
- name: Parse target branch and tag from events context, save to env
env:
EV: ${{ toJson(gitea.event) }}
run: |
echo $EV | jq '.ref' -r | sed "s/refs\/tags\//BRANCH=/g" | cut -d '_' -f 1
echo $EV | jq '.ref' -r | sed "s/refs\/tags\//BRANCH=/g" | cut -d '_' -f 1 >> ${GITHUB_ENV}
org=$(echo $EV | jq '.ref' -r | sed 's/refs\/tags\///g' | cut -d '_' -f 2)
echo "ORG=$org" >> ${GITHUB_ENV}
echo "ORG=$org"
- name: Login podman gitea
run: |
echo "podman login ${{ env.URL }}"
podman login --username $P_USER --password $P_PASS ${{ env.URL }}
env:
P_USER: ${{ secrets.PODMAN_USER }}
P_PASS: ${{ secrets.PODMAN_PASS }}
- name: Run standart building script
id: build-script
run: |
build_args="-b $BR -o $ORG --skip-images base/distroless-devel --registry $URL/$REPO/$BR -a amd64"
echo "build.py $build_args"
${{ gitea.workspace }}/build.py $build_args
env:
ORG: ${{ env.ORG }}
BR: ${{ env.BRANCH }}
REPO: ${{ env.REPO }}
continue-on-error: true
- name: Send notification if build crashed
if: ${{ steps.build-script.outcome != 'success' }}
run: |
issueid=1
body="Building images finish with some errors."
curl -X 'POST' "$URL/api/v1/repos/$REPO/$GWS/issues/$issueid/comments?token=$T" -H 'accept: application/json' -H 'Content-Type: application/json' -d "{ \"body\": \"$body\" }" -s
echo "notification about test error is sent to issue $issueid"
env:
T: ${{ secrets.TOKEN }}
BR: ${{ env.BRANCH }}
URL: ${{ gitea.server_url }}
REPO: ${{ env.REPO }}
GWS: ${{ env.WS }}
- name: Delete event tag
run: |
tagname=$(echo $EV | jq '.ref' -r | sed "s/refs\/tags\///g")
curl -X 'DELETE' "$URL/api/v1/repos/$REPO/$GWS/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 }}
GWS: ${{ env.WS }}
EV: ${{ toJson(gitea.event) }}
test-process:
needs: build-process
if: ${{ needs.build-process.outputs.buildres == 'success' }}
runs-on: alt-p10
outputs:
testres: ${{ steps.test-script.outcome }}
steps:
- name: Update apt
uses: actions/init-alt-env@v1
- name: Install requires
run: |
echo "apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah skopeo jq yq curl"
apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah skopeo jq yq curl
- name: Check out current repo
uses: https://gitea.com/actions/checkout@v4
- name: Login podman gitea
run: |
echo "podman login ${{ needs.build-process.outputs.url }}"
podman login --username $P_USER --password $P_PASS ${{ needs.build-process.outputs.url }}
env:
P_USER: ${{ secrets.PODMAN_USER }}
P_PASS: ${{ secrets.PODMAN_PASS }}
- name: Test images and update tags
id: test-script
continue-on-error: true
run: |
$WS/.gitea/workflows/testscript $BR $ORG $URL $REPO $GWS
cat haserr.log >> ${GITHUB_ENV}
echo "test process finished"
env:
BR: ${{ needs.build-process.outputs.branch }}
ORG: ${{ needs.build-process.outputs.org }}
URL: ${{ needs.build-process.outputs.url }}
REPO: ${{ needs.build-process.outputs.repo }}
WS: ${{ gitea.workspace }}
GWS: ${{ needs.build-process.outputs.ws }}
- name: Send notification if test crashed
if: ${{ env.ERR == 'true' || steps.test-script.outcome == 'failure' }}
run: |
issueid=1
d errors=$(cat errors.log)
body="Testing images finish with some errors. $errors"
curl -X 'POST' "$URL/api/v1/repos/$REPO/gitea-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 }}
push-process:
needs: [build-process, test-process]
if: ${{ needs.test-process.outputs.testres == 'success' && secrets.PUSH_REPO != '' }}
runs-on: alt-p10
steps:
- name: Update apt
uses: actions/init-alt-env@v1
- name: Install reqier-s
run: |
echo "apt-get install -y skopeo jq"
apt-get install -y skopeo jq
- name: Get branch and tags to push
run: |
echo "PUSH_BRANCH=$BR" >> ${GITHUB_ENV}
images=$()
echo "PUSH_IMAGES=$images" >> ${GITHUB_ENV}
if [[ $BR == 'p10' ]]; then echo "PUSH_TAGS=latest" >> ${GITHUB_ENV}; fi
env:
BR: ${{ needs.build-process.outputs.branch }}
- name: Get branch (only for c*N branches)
if: ${{ contains(github.ref_name, 'c10f2') }}
run: |
newbr=$(skopeo list-tags docker://$URL/$REPO/$BR/base/alt | jq '.Tags.[]' -r 2> /dev/null | sort | grep -m 1 c 2> /dev/null)
echo "PUSH_BRANCH=$newbr" >> ${GITHUB_ENV}
env:
BR: ${{ needs.build-process.outputs.branch }}
ORG: ${{ needs.build-process.outputs.org }}
URL: ${{ needs.build-process.outputs.url }}
REPO: ${{ needs.build-process.outputs.repo }}
- name: Run skopeo action
if: ${{ env.PUSH_BRANCH == needs.build-process.outputs.branch }}
uses: actions/skopeo-copy@v1
with:
source: ${{ needs.build-process.outputs.url }/${{ needs.build-process.outputs.repo }}/${{ needs.build-process.outputs.branch }}/${{ needs.build-process.outputs.org }}
source-proto: docker://
dest: ${{ secrets.PUSH_REPO }}/${{ needs.build-process.outputs.branch }}
dest-proto: docker://
dest-login: ${{ secrets.PUSH_USER }}
dest-pass: ${{ secrets.PUSH_PASS }}
tags: ${{ env.PUSH_TAGS }}
last-ver-tags: true
images: ${{ env.PUSH_IMAGES }}
args: -a

View File

@ -1,126 +0,0 @@
name: Full building alt images
on:
push:
tags:
- 'sisyphus_*'
jobs:
build-process:
runs-on: alt-sisyphus
outputs:
branch: ${{ env.BRANCH }}
org: ${{ env.ORG }}
url: ${{ env.URL }}
repo: ${{ env.REPO }}
buildres: ${{ steps.build-script.outcome }}
steps:
- name: Check workspace
run: |
repourl=$(echo $GU | cut -d '/' -f 3)
echo "URL=$repourl" >> ${GITHUB_ENV}
echo $repourl
reponame=$(echo $GR | cut -d '/' -f 1)
echo "REPO=$reponame" >> ${GITHUB_ENV}
echo $reponame
env:
GU: ${{ gitea.server_url }}
GR: ${{ gitea.repository }}
- name: Update apt
uses: actions/init-alt-env@v1
- name: Install requires
run: |
echo "apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah jq curl"
apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah jq curl
echo "apt-get install -y qemu-user-static-binfmt-aarch64 qemu-user-static-binfmt-arm qemu-user-static-binfmt-ppc"
apt-get install -y qemu-user-static-binfmt-aarch64 qemu-user-static-binfmt-arm qemu-user-static-binfmt-ppc
- name: Check out current repo
uses: actions/checkout@v4
- name: Parse target branch and tag from events context, save to env
env:
EV: ${{ toJson(gitea.event) }}
run: |
echo $EV | jq '.ref' -r | sed "s/refs\/tags\//BRANCH=/g" | cut -d '_' -f 1
echo $EV | jq '.ref' -r | sed "s/refs\/tags\//BRANCH=/g" | cut -d '_' -f 1 >> ${GITHUB_ENV}
org=$(echo $EV | jq '.ref' -r | sed 's/refs\/tags\///g' | cut -d '_' -f 2)
echo "ORG=$org" >> ${GITHUB_ENV}
echo "ORG=$org"
- name: Login podman gitea
run: |
echo "podman login ${{ env.URL }}"
podman login --username $P_USER --password $P_PASS ${{ env.URL }}
env:
P_USER: ${{ secrets.PODMAN_USER }}
P_PASS: ${{ secrets.PODMAN_PASS }}
- name: Run building script
id: build-script
run: |
build_args="-b $BR -o $ORG --skip-images alt/distroless-devel"
if [[ $ORG == 'k8s' ]]; then build_args="$build_args --tags tags.toml --overwrite-organization $ORG-$BR --skip-images k8s/kube-apiserver k8s/kube-controller-manager k8s/kube-proxy k8s/kube-scheduler"; fi
echo "build.py $build_args"
${{ gitea.workspace }}/build.py $build_args
env:
ORG: ${{ env.ORG }}
BR: ${{ env.BRANCH }}
continue-on-error: true
- name: Send notification if build crashed
if: ${{ steps.build-script.outcome != 'success' }}
run: |
issueid=1
body="Building images finish with some errors."
curl -X 'POST' "$URL/api/v1/repos/$REPO/image-forge/issues/$issueid/comments?token=$T" -H 'accept: application/json' -H 'Content-Type: application/json' -d "{ \"body\": \"$body\" }" -s
echo "notification about test error is sent to issue $issueid"
env:
T: ${{ secrets.TOKEN }}
BR: ${{ env.BRANCH }}
URL: ${{ gitea.server_url }}
REPO: ${{ env.REPO }}
- name: Delete event tag
run: |
tagname=$(echo $EV | jq '.ref' -r | sed "s/refs\/tags\///g")
curl -X 'DELETE' "$URL/api/v1/repos/$REPO/image-forge/tags/$tagname?token=$T" -H 'accept: application/json' -s
echo "tag $tagname is deleted"
env:
T: ${{ secrets.TOKEN }}
BR: ${{ env.BRANCH }}
URL: ${{ gitea.server_url }}
REPO: ${{ env.REPO }}
EV: ${{ toJson(gitea.event) }}
test-process:
needs: build-process
if: ${{ needs.build-process.outputs.buildres == 'success' }}
runs-on: alt-sisyphus
steps:
- name: Update apt
uses: actions/init-alt-env@v1
- name: Install requires
run: |
echo "apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah jq curl"
apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah jq curl
- name: Check out current repo
uses: https://gitea.com/actions/checkout@v4
- name: Test
id: test-script
continue-on-error: true
run: |
$WS/.gitea/workflows/testscript $BR $ORG $URL $REPO $WS
cat haserr.log >> ${GITHUB_ENV}
echo "test process finished"
env:
BR: ${{ needs.build-process.outputs.branch }}
ORG: ${{ needs.build-process.outputs.org }}
URL: ${{ needs.build-process.outputs.url }}
REPO: ${{ needs.build-process.outputs.repo }}
WS: ${{ gitea.workspace }}
- name: Send notification if test crashed
if: ${{ env.ERR == 'true' || steps.test-script.outcome == 'failure' }}
run: |
issueid=1
errors=$(cat errors.log)
body="Testing images finish with some errors. $errors"
curl -X 'POST' "$URL/api/v1/repos/$REPO/image-forge/issues/$issueid/comments?token=$T" -H 'accept: application/json' -H 'Content-Type: application/json' -d "{ \"body\": \"$body\" }" -s
echo "notification about test error is sent to issue $issueid"
env:
T: ${{ secrets.TOKEN }}
BR: ${{ needs.build-process.outputs.branch }}
URL: ${{ gitea.server_url }}
REPO: ${{ needs.build-process.outputs.repo }}

View File

@ -1,21 +0,0 @@
name: 'Reusable test job'
description: 'Test for images'
outputs:
result:
description: "Result of test (success|failure)"
value: ${{ jobs.example_job.outputs.output1 }}
inputs:
image: string
branch: string
url: string
repo: string
runs:
using: 'composite'
steps:
- name: Install requires
run: |
echo "apt-get install -y skopeo jq"
apt-get install -y skopeo jq
- name: Scopeo copy

View File

@ -0,0 +1,23 @@
name: Test_wf
on:
push:
tags:
- '*'
jobs:
Test-job:
runs-on: alt-latest
env:
TEST: "gitea --version"
steps:
- name: Update apt
run: apt-get update -y && apt-get install -y apt rpm
- name: Install reqs
run: apt-get install -y podman buildah
- name: Podman run
uses: https://gitea.basealt.ru/actions/podman-run-action@v2
with:
image: gitea.basealt.ru/images_repo/alt/gitea
options: --rm
run: ${{ env.TEST }}
- run: echo "This job's status is ${{ job.status }}"

View File

@ -32,3 +32,5 @@ On x86_64 machine using p10 branch you need:
- `qemu-user-static-binfmt-aarch64` to build for arm64 architecture
- `qemu-user-static-binfmt-arm` to build for arm architecture
- `qemu-user-static-binfmt-ppc` to build for ppc64le architecture

View File

@ -225,19 +225,19 @@ class DockerBuilder:
self,
template: str,
organization: str,
install_packages=None,
install_pakages=None,
**kwargs,
) -> str:
if self.registry:
registry = self.registry.rstrip("/") + "/"
alt_image = "base/alt"
alt_image = "alt/alt"
else:
registry = ""
alt_image = "alt"
rendered = Template(template).render(
alt_image=alt_image,
branch=self.branch,
install_packages=install_packages,
install_pakages=install_pakages,
organization=organization,
registry=registry,
**kwargs,
@ -247,7 +247,7 @@ class DockerBuilder:
@forall_images(consume_result=True)
def render_dockerfiles(self, **kwargs):
def install_packages(*names):
def install_pakages(*names):
tasks = self.tasks.get(self.branch, kwargs["image"])
linux32 = '$([ "$(rpm --eval %_host_cpu)" = i586 ] && echo linux32)'
if tasks:
@ -273,7 +273,7 @@ class DockerBuilder:
rendered = self.render_template(
dockerfile_template.read_text(),
self.overwrite_organization,
install_packages,
install_pakages,
)
kwargs["dockerfile"].write_text(rendered + "\n")
@ -307,7 +307,7 @@ class DockerBuilder:
f"{from_image['organization']}/{from_image['name']}"
)
elif distrolessfile.exists():
requires.add("base/distroless-builder")
requires.add("alt/distroless-builder")
raw_from = self.distrolesses[canonical_name].raw_from
from_ = self.render_template(raw_from, self.organization)
if match := re.match(self.image_re, from_):
@ -345,7 +345,7 @@ class DockerBuilder:
def distroless_build(self, image: Image, arches):
def distroless_build_arch(arch, manifest):
distroless_builder = self.render_full_tag(
Image("base/distroless-builder"), self.branch
Image("alt/distroless-builder"), self.branch
)
distroless = self.distrolesses[image.canonical_name]
distroless.render_arch_branch(arch, self.branch)
@ -638,8 +638,8 @@ class ImagesInfo:
def parse_args():
stages = ["build", "remove_dockerfiles", "render_dockerfiles", "push"]
arches = ["amd64", "386", "arm64"]
branches = ["p10", "sisyphus", "c10f1", "c10f2"]
arches = ["amd64", "386", "arm64", "arm", "ppc64le"]
branches = ["p9", "p10", "sisyphus"]
organizations = list(ORG_DIR.iterdir())
images = [f"{o.name}/{i.name}" for o in organizations for i in o.iterdir()]
organizations = [o.name for o in organizations]
@ -654,8 +654,7 @@ def parse_args():
nargs="+",
default=images,
choices=images,
metavar="IMAGE_NAME",
help="list of images to build",
help="list of images",
)
images_group.add_argument(
"-o",
@ -665,18 +664,10 @@ def parse_args():
choices=organizations,
help="build all images from these organizations",
)
parser.add_argument(
"--skip-images",
nargs="+",
default=[],
choices=images,
metavar="IMAGE_NAME",
help="list of images to skip",
)
parser.add_argument(
"-r",
"--registry",
default="gitea.basealt.ru",
default="gitea.basealt.ru/images_repo",
)
parser.add_argument(
"--overwrite-organization",
@ -705,20 +696,27 @@ def parse_args():
parser.add_argument(
"--sign",
)
parser.add_argument(
"--skip-images",
nargs="+",
default=[],
choices=images,
help="list of skipping images",
)
parser.add_argument(
"-a",
"--arches",
nargs="+",
default=arches,
choices=arches,
help="build images for these architectures",
help="list of arches",
)
parser.add_argument(
"--skip-arches",
nargs="+",
default=[],
choices=arches,
help="list of architectures to skip",
help="list of skipping arches",
)
parser.add_argument(
"-b",
@ -726,28 +724,28 @@ def parse_args():
nargs="+",
default=branches,
choices=branches,
help="build images for these branches",
help="list of branches",
)
parser.add_argument(
"--skip-branches",
nargs="+",
default=[],
choices=branches,
help="list of branches to skip",
help="list of skipping branches",
)
parser.add_argument(
"--stages",
nargs="+",
default=stages,
choices=stages,
help="list of stages to go through",
help="list of stages",
)
parser.add_argument(
"--skip-stages",
nargs="+",
default=[],
choices=stages,
help="list of stages to skip",
help="list of skipping stages",
)
args = parser.parse_args()

View File

@ -0,0 +1,9 @@
FROM {{ registry }}{{ alt_image }}:{{ branch }}
MAINTAINER alt-cloud
{{ install_pakages("apache2") }}
EXPOSE 80
CMD ["/usr/sbin/httpd2", "-D", "NO_DETACH", "-k", "start"]

1
org/alt/apache2/test Normal file
View File

@ -0,0 +1 @@
apachectl -v

View File

@ -2,6 +2,6 @@ FROM {{ registry }}{{ alt_image }}:{{ branch }}
MAINTAINER alt-cloud
{{ install_packages("glibc-gconv-modules", "glibc-locales", "tzdata") }}
{{ install_pakages("glibc-gconv-modules", "glibc-locales", "tzdata") }}
CMD ["bash"]

View File

@ -0,0 +1,10 @@
FROM {{ registry }}{{ alt_image }}:{{ branch }}
MAINTAINER alt-cloud
{{ install_pakages(
"ca-certificates",
"curl",
"gnupg",
"wget"
) }}

View File

@ -0,0 +1,12 @@
FROM {{ registry }}{{ organization }}/buildpack-deps-curl:{{ branch }}
MAINTAINER alt-cloud
{{ install_pakages(
"git",
"mercurial",
"openssh-clients",
"procps",
"subversion"
) }}

View File

@ -1,12 +1,8 @@
FROM {{ registry }}base/buildpack-deps-scm:{{ branch }}
FROM {{ registry }}{{ organization }}/buildpack-deps-scm:{{ branch }}
MAINTAINER alt-cloud
LABEL org.opencontainers.image.title="buildpack-deps"
LABEL org.opencontainers.image.licenses="GPLv2"
LABEL org.opencontainers.image.vendor="ALT Linux Team"
{{ install_packages(
{{ install_pakages(
"ImageMagick",
"autoconf",
"automake",

View File

@ -0,0 +1,29 @@
FROM {{ registry }}{{ organization }}/base:{{ branch }}
MAINTAINER alt-cloud
# install editor
{{ install_pakages("vim-console") }}
# install debugging tools
{{ install_pakages("strace", "gdb") }}
# install document viewers
{{ install_pakages("man") }}
# install version control system
{{ install_pakages("git-core", "perl-Git") }}
# install network utils
{{ install_pakages("iproute2", "iputils", "wget", "curl") }}
# install file utils
{{ install_pakages("lsof", "ripgrep") }}
# install shell and completions
{{ install_pakages("zsh", "zsh-completions") }}
# install compilation utils
{{ install_pakages("make", "gcc", "gcc-c++") }}
CMD ["zsh"]

View File

@ -1,4 +1,4 @@
from = "{{ registry }}base/distroless-static:{{ branch }}"
from = "{{ registry }}{{ organization }}/distroless-static:{{ branch }}"
builder-install-packages = [
"glibc-core",
'{{if_branches(["p10"], "glibc-nss")}}',

View File

@ -0,0 +1,11 @@
FROM {{ registry }}{{ alt_image }}:{{ branch }}
MAINTAINER alt-cloud
RUN echo %_excludedocs 1 >> /etc/rpm/macros
RUN rpm -qalds | awk '/^normal/{print $2}' | xargs rm -rf
{{ install_pakages("python3", "glibc-utils", "apt-repo") }}
WORKDIR /usr/src/distroless
RUN mkdir file-lists
RUN useradd -m nonroot
COPY distroless-builder.py .

View File

@ -0,0 +1,3 @@
ALT dockerfile for distroless-builder image.
This images is using to build tarball for distroless images.

View File

@ -1,4 +1,4 @@
from = "{{ registry }}base/distroless-base:{{ branch }}"
from = "{{ registry }}{{ organization }}/distroless-base:{{ branch }}"
builder-install-packages = [
"coreutils",
"findutils",

View File

@ -0,0 +1,3 @@
from = "{{ registry }}{{ organization }}/distroless-base:{{ branch }}"
full-files = ["/usr/bin/gotop"]
entrypoint = ["/usr/bin/gotop"]

View File

@ -0,0 +1,3 @@
from = "{{ registry }}{{ organization }}/distroless-static:{{ branch }}"
files = ["/bin/true"]
cmd = ["/bin/true"]

View File

@ -0,0 +1,9 @@
FROM {{ registry }}{{ alt_image }}:{{ branch }}
MAINTAINER alt-cloud
{{ install_pakages("etcd") }}
VOLUME /data
ENTRYPOINT ["/usr/sbin/etcd", "--data-dir", "/data"]

View File

@ -0,0 +1,21 @@
FROM {{ registry }}{{ alt_image }}:{{ branch }}
MAINTAINER alt-cloud
{{ install_pakages("gitea", "openssh-server", "gosu") }}
ENV USER gitea
ENV HOME /var/lib/gitea
ENV GITEA_WORK_DIR /var/lib/gitea
WORKDIR /var/lib/gitea
COPY app.ini /etc/gitea/app.ini
COPY entrypoint.sh /entrypoint.sh
EXPOSE 3000
EXPOSE 2222
VOLUME ["/var/lib/gitea"]
ENTRYPOINT ["/entrypoint.sh"]

1
org/alt/gitea/test Normal file
View File

@ -0,0 +1 @@
gitea --version

View File

@ -2,13 +2,7 @@ FROM {{ registry }}{{ alt_image }}:{{ branch }}
MAINTAINER alt-cloud
LABEL org.opencontainers.image.title="nginx"
LABEL org.opencontainers.image.description="Fast HTTP server, extremely useful as an Apache frontend"
LABEL org.opencontainers.image.source="https://nginx.org/"
LABEL org.opencontainers.image.licenses="BSD"
LABEL org.opencontainers.image.vendor="ALT Linux Team"
{{ install_packages("nginx", "apache2-html", "tzdata") }}
{{ install_pakages("nginx", "apache2-html", "tzdata") }}
RUN cd /etc/nginx/sites-enabled.d && ln -s ../sites-available.d/default.conf .

View File

@ -0,0 +1,12 @@
FROM {{ registry }}{{ organization }}/buildpack-deps:{{ branch }}
MAINTAINER alt-cloud
RUN groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
{{ install_pakages(
"node",
"npm",
"yarn"
) }}

View File

@ -0,0 +1,11 @@
FROM {{ registry }}{{ alt_image }}:{{ branch }}
MAINTAINER alt-cloud
{{ install_pakages("prometheus") }}
WORKDIR /var/lib/prometheus
USER prometheus
EXPOSE 9090
VOLUME [ "/var/lib/prometheus" ]
ENTRYPOINT [ "/usr/bin/prometheus", "--config.file=/etc/prometheus/prometheus.yml"]

View File

@ -0,0 +1,12 @@
FROM {{ registry }}{{ organization }}/base:{{ branch }}
MAINTAINER alt-cloud
{{ install_pakages(
"python3-module-pip",
"python3-module-setuptools",
"python3-dev",
"gcc",
) }}
CMD ["python3"]

1
org/alt/python/test Normal file
View File

@ -0,0 +1 @@
python3 --help

View File

@ -0,0 +1,15 @@
FROM {{ registry }}{{ alt_image }}:{{ branch }}
MAINTAINER alt-cloud
{{ install_pakages("docker-registry") }}
RUN ln -sf /usr/bin/docker-registry /bin/registry
VOLUME ["/var/lib/registry"]
EXPOSE 5000
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["/etc/docker-registry/config.yml"]

View File

@ -0,0 +1,7 @@
FROM {{ registry }}{{ alt_image }}:{{ branch }}
MAINTAINER alt-cloud
{{ install_pakages("irb") }}
CMD ["irb"]

View File

@ -1,16 +1,10 @@
FROM {{ registry }}base/base:{{ branch }}
FROM {{ registry }}{{ organization }}/base:{{ branch }}
MAINTAINER alt-cloud
LABEL org.opencontainers.image.title="systemd"
LABEL org.opencontainers.image.description="System and Session Manager"
LABEL org.opencontainers.image.source="https://github.com/systemd/systemd"
LABEL org.opencontainers.image.licenses="LGPLv2.1+"
LABEL org.opencontainers.image.vendor="ALT Linux Team"
ENV container docker
{{ install_packages("systemd-sysvinit") }}
{{ install_pakages("systemd-sysvinit") }}
RUN ( \
cd /lib/systemd/system/sysinit.target.wants/; \

View File

@ -2,12 +2,6 @@ FROM {{ registry }}{{ alt_image }}:{{ branch }}
MAINTAINER alt-cloud
LABEL org.opencontainers.image.title="unit"
LABEL org.opencontainers.image.description="NGINX Unit is a lightweight and versatile web-server"
LABEL org.opencontainers.image.source="https://github.com/nginx/unit"
LABEL org.opencontainers.image.licenses="Apache-2.0"
LABEL org.opencontainers.image.vendor="ALT Linux Team"
RUN apt-get update && \
apt-get install -y unit curl tzdata; \
rm -f /var/cache/apt/archives/*.rpm \

View File

@ -1,2 +0,0 @@
entrypoint: "/bin/sh"
command: "LC_ALL=ru_RU.UTF-8 TZ=/usr/share/zoneinfo/Europe/Moscow date| grep MSK"

View File

@ -1,14 +0,0 @@
FROM {{ registry }}{{ alt_image }}:{{ branch }}
MAINTAINER alt-cloud
LABEL org.opencontainers.image.title="buildpack-deps-curl"
LABEL org.opencontainers.image.licenses="GPLv2"
LABEL org.opencontainers.image.vendor="ALT Linux Team"
{{ install_packages(
"ca-certificates",
"curl",
"gnupg",
"wget"
) }}

View File

@ -1,2 +0,0 @@
entrypoint: "/bin/sh"
command: "curl --version && gpg --version"

View File

@ -1,15 +0,0 @@
FROM {{ registry }}base/buildpack-deps-curl:{{ branch }}
MAINTAINER alt-cloud
LABEL org.opencontainers.image.title="buildpack-deps-scm"
LABEL org.opencontainers.image.licenses="GPLv2"
LABEL org.opencontainers.image.vendor="ALT Linux Team"
{{ install_packages(
"git",
"mercurial",
"openssh-clients",
"procps",
"subversion"
) }}

View File

@ -1,2 +0,0 @@
entrypoint: "/bin/sh"
command: "git --version && hg --version"

View File

@ -1,2 +0,0 @@
entrypoint: "/bin/sh"
command: "gcc --version && make --version"

View File

@ -1,34 +0,0 @@
FROM {{ registry }}base/base:{{ branch }}
MAINTAINER alt-cloud
LABEL org.opencontainers.image.title="devel"
LABEL org.opencontainers.image.description="This image is only for devel or testing purposes"
LABEL org.opencontainers.image.licenses="GPLv2"
LABEL org.opencontainers.image.vendor="ALT Linux Team"
# install editor
{{ install_packages("vim-console") }}
# install debugging tools
{{ install_packages("strace", "gdb") }}
# install document viewers
{{ install_packages("man") }}
# install version control system
{{ install_packages("git-core", "perl-Git") }}
# install network utils
{{ install_packages("iproute2", "iputils", "wget", "curl") }}
# install file utils
{{ install_packages("lsof", "ripgrep") }}
# install shell and completions
{{ install_packages("zsh", "zsh-completions") }}
# install compilation utils
{{ install_packages("make", "gcc", "gcc-c++") }}
CMD ["zsh"]

View File

@ -1 +0,0 @@
man --version && ip -V && vim --version | grep vim

View File

@ -1,16 +0,0 @@
FROM {{ registry }}{{ alt_image }}:{{ branch }}
MAINTAINER alt-cloud
LABEL org.opencontainers.image.title="distroless-builder"
LABEL org.opencontainers.image.description="This image is used to build tarballs for distroless images"
LABEL org.opencontainers.image.licenses="GPLv2"
LABEL org.opencontainers.image.vendor="ALT Linux Team"
RUN echo %_excludedocs 1 >> /etc/rpm/macros
RUN rpm -qalds | awk '/^normal/{print $2}' | xargs rm -rf
{{ install_packages("python3", "glibc-utils", "apt-repo") }}
WORKDIR /usr/src/distroless
RUN mkdir file-lists
RUN useradd -m nonroot
COPY distroless-builder.py .

View File

@ -1,3 +0,0 @@
ALT dockerfile for distroless-builder image.
This image is used to build tarballs for distroless images.

View File

@ -1,2 +0,0 @@
entrypoint: "/bin/sh"
command: "apt-repo --version"

View File

@ -1,2 +0,0 @@
entrypoint: "/bin/sh"
command: "ss -V"

View File

@ -1,3 +0,0 @@
from = "{{ registry }}base/distroless-base:{{ branch }}"
full-files = ["/usr/bin/gotop"]
entrypoint = ["/usr/bin/gotop"]

View File

@ -1,2 +0,0 @@
entrypoint: ""
command: "--version"

View File

@ -1,3 +0,0 @@
from = "{{ registry }}base/distroless-static:{{ branch }}"
files = ["/bin/true"]
cmd = ["/bin/true"]

View File

@ -1,2 +0,0 @@
entrypoint: ""
command: "true"

View File

@ -1,13 +0,0 @@
FROM {{ registry }}{{ alt_image }}:{{ branch }}
MAINTAINER alt-cloud
LABEL org.opencontainers.image.title="trivy"
LABEL org.opencontainers.image.description="A Fast Vulnerability Scanner for Containers"
LABEL org.opencontainers.image.source="https://aquasecurity.github.io/trivy"
LABEL org.opencontainers.image.licenses="Apache-2.0"
LABEL org.opencontainers.image.vendor="ALT Linux Team"
{{ install_packages("trivy") }}
ENTRYPOINT [ "trivy" ]

View File

@ -1,10 +0,0 @@
dockerfiles-alt-trivy
=====================
ALT dockerfile for trivy.
Copy dockerfile somewhere and built the image:
`$ docker build --rm -t <username>/trivy .`
And launch the trivy container
`$ docker run -it <username>/trivy`

View File

@ -1,2 +0,0 @@
entrypoint: "/bin/sh"
command: "trivy --version"

View File

@ -1,17 +0,0 @@
FROM {{ registry }}{{ alt_image }}:{{ branch }}
MAINTAINER alt-cloud
LABEL org.opencontainers.image.title="cert-manager-cainjector"
LABEL org.opencontainers.image.description="Cainjector component for automatic provisioning and managing TLS certificates in Kubernetes"
LABEL org.opencontainers.image.source="https://github.com/cert-manager/cert-manager"
LABEL org.opencontainers.image.licenses="Apache-2.0"
LABEL org.opencontainers.image.vendor="ALT Linux Team"
{{ install_packages("cert-manager") }}
RUN groupadd -r -g 1000 cert-manger && useradd --no-log-init -r -u 1000 -g cert-manger cert-manger
USER 1000
ENTRYPOINT ["/usr/bin/cainjector"]

View File

@ -1,2 +0,0 @@
entrypoint: "/bin/sh"
command: "cainjector --help"

View File

@ -1,17 +0,0 @@
FROM {{ registry }}{{ alt_image }}:{{ branch }}
MAINTAINER alt-cloud
LABEL org.opencontainers.image.title="cert-manager-controller"
LABEL org.opencontainers.image.description="Controller component for automatic provisioning and managing TLS certificates in Kubernetes"
LABEL org.opencontainers.image.source="https://github.com/cert-manager/cert-manager"
LABEL org.opencontainers.image.licenses="Apache-2.0"
LABEL org.opencontainers.image.vendor="ALT Linux Team"
{{ install_packages("cert-manager") }}
RUN groupadd -r -g 1000 cert-manger && useradd --no-log-init -r -u 1000 -g cert-manger cert-manger
USER 1000
ENTRYPOINT ["/usr/bin/controller"]

View File

@ -1,2 +0,0 @@
entrypoint: "/bin/sh"
command: "controller --help"

View File

@ -1,17 +0,0 @@
FROM {{ registry }}{{ alt_image }}:{{ branch }}
MAINTAINER alt-cloud
LABEL org.opencontainers.image.title="cert-manager-webhook"
LABEL org.opencontainers.image.description="Webhook component for automatic provisioning and managing TLS certificates in Kubernetes"
LABEL org.opencontainers.image.source="https://github.com/cert-manager/cert-manager"
LABEL org.opencontainers.image.licenses="Apache-2.0"
LABEL org.opencontainers.image.vendor="ALT Linux Team"
{{ install_packages("cert-manager") }}
RUN groupadd -r -g 1000 cert-manger && useradd --no-log-init -r -u 1000 -g cert-manger cert-manger
USER 1000
ENTRYPOINT ["/usr/bin/webhook"]

View File

@ -1,2 +0,0 @@
entrypoint: "/bin/sh"
command: "webhook --help"

View File

@ -1,13 +0,0 @@
FROM {{ registry }}{{ alt_image }}:{{ branch }}
MAINTAINER alt-cloud
LABEL org.opencontainers.image.title="flannel-cni-plugin"
LABEL org.opencontainers.image.description="CNI network plugin that is powered by flannel"
LABEL org.opencontainers.image.source="https://github.com/flannel-io/cni-plugin"
LABEL org.opencontainers.image.licenses="Apache-2.0"
LABEL org.opencontainers.image.vendor="ALT Linux Team"
{{ install_packages("cni-plugin-flannel") }}
RUN cp /usr/libexec/cni/flannel /flannel

View File

@ -1,2 +0,0 @@
entrypoint: ""
command: "flannel"

View File

@ -1,2 +0,0 @@
entrypoint: "/bin/sh"
command: "flanneld --version"

View File

@ -0,0 +1,11 @@
FROM {{ registry }}{{ alt_image }}:{{ branch }}
MAINTAINER alt-cloud
{{ install_pakages("cert-manager") }}
RUN groupadd -r -g 1000 cert-manger && useradd --no-log-init -r -u 1000 -g cert-manger cert-manger
USER 1000
ENTRYPOINT ["/usr/bin/cainjector"]

View File

@ -0,0 +1,11 @@
FROM {{ registry }}{{ alt_image }}:{{ branch }}
MAINTAINER alt-cloud
{{ install_pakages("cert-manager") }}
RUN groupadd -r -g 1000 cert-manger && useradd --no-log-init -r -u 1000 -g cert-manger cert-manger
USER 1000
ENTRYPOINT ["/usr/bin/controller"]

View File

@ -0,0 +1,11 @@
FROM {{ registry }}{{ alt_image }}:{{ branch }}
MAINTAINER alt-cloud
{{ install_pakages("cert-manager") }}
RUN groupadd -r -g 1000 cert-manger && useradd --no-log-init -r -u 1000 -g cert-manger cert-manger
USER 1000
ENTRYPOINT ["/usr/bin/webhook"]

View File

@ -2,12 +2,6 @@ FROM {{ registry }}{{ alt_image }}:{{ branch }}
MAINTAINER alt-cloud
LABEL org.opencontainers.image.title="coredns"
LABEL org.opencontainers.image.description="CoreDNS is a DNS server that chains plugins"
LABEL org.opencontainers.image.source="https://github.com/coredns/coredns"
LABEL org.opencontainers.image.licenses="Apache-2.0"
LABEL org.opencontainers.image.vendor="ALT Linux Team"
{{ install_packages("coredns") }}
{{ install_pakages("coredns") }}
ENTRYPOINT ["/usr/bin/coredns"]

View File

@ -1,2 +0,0 @@
entrypoint: "/bin/sh"
command: "coredns --version"

View File

@ -2,13 +2,7 @@ FROM {{ registry }}{{ alt_image }}:{{ branch }}
MAINTAINER alt-cloud
LABEL org.opencontainers.image.title="etcd"
LABEL org.opencontainers.image.description="Distributed reliable key-value store for the most critical data of a distributed system"
LABEL org.opencontainers.image.source="https://github.com/etcd-io/etcd"
LABEL org.opencontainers.image.licenses="Apache-2.0"
LABEL org.opencontainers.image.vendor="ALT Linux Team"
{{ install_packages("etcd") }}
{{ install_pakages("etcd") }}
VOLUME /data

View File

@ -1,2 +0,0 @@
entrypoint: "/bin/sh"
command: "etcd --version"

View File

@ -0,0 +1,7 @@
FROM {{ registry }}{{ alt_image }}:{{ branch }}
MAINTAINER alt-cloud
{{ install_pakages("cni-plugin-flannel") }}
RUN cp /usr/libexec/cni/flannel /flannel

View File

@ -2,13 +2,7 @@ FROM {{ registry }}{{ alt_image }}:{{ branch }}
MAINTAINER alt-cloud
LABEL org.opencontainers.image.title="flannel"
LABEL org.opencontainers.image.description="Network fabric for containers"
LABEL org.opencontainers.image.source="https://github.com/flannel-io/flannel"
LABEL org.opencontainers.image.licenses="Apache-2.0"
LABEL org.opencontainers.image.vendor="ALT Linux Team"
{{ install_packages(
{{ install_pakages(
"iproute2",
"net-tools",
"ca-certificates",

View File

@ -2,12 +2,6 @@ FROM {{ registry }}{{ alt_image }}:{{ branch }}
MAINTAINER alt-cloud
LABEL org.opencontainers.image.title="kube-apiserver"
LABEL org.opencontainers.image.description="The Kubernetes API server validates and configures data for the api objects which include pods, services, replicationcontrollers, and others."
LABEL org.opencontainers.image.source="https://github.com/kubernetes/kubernetes"
LABEL org.opencontainers.image.licenses="Apache-2.0"
LABEL org.opencontainers.image.vendor="ALT Linux Team"
{{ install_packages("kubernetes-master") }}
{{ install_pakages("kubernetes-master") }}
ENTRYPOINT ["/usr/bin/kube-apiserver"]

View File

@ -1,2 +0,0 @@
entrypoint: "/bin/sh"
command: "kube-apiserver --version"

View File

@ -2,12 +2,6 @@ FROM {{ registry }}{{ alt_image }}:{{ branch }}
MAINTAINER alt-cloud
LABEL org.opencontainers.image.title="kube-controller-manager"
LABEL org.opencontainers.image.description="The Kubernetes controller manager is a daemon that embeds the core control loops shipped with Kubernetes."
LABEL org.opencontainers.image.source="https://github.com/kubernetes/kubernetes"
LABEL org.opencontainers.image.licenses="Apache-2.0"
LABEL org.opencontainers.image.vendor="ALT Linux Team"
{{ install_packages("kubernetes-master") }}
{{ install_pakages("kubernetes-master") }}
ENTRYPOINT ["/usr/bin/kube-controller-manager"]

View File

@ -1,2 +0,0 @@
entrypoint: "/bin/sh"
command: "kube-controller-manager --version"

View File

@ -2,13 +2,7 @@ FROM {{ registry }}{{ alt_image }}:{{ branch }}
MAINTAINER alt-cloud
LABEL org.opencontainers.image.title="kube-proxy"
LABEL org.opencontainers.image.description="The Kubernetes network proxy runs on each node."
LABEL org.opencontainers.image.source="https://github.com/kubernetes/kubernetes"
LABEL org.opencontainers.image.licenses="Apache-2.0"
LABEL org.opencontainers.image.vendor="ALT Linux Team"
{{ install_packages("kubernetes-node") }}
{{ install_pakages("kubernetes-node") }}
RUN ln -s /usr/bin/kube-proxy /usr/local/bin/kube-proxy

Some files were not shown because too many files have changed in this diff Show More