forked from images/gitea-image-forge
Compare commits
121 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
69bbcad15b | ||
|
|
f80b0d28cf | ||
|
|
9c460b363e | ||
|
|
28c0fc03cf | ||
|
|
f8496320dd | ||
|
|
8cdee0b278 | ||
|
|
8cc6581c18 | ||
| 4bef9210e6 | |||
| 6944bb7158 | |||
| e60d4a6450 | |||
| d31ae53893 | |||
| d3a5f23958 | |||
| f55f03f91d | |||
|
|
fa20517058 | ||
| b4c00f94b0 | |||
| a13a21ca68 | |||
| bc73692c9c | |||
| 7cd99ec5f9 | |||
|
|
ad9a468aa6 | ||
| 5a1eb308c8 | |||
|
|
86fba1814f | ||
|
|
28b280556b | ||
|
|
deee1706de | ||
|
|
a59901c4bf | ||
| 54c9a9fcbd | |||
| 4c949d2448 | |||
| 2327ebf753 | |||
| c9480280d7 | |||
| 25b806770e | |||
| 58b270a3b0 | |||
| daeaacf9f1 | |||
|
|
5d6c3dcf3f | ||
|
|
1aa473607c | ||
|
|
fcffc17ea0 | ||
| a12660480b | |||
| 380a0edde2 | |||
| 350b30deb8 | |||
| fa91af9346 | |||
| b2405d1e94 | |||
|
|
81f61b4857 | ||
|
|
48de446739 | ||
| 56965e0770 | |||
| 52a99cb816 | |||
| 55ccd3baea | |||
| f314eede47 | |||
| ae072551ba | |||
| 3de460f98b | |||
| a3b7569639 | |||
| 0e0dd3fd46 | |||
|
|
04bf7f182d | ||
|
|
65ba744aa1 | ||
|
|
b9f1e5c287 | ||
| e1fd09c37e | |||
| 2d4dd5425b | |||
| 10c33d2b86 | |||
| 53b54589c6 | |||
| 226e407ffa | |||
| a021602815 | |||
| da897f1524 | |||
| 876b5dd69a | |||
| 2a6b4f6d63 | |||
| d309a0913a | |||
| 5cba21f04d | |||
| 8483e80261 | |||
| 22ae07c07e | |||
| 7da6f533fd | |||
| 5879650bb5 | |||
| ec5dfc77c2 | |||
| 7308bf40ed | |||
| 048d9e0dc9 | |||
| 8dde33afc9 | |||
| f9ebe0e930 | |||
| 4958cce4bb | |||
| 6a7f3e4b47 | |||
| 219cfcf83c | |||
| 6cfa2d4cda | |||
| a023dc2db8 | |||
| c73bfecccf | |||
|
|
7720676c88 | ||
| 78c4c97158 | |||
| 0d9343fdb3 | |||
| 7dc3d359db | |||
| 403de130b3 | |||
| 59bc095538 | |||
| 91f1737489 | |||
| 1fbe27bca4 | |||
| 93927be6b3 | |||
| 4ae36fcc13 | |||
| a1c2dd7846 | |||
| a0affe3b1b | |||
| e876bd1bf0 | |||
| 8ccf88f288 | |||
| c091d70ef6 | |||
| d563003aed | |||
| f7a330b160 | |||
| 22f7e136db | |||
| 0a2d821433 | |||
| 91a49afff5 | |||
| d17b884447 | |||
| 00494f0ccd | |||
| d1f8704ce3 | |||
| 138cd58024 | |||
| 4db33da5e3 | |||
| 9bec80e52d | |||
| d1f1ba4867 | |||
| d9536bcf04 | |||
| 38b288c40c | |||
| 09dc78deaf | |||
| b91b534067 | |||
| 836b9003e8 | |||
| e00880a5e0 | |||
| 78d310fce1 | |||
|
|
d957ee81ad | ||
|
|
5adbf02c90 | ||
| 716c7e5331 | |||
| 7b4fa36a1f | |||
| 299cc889f0 | |||
| 52bdd4d05f | |||
| 9026f3412c | |||
| 3936f1cd58 | |||
|
|
065c19863d |
74
.gitea/workflows/reuse_test.yaml
Normal file
74
.gitea/workflows/reuse_test.yaml
Normal file
@@ -0,0 +1,74 @@
|
||||
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: Update apt
|
||||
uses: https://gitea.basealt.ru/actions/init-alt-env@v1
|
||||
- name: Install requires
|
||||
run: |
|
||||
echo "apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah"
|
||||
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: Check out current repo
|
||||
uses: https://gitea.com/actions/checkout@v4
|
||||
with:
|
||||
repository: ${{ gitea.server_url }}/${{ inputs.repo }}/gitea-image-forge
|
||||
- name: Get test for image
|
||||
run: |
|
||||
if test -f ${{ gitea.workspace }}/org/$IM/test; then testscript=$(cat ${{ gitea.workspace }}/org/$IM/test); else testscript=""; fi
|
||||
echo "TEST=$testscript" >> ${GITHUB_ENV}
|
||||
echo "test script: $testscript"
|
||||
env:
|
||||
IM: ${{ inputs.image }}
|
||||
BR: ${{ inputs.branch }}
|
||||
- name: Run test
|
||||
id: test-script
|
||||
if: ${{ env.TEST != '' }}
|
||||
continue-on-error: true
|
||||
uses: https://gitea.basealt.ru/actions/podman-run-action@v2
|
||||
with:
|
||||
image: ${{ inputs.url }}/${{ inputs.repo }}/${{ inputs.image }}:${{ inputs.branch }}
|
||||
options: --rm
|
||||
run: ${{ env.TEST }}
|
||||
- name: Run special test
|
||||
id: special-test
|
||||
if: ${{ env.TEST == '' }}
|
||||
continue-on-error: true
|
||||
run: |
|
||||
if [[ IM = 'alt/distroless-true' ]]; then podman run --rm $URL/$REPO/$IM:$BR true; fi
|
||||
if [[ IM = 'alt/distroless-gotop' ]]; then podman run --rm $URL/$REPO/$IM:$BR --version; fi
|
||||
env:
|
||||
IM: ${{ inputs.image }}
|
||||
BR: ${{ inputs.branch }}
|
||||
URL: ${{ inputs.url }}
|
||||
- name: Send notification if test crashed
|
||||
if: ${{ steps.test-script.outcome == 'failure' || steps.special-test.outcome == 'failure' }}
|
||||
run: |
|
||||
issueid=$(curl -X 'GET' "$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)
|
||||
body="Building of image $IM for branch $BR is failed"
|
||||
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 }}
|
||||
URL: ${{ gitea.server_url }}
|
||||
IM: ${{ inputs.image }}
|
||||
BR: ${{ inputs.branch }}
|
||||
REPO: ${{ inputs.repo }}
|
||||
- name: Finish test
|
||||
run: echo "finish test for image $IM on branch $BR"
|
||||
env:
|
||||
IM: ${{ inputs.image }}
|
||||
BR: ${{ inputs.branch }}
|
||||
82
.gitea/workflows/testscript
Executable file
82
.gitea/workflows/testscript
Executable file
@@ -0,0 +1,82 @@
|
||||
#!/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"}
|
||||
|
||||
errors=''
|
||||
haserr=false
|
||||
for IM in $(ls $WS/org/$ORG/ | xargs)
|
||||
do
|
||||
echo "image=$IM"
|
||||
imgpath="$REPO/$WS/$BR/$IM:$BR"
|
||||
command=''
|
||||
testpath="$WS/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
|
||||
then tag=$(date +"%Y%m%d")
|
||||
fi
|
||||
|
||||
if [[ $tag != '' ]]
|
||||
then
|
||||
skopeo copy -a docker://$URL/$imgpath:$BR docker://$URL/$imgpath:$tag
|
||||
scopeo delete docker://$URL/$imgpath:$BR
|
||||
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
|
||||
|
||||
fi
|
||||
haserr=false
|
||||
done
|
||||
|
||||
echo "$errors"
|
||||
if [[ $errors != '' ]]
|
||||
then haserr=true
|
||||
fi
|
||||
echo "ERR=$haserr" > haserr.log
|
||||
echo $errors > errors.log
|
||||
@@ -5,15 +5,15 @@ on:
|
||||
- '*_*/*'
|
||||
|
||||
jobs:
|
||||
build_process:
|
||||
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 }}
|
||||
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: |
|
||||
@@ -25,9 +25,7 @@ jobs:
|
||||
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
|
||||
uses: https://gitea.basealt.ru/actions/init-alt-env@v1
|
||||
- name: Install requires
|
||||
run: |
|
||||
echo "apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah jq"
|
||||
@@ -57,13 +55,13 @@ jobs:
|
||||
echo "IMAGE=$localimage"
|
||||
- name: Get test for image
|
||||
run: |
|
||||
testscript=$(cat ${{ gitea.workspace }}/org/$IM/test)
|
||||
echo "TEST=$testscript">> ${GITHUB_ENV}
|
||||
if test -f ${{ gitea.workspace }}/org/$IM/test; then testscript=$(cat ${{ gitea.workspace }}/org/$IM/test); else testscript=""; fi
|
||||
echo "TEST=$testscript" >> ${GITHUB_ENV}
|
||||
env:
|
||||
IM: ${{ env.IMAGE }}
|
||||
BR: ${{ env.BRANCH }}
|
||||
- name: Run building script
|
||||
id: build_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
|
||||
@@ -71,17 +69,14 @@ jobs:
|
||||
IM: ${{ env.IMAGE }}
|
||||
BR: ${{ env.BRANCH }}
|
||||
continue-on-error: true
|
||||
test_process:
|
||||
if: ${{ jobs.build_process.env.BUILDRES == 'success' }}
|
||||
needs: build_process
|
||||
test-process:
|
||||
needs: build-process
|
||||
runs-on: alt-latest
|
||||
outputs:
|
||||
testres: ${{ steps.test_script.outcome }}
|
||||
testres: ${{ steps.test-script.outcome == 'success' || steps.special-test.outcome == 'success' }}
|
||||
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
|
||||
uses: https://gitea.basealt.ru/actions/init-alt-env@v1
|
||||
- name: Install requires
|
||||
run: |
|
||||
echo "apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah"
|
||||
@@ -89,22 +84,33 @@ jobs:
|
||||
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
|
||||
id: test-script
|
||||
if: ${{ needs.build-process.outputs.buildres == 'success' && needs.build-process.outputs.test != '' }}
|
||||
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 }}
|
||||
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 }}
|
||||
- name: Run special test
|
||||
id: special-test
|
||||
if: ${{ needs.build-process.outputs.buildres == 'success' && needs.build-process.outputs.test == '' }}
|
||||
continue-on-error: true
|
||||
run: |
|
||||
if [[ IM = 'alt/distroless-true' ]]; then podman run --rm $URL/$REPO/$IM:$BR true; fi
|
||||
if [[ IM = 'alt/distroless-gotop' ]]; then podman run --rm $URL/$REPO/$IM:$BR --version; fi
|
||||
env:
|
||||
IM: ${{ needs.build-process.outputs.image }}
|
||||
BR: ${{ needs.build-process.outputs.branch }}
|
||||
URL: ${{ needs.build-process.outputs.url }}
|
||||
REPO: ${{ needs.build-process.outputs.repo }}
|
||||
finish_process:
|
||||
needs: [ build_process, test_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
|
||||
uses: https://gitea.basealt.ru/actions/init-alt-env@v1
|
||||
- name: Install requires
|
||||
run: |
|
||||
echo "apt-get install -y curl jq"
|
||||
apt-get install -y curl jq
|
||||
@@ -115,22 +121,22 @@ jobs:
|
||||
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 }}
|
||||
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
|
||||
if [[ ${{ needs.build-process.outputs.buildres }} = 'success' ]] && [[ ${{ needs.test-process.outputs.testres }} ]]; 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"
|
||||
echo "notification is sent to issue $issueid"
|
||||
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}}
|
||||
URL: ${{ needs.build-process.outputs.url }}
|
||||
REPO: ${{ needs.build-process.outputs.repo }}
|
||||
IM: ${{ needs.build-process.outputs.image }}
|
||||
BR: ${{ needs.build-process.outputs.branch }}
|
||||
169
.gitea/workflows/wf_full2.yaml
Normal file
169
.gitea/workflows/wf_full2.yaml
Normal file
@@ -0,0 +1,169 @@
|
||||
name: Full building alt images v2
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*#*'
|
||||
|
||||
jobs:
|
||||
build-process:
|
||||
runs-on: alt-p10
|
||||
outputs:
|
||||
branch: ${{ env.BRANCH }}
|
||||
org: ${{ env.ORG }}
|
||||
url: ${{ env.URL }}
|
||||
repo: ${{ env.REPO }}
|
||||
buildres: ${{ steps.build-script.outcome }}
|
||||
steps:
|
||||
- name: Check workspace
|
||||
run: |
|
||||
repourl=$(echo $GU | cut -d '/' -f 3)
|
||||
echo "URL=$repourl" >> ${GITHUB_ENV}
|
||||
echo $repourl
|
||||
reponame=$(echo $GR | cut -d '/' -f 1)
|
||||
echo "REPO=$reponame" >> ${GITHUB_ENV}
|
||||
echo $reponame
|
||||
env:
|
||||
GU: ${{ gitea.server_url }}
|
||||
GR: ${{ gitea.repository }}
|
||||
- name: Update apt
|
||||
uses: https://gitea.basealt.ru/actions/init-alt-env@v1
|
||||
- name: Install requires
|
||||
run: |
|
||||
echo "apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah 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: https://gitea.com/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"
|
||||
if [[ $BR == 'sisyphus' ]]; then build_args="$build_args --skip-arches arm"; fi
|
||||
if [[ $ORG == 'k8s' ]]; then build_args="$build_args --overwrite-organization $ORG-$BR"; fi
|
||||
echo "build.py $build_args"
|
||||
${{ gitea.workspace }}/build.py $build_args -i alt/distroless-true
|
||||
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=$(curl -X 'GET' "$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)
|
||||
body="Building images finish with some 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: ${{ 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/gitea-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-alt:
|
||||
needs: build-process
|
||||
if: ${{ needs.build-process.outputs.buildres == 'success' && needs.build-process.outputs.org == 'alt' }}
|
||||
runs-on: alt-p10
|
||||
strategy:
|
||||
max-parallel: 5
|
||||
matrix:
|
||||
images:
|
||||
- apache2
|
||||
- base
|
||||
- buildpack-deps
|
||||
- buildpack-deps-curl
|
||||
- buildpack-deps-scm
|
||||
- devel
|
||||
- distroless-base
|
||||
- distroless-builder
|
||||
- distroless-devel
|
||||
- distroless-gotop
|
||||
- distroless-static
|
||||
- distroless-true
|
||||
- etcd
|
||||
- gitea
|
||||
- nginx
|
||||
- node
|
||||
- prometheus
|
||||
- python
|
||||
- registry
|
||||
- ruby
|
||||
- systemd
|
||||
- unit
|
||||
steps:
|
||||
- name: Update apt
|
||||
uses: ${{ gitea.server_url }}/actions/init-alt-env@v1
|
||||
- name: Install requires
|
||||
run: |
|
||||
echo "apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah curl jq"
|
||||
apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah curl jq
|
||||
- uses: https://gitea.basealt.ru/actions/image-forge-test@v1
|
||||
continue-on-error: true
|
||||
with:
|
||||
image: ${{ matrix.images }}
|
||||
branch: ${{ needs.build-process.outputs.branch }}
|
||||
org: ${{ needs.build-process.outputs.org }}
|
||||
url: ${{ needs.build-process.outputs.url }}
|
||||
repo: ${{ needs.build-process.outputs.repo }}
|
||||
test-process-k8s:
|
||||
needs: build-process
|
||||
if: ${{ needs.build-process.outputs.buildres == 'success' && needs.build-process.outputs.org == 'k8s' }}
|
||||
runs-on: alt-p10
|
||||
strategy:
|
||||
max-parallel: 5
|
||||
matrix:
|
||||
images:
|
||||
- cert-manager-cainjector
|
||||
- cert-manager-controller
|
||||
- cert-manager-webhook
|
||||
- coredns
|
||||
- etcd
|
||||
- flannel
|
||||
- flannel-cni-plugin
|
||||
- kube-apiserver
|
||||
- kube-controller-manager
|
||||
- kube-proxy
|
||||
- kube-scheduler
|
||||
- pause
|
||||
- trivy-node-collector
|
||||
steps:
|
||||
- name: Update apt
|
||||
uses: ${{ gitea.server_url }}/actions/init-alt-env@v1
|
||||
- name: Install requires
|
||||
run: |
|
||||
echo "apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah curl jq"
|
||||
apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah curl jq
|
||||
- uses: https://gitea.basealt.ru/actions/image-forge-test@v1
|
||||
continue-on-error: true
|
||||
with:
|
||||
image: ${{ matrix.images }}
|
||||
branch: ${{ needs.build-process.outputs.branch }}
|
||||
org: ${{ needs.build-process.outputs.org }}
|
||||
url: ${{ needs.build-process.outputs.url }}
|
||||
repo: ${{ needs.build-process.outputs.repo }}
|
||||
142
.gitea/workflows/wf_full_p10.yaml
Normal file
142
.gitea/workflows/wf_full_p10.yaml
Normal file
@@ -0,0 +1,142 @@
|
||||
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 }}
|
||||
buildres: ${{ steps.build-script.outcome }}
|
||||
steps:
|
||||
- name: Check workspace
|
||||
run: |
|
||||
repourl=$(echo $GU | cut -d '/' -f 3)
|
||||
echo "URL=$repourl" >> ${GITHUB_ENV}
|
||||
echo $repourl
|
||||
reponame=$(echo $GR | cut -d '/' -f 1)
|
||||
echo "REPO=$reponame" >> ${GITHUB_ENV}
|
||||
echo $reponame
|
||||
env:
|
||||
GU: ${{ gitea.server_url }}
|
||||
GR: ${{ gitea.repository }}
|
||||
- name: Set repo for c10f2 (Temporary)
|
||||
if: ${{ contains(github.ref_name, 'c10f2') }}
|
||||
run: |
|
||||
echo "event tag=${{ github.ref_name }}"
|
||||
echo "10.4.0.3 update.altsp.su" >> /etc/hosts
|
||||
echo "cat /etc/hosts"
|
||||
cat /etc/hosts
|
||||
- name: Update apt
|
||||
uses: actions/init-alt-env@v1
|
||||
- name: Install requires
|
||||
run: |
|
||||
echo "apt-get install -y python3-module-tomli python3-module-jinja2 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 --overwrite-organization $BR --registry $URL/${{ gitea.workspace }}/$BR"
|
||||
echo "build.py $build_args"
|
||||
${{ gitea.workspace }}/build.py $build_args
|
||||
env:
|
||||
ORG: ${{ env.ORG }}
|
||||
BR: ${{ env.BRANCH }}
|
||||
continue-on-error: true
|
||||
- name: Send notification if build crashed
|
||||
if: ${{ steps.build-script.outcome != 'success' }}
|
||||
run: |
|
||||
issueid=1
|
||||
body="Building images finish with some errors."
|
||||
curl -X 'POST' "$URL/api/v1/repos/$REPO/image-forge/issues/$issueid/comments?token=$T" -H 'accept: application/json' -H 'Content-Type: application/json' -d "{ \"body\": \"$body\" }" -s
|
||||
echo "notification about test error is sent to issue $issueid"
|
||||
env:
|
||||
T: ${{ secrets.TOKEN }}
|
||||
BR: ${{ env.BRANCH }}
|
||||
URL: ${{ gitea.server_url }}
|
||||
REPO: ${{ env.REPO }}
|
||||
- name: Delete event tag
|
||||
run: |
|
||||
tagname=$(echo $EV | jq '.ref' -r | sed "s/refs\/tags\///g")
|
||||
curl -X 'DELETE' "$URL/api/v1/repos/$REPO/image-forge/tags/$tagname?token=$T" -H 'accept: application/json' -s
|
||||
echo "tag $tagname is deleted"
|
||||
env:
|
||||
T: ${{ secrets.TOKEN }}
|
||||
BR: ${{ env.BRANCH }}
|
||||
URL: ${{ gitea.server_url }}
|
||||
REPO: ${{ env.REPO }}
|
||||
EV: ${{ toJson(gitea.event) }}
|
||||
test-process:
|
||||
needs: build-process
|
||||
if: ${{ needs.build-process.outputs.buildres == 'success' }}
|
||||
runs-on: alt-p10
|
||||
steps:
|
||||
- name: Update apt
|
||||
uses: actions/init-alt-env@v1
|
||||
- name: Install requires
|
||||
run: |
|
||||
echo "apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah skopeo jq yq 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: Login podman gitea
|
||||
run: |
|
||||
echo "podman login ${{ env.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 $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 }}
|
||||
126
.gitea/workflows/wf_full_sis.yaml
Normal file
126
.gitea/workflows/wf_full_sis.yaml
Normal file
@@ -0,0 +1,126 @@
|
||||
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 }}
|
||||
@@ -1,23 +1,23 @@
|
||||
name: Test_wf
|
||||
name: Test job
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
- 'test*'
|
||||
|
||||
jobs:
|
||||
Test-job:
|
||||
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 }}"
|
||||
- name: Parse target branch
|
||||
run: |
|
||||
echo $EV
|
||||
echo ${{ github.action_path }}
|
||||
echo ${{ github.action_ref }}
|
||||
echo ${{ github.event }}
|
||||
echo ${{ github.event_name }}
|
||||
echo ${{ github.event_path }}
|
||||
echo ${{ github.triggering_actor }}
|
||||
echo ${{ github.workspace }}
|
||||
echo ${{ github.ref_name }}
|
||||
env:
|
||||
EV: ${{ toJson(gitea.event) }}
|
||||
44
build.py
44
build.py
@@ -225,7 +225,7 @@ class DockerBuilder:
|
||||
self,
|
||||
template: str,
|
||||
organization: str,
|
||||
install_pakages=None,
|
||||
install_packages=None,
|
||||
**kwargs,
|
||||
) -> str:
|
||||
if self.registry:
|
||||
@@ -237,7 +237,7 @@ class DockerBuilder:
|
||||
rendered = Template(template).render(
|
||||
alt_image=alt_image,
|
||||
branch=self.branch,
|
||||
install_pakages=install_pakages,
|
||||
install_packages=install_packages,
|
||||
organization=organization,
|
||||
registry=registry,
|
||||
**kwargs,
|
||||
@@ -247,7 +247,7 @@ class DockerBuilder:
|
||||
|
||||
@forall_images(consume_result=True)
|
||||
def render_dockerfiles(self, **kwargs):
|
||||
def install_pakages(*names):
|
||||
def install_packages(*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_pakages,
|
||||
install_packages,
|
||||
)
|
||||
kwargs["dockerfile"].write_text(rendered + "\n")
|
||||
|
||||
@@ -638,8 +638,8 @@ class ImagesInfo:
|
||||
|
||||
def parse_args():
|
||||
stages = ["build", "remove_dockerfiles", "render_dockerfiles", "push"]
|
||||
arches = ["amd64", "386", "arm64", "arm", "ppc64le"]
|
||||
branches = ["p9", "p10", "sisyphus"]
|
||||
arches = ["amd64", "386", "arm64"]
|
||||
branches = ["p10", "sisyphus", "c10f1", "c10f2"]
|
||||
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,7 +654,8 @@ def parse_args():
|
||||
nargs="+",
|
||||
default=images,
|
||||
choices=images,
|
||||
help="list of images",
|
||||
metavar="IMAGE_NAME",
|
||||
help="list of images to build",
|
||||
)
|
||||
images_group.add_argument(
|
||||
"-o",
|
||||
@@ -664,10 +665,18 @@ 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/images_repo",
|
||||
default="gitea.basealt.ru",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--overwrite-organization",
|
||||
@@ -696,27 +705,20 @@ 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="list of arches",
|
||||
help="build images for these architectures",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--skip-arches",
|
||||
nargs="+",
|
||||
default=[],
|
||||
choices=arches,
|
||||
help="list of skipping arches",
|
||||
help="list of architectures to skip",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-b",
|
||||
@@ -724,28 +726,28 @@ def parse_args():
|
||||
nargs="+",
|
||||
default=branches,
|
||||
choices=branches,
|
||||
help="list of branches",
|
||||
help="build images for these branches",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--skip-branches",
|
||||
nargs="+",
|
||||
default=[],
|
||||
choices=branches,
|
||||
help="list of skipping branches",
|
||||
help="list of branches to skip",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--stages",
|
||||
nargs="+",
|
||||
default=stages,
|
||||
choices=stages,
|
||||
help="list of stages",
|
||||
help="list of stages to go through",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--skip-stages",
|
||||
nargs="+",
|
||||
default=[],
|
||||
choices=stages,
|
||||
help="list of skipping stages",
|
||||
help="list of stages to skip",
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
||||
|
||||
MAINTAINER alt-cloud
|
||||
|
||||
{{ install_pakages("apache2") }}
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["/usr/sbin/httpd2", "-D", "NO_DETACH", "-k", "start"]
|
||||
@@ -1 +0,0 @@
|
||||
apachectl -v
|
||||
@@ -1,10 +0,0 @@
|
||||
FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
||||
|
||||
MAINTAINER alt-cloud
|
||||
|
||||
{{ install_pakages(
|
||||
"ca-certificates",
|
||||
"curl",
|
||||
"gnupg",
|
||||
"wget"
|
||||
) }}
|
||||
@@ -1,29 +0,0 @@
|
||||
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"]
|
||||
@@ -1,11 +0,0 @@
|
||||
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 .
|
||||
@@ -1,3 +0,0 @@
|
||||
ALT dockerfile for distroless-builder image.
|
||||
|
||||
This images is using to build tarball for distroless images.
|
||||
@@ -1,9 +0,0 @@
|
||||
FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
||||
|
||||
MAINTAINER alt-cloud
|
||||
|
||||
{{ install_pakages("etcd") }}
|
||||
|
||||
VOLUME /data
|
||||
|
||||
ENTRYPOINT ["/usr/sbin/etcd", "--data-dir", "/data"]
|
||||
@@ -1,21 +0,0 @@
|
||||
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 +0,0 @@
|
||||
gitea --version
|
||||
@@ -1,12 +0,0 @@
|
||||
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"
|
||||
) }}
|
||||
@@ -1,11 +0,0 @@
|
||||
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"]
|
||||
@@ -1,12 +0,0 @@
|
||||
FROM {{ registry }}{{ organization }}/base:{{ branch }}
|
||||
|
||||
MAINTAINER alt-cloud
|
||||
|
||||
{{ install_pakages(
|
||||
"python3-module-pip",
|
||||
"python3-module-setuptools",
|
||||
"python3-dev",
|
||||
"gcc",
|
||||
) }}
|
||||
|
||||
CMD ["python3"]
|
||||
@@ -1 +0,0 @@
|
||||
python3 --help
|
||||
@@ -1,15 +0,0 @@
|
||||
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"]
|
||||
@@ -1,7 +0,0 @@
|
||||
FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
||||
|
||||
MAINTAINER alt-cloud
|
||||
|
||||
{{ install_pakages("irb") }}
|
||||
|
||||
CMD ["irb"]
|
||||
@@ -2,6 +2,6 @@ FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
||||
|
||||
MAINTAINER alt-cloud
|
||||
|
||||
{{ install_pakages("glibc-gconv-modules", "glibc-locales", "tzdata") }}
|
||||
{{ install_packages("glibc-gconv-modules", "glibc-locales", "tzdata") }}
|
||||
|
||||
CMD ["bash"]
|
||||
2
org/base/base/test.yaml
Normal file
2
org/base/base/test.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
entrypoint: "/bin/sh"
|
||||
command: "LC_ALL=ru_RU.UTF-8 TZ=/usr/share/zoneinfo/Europe/Moscow date| grep MSK"
|
||||
14
org/base/buildpack-deps-curl/Dockerfile.template
Normal file
14
org/base/buildpack-deps-curl/Dockerfile.template
Normal file
@@ -0,0 +1,14 @@
|
||||
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"
|
||||
) }}
|
||||
2
org/base/buildpack-deps-curl/test.yaml
Normal file
2
org/base/buildpack-deps-curl/test.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
entrypoint: "/bin/sh"
|
||||
command: "curl --version && gpg --version"
|
||||
@@ -2,8 +2,11 @@ FROM {{ registry }}{{ organization }}/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_pakages(
|
||||
{{ install_packages(
|
||||
"git",
|
||||
"mercurial",
|
||||
"openssh-clients",
|
||||
2
org/base/buildpack-deps-scm/test.yaml
Normal file
2
org/base/buildpack-deps-scm/test.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
entrypoint: "/bin/sh"
|
||||
command: "git --version && hg --version"
|
||||
@@ -2,7 +2,11 @@ FROM {{ registry }}{{ organization }}/buildpack-deps-scm:{{ branch }}
|
||||
|
||||
MAINTAINER alt-cloud
|
||||
|
||||
{{ install_pakages(
|
||||
LABEL org.opencontainers.image.title="buildpack-deps"
|
||||
LABEL org.opencontainers.image.licenses="GPLv2"
|
||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
||||
|
||||
{{ install_packages(
|
||||
"ImageMagick",
|
||||
"autoconf",
|
||||
"automake",
|
||||
2
org/base/buildpack-deps/test.yaml
Normal file
2
org/base/buildpack-deps/test.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
entrypoint: "/bin/sh"
|
||||
command: "gcc --version && make --version"
|
||||
34
org/base/devel/Dockerfile.template
Normal file
34
org/base/devel/Dockerfile.template
Normal file
@@ -0,0 +1,34 @@
|
||||
FROM {{ registry }}{{ organization }}/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"]
|
||||
1
org/base/devel/test.yaml
Normal file
1
org/base/devel/test.yaml
Normal file
@@ -0,0 +1 @@
|
||||
man --version && ip -V && vim --version | grep vim
|
||||
16
org/base/distroless-builder/Dockerfile.template
Normal file
16
org/base/distroless-builder/Dockerfile.template
Normal file
@@ -0,0 +1,16 @@
|
||||
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 .
|
||||
3
org/base/distroless-builder/README.md
Normal file
3
org/base/distroless-builder/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
ALT dockerfile for distroless-builder image.
|
||||
|
||||
This image is used to build tarballs for distroless images.
|
||||
2
org/base/distroless-builder/test.yaml
Normal file
2
org/base/distroless-builder/test.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
entrypoint: "/bin/sh"
|
||||
command: "apt-repo --version"
|
||||
2
org/base/distroless-devel/test.yaml
Normal file
2
org/base/distroless-devel/test.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
entrypoint: "/bin/sh"
|
||||
command: "ss -V"
|
||||
2
org/base/distroless-gotop/test.yaml
Normal file
2
org/base/distroless-gotop/test.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
entrypoint: ""
|
||||
command: "--version"
|
||||
2
org/base/distroless-true/test.yaml
Normal file
2
org/base/distroless-true/test.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
entrypoint: ""
|
||||
command: "true"
|
||||
13
org/base/trivy/Dockerfile.template
Normal file
13
org/base/trivy/Dockerfile.template
Normal file
@@ -0,0 +1,13 @@
|
||||
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" ]
|
||||
10
org/base/trivy/README.md
Normal file
10
org/base/trivy/README.md
Normal file
@@ -0,0 +1,10 @@
|
||||
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`
|
||||
2
org/base/trivy/test.yaml
Normal file
2
org/base/trivy/test.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
entrypoint: "/bin/sh"
|
||||
command: "trivy --version"
|
||||
17
org/cert-manager/cert-manager-cainjector/Dockerfile.template
Normal file
17
org/cert-manager/cert-manager-cainjector/Dockerfile.template
Normal file
@@ -0,0 +1,17 @@
|
||||
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"]
|
||||
2
org/cert-manager/cert-manager-cainjector/test.yaml
Normal file
2
org/cert-manager/cert-manager-cainjector/test.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
entrypoint: "/bin/sh"
|
||||
command: "cainjector --help"
|
||||
17
org/cert-manager/cert-manager-controller/Dockerfile.template
Normal file
17
org/cert-manager/cert-manager-controller/Dockerfile.template
Normal file
@@ -0,0 +1,17 @@
|
||||
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"]
|
||||
2
org/cert-manager/cert-manager-controller/test.yaml
Normal file
2
org/cert-manager/cert-manager-controller/test.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
entrypoint: "/bin/sh"
|
||||
command: "controller --help"
|
||||
17
org/cert-manager/cert-manager-webhook/Dockerfile.template
Normal file
17
org/cert-manager/cert-manager-webhook/Dockerfile.template
Normal file
@@ -0,0 +1,17 @@
|
||||
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"]
|
||||
2
org/cert-manager/cert-manager-webhook/test.yaml
Normal file
2
org/cert-manager/cert-manager-webhook/test.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
entrypoint: "/bin/sh"
|
||||
command: "webhook --help"
|
||||
13
org/flannel/flannel-cni-plugin/Dockerfile.template
Normal file
13
org/flannel/flannel-cni-plugin/Dockerfile.template
Normal file
@@ -0,0 +1,13 @@
|
||||
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
|
||||
2
org/flannel/flannel-cni-plugin/test.yaml
Normal file
2
org/flannel/flannel-cni-plugin/test.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
entrypoint: ""
|
||||
command: "flannel"
|
||||
@@ -2,7 +2,13 @@ FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
||||
|
||||
MAINTAINER alt-cloud
|
||||
|
||||
{{ install_pakages(
|
||||
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(
|
||||
"iproute2",
|
||||
"net-tools",
|
||||
"ca-certificates",
|
||||
2
org/flannel/flannel/test.yaml
Normal file
2
org/flannel/flannel/test.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
entrypoint: "/bin/sh"
|
||||
command: "flanneld --version"
|
||||
@@ -1,11 +0,0 @@
|
||||
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"]
|
||||
1
org/k8s/cert-manager-cainjector/test
Normal file
1
org/k8s/cert-manager-cainjector/test
Normal file
@@ -0,0 +1 @@
|
||||
cainjector --help
|
||||
@@ -1,11 +0,0 @@
|
||||
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"]
|
||||
1
org/k8s/cert-manager-controller/test
Normal file
1
org/k8s/cert-manager-controller/test
Normal file
@@ -0,0 +1 @@
|
||||
controller --help
|
||||
@@ -1,11 +0,0 @@
|
||||
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"]
|
||||
1
org/k8s/cert-manager-webhook/test
Normal file
1
org/k8s/cert-manager-webhook/test
Normal file
@@ -0,0 +1 @@
|
||||
webhook --help
|
||||
@@ -2,6 +2,12 @@ FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
||||
|
||||
MAINTAINER alt-cloud
|
||||
|
||||
{{ install_pakages("coredns") }}
|
||||
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") }}
|
||||
|
||||
ENTRYPOINT ["/usr/bin/coredns"]
|
||||
|
||||
1
org/k8s/coredns/test
Normal file
1
org/k8s/coredns/test
Normal file
@@ -0,0 +1 @@
|
||||
coredns --version
|
||||
2
org/k8s/coredns/test.yaml
Normal file
2
org/k8s/coredns/test.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
entrypoint: "/bin/sh"
|
||||
command: "coredns --version"
|
||||
@@ -2,7 +2,13 @@ FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
||||
|
||||
MAINTAINER alt-cloud
|
||||
|
||||
{{ install_pakages("etcd") }}
|
||||
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") }}
|
||||
|
||||
VOLUME /data
|
||||
|
||||
|
||||
1
org/k8s/etcd/test
Normal file
1
org/k8s/etcd/test
Normal file
@@ -0,0 +1 @@
|
||||
etcd --version
|
||||
2
org/k8s/etcd/test.yaml
Normal file
2
org/k8s/etcd/test.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
entrypoint: "/bin/sh"
|
||||
command: "etcd --version"
|
||||
@@ -1,7 +0,0 @@
|
||||
FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
||||
|
||||
MAINTAINER alt-cloud
|
||||
|
||||
{{ install_pakages("cni-plugin-flannel") }}
|
||||
|
||||
RUN cp /usr/libexec/cni/flannel /flannel
|
||||
1
org/k8s/flannel/test
Normal file
1
org/k8s/flannel/test
Normal file
@@ -0,0 +1 @@
|
||||
flanneld --version
|
||||
@@ -2,6 +2,12 @@ FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
||||
|
||||
MAINTAINER alt-cloud
|
||||
|
||||
{{ install_pakages("kubernetes-master") }}
|
||||
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") }}
|
||||
|
||||
ENTRYPOINT ["/usr/bin/kube-apiserver"]
|
||||
|
||||
1
org/k8s/kube-apiserver/test
Normal file
1
org/k8s/kube-apiserver/test
Normal file
@@ -0,0 +1 @@
|
||||
kube-apiserver --version
|
||||
2
org/k8s/kube-apiserver/test.yaml
Normal file
2
org/k8s/kube-apiserver/test.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
entrypoint: "/bin/sh"
|
||||
command: "kube-apiserver --version"
|
||||
@@ -2,6 +2,12 @@ FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
||||
|
||||
MAINTAINER alt-cloud
|
||||
|
||||
{{ install_pakages("kubernetes-master") }}
|
||||
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") }}
|
||||
|
||||
ENTRYPOINT ["/usr/bin/kube-controller-manager"]
|
||||
|
||||
1
org/k8s/kube-controller-manager/test
Normal file
1
org/k8s/kube-controller-manager/test
Normal file
@@ -0,0 +1 @@
|
||||
kube-controller-manager --version
|
||||
2
org/k8s/kube-controller-manager/test.yaml
Normal file
2
org/k8s/kube-controller-manager/test.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
entrypoint: "/bin/sh"
|
||||
command: "kube-controller-manager --version"
|
||||
@@ -2,7 +2,13 @@ FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
||||
|
||||
MAINTAINER alt-cloud
|
||||
|
||||
{{ install_pakages("kubernetes-node") }}
|
||||
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") }}
|
||||
|
||||
RUN ln -s /usr/bin/kube-proxy /usr/local/bin/kube-proxy
|
||||
|
||||
|
||||
1
org/k8s/kube-proxy/test
Normal file
1
org/k8s/kube-proxy/test
Normal file
@@ -0,0 +1 @@
|
||||
kube-proxy --version
|
||||
2
org/k8s/kube-proxy/test.yaml
Normal file
2
org/k8s/kube-proxy/test.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
entrypoint: "/bin/sh"
|
||||
command: "kube-proxy --version"
|
||||
@@ -2,6 +2,12 @@ FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
||||
|
||||
MAINTAINER alt-cloud
|
||||
|
||||
{{ install_pakages("kubernetes-master") }}
|
||||
LABEL org.opencontainers.image.title="kube-scheduler"
|
||||
LABEL org.opencontainers.image.description="The Kubernetes scheduler is a control plane process which assigns Pods to Nodes."
|
||||
LABEL org.opencontainers.image.source="https://github.com/kubernetes/kubernetes"
|
||||
LABEL org.opencontainers.image.licenses="Apache-2.0"
|
||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
||||
|
||||
{{ install_packages("kubernetes-master") }}
|
||||
|
||||
ENTRYPOINT ["/usr/bin/kube-scheduler"]
|
||||
|
||||
1
org/k8s/kube-scheduler/test
Normal file
1
org/k8s/kube-scheduler/test
Normal file
@@ -0,0 +1 @@
|
||||
kube-scheduler --version
|
||||
2
org/k8s/kube-scheduler/test.yaml
Normal file
2
org/k8s/kube-scheduler/test.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
entrypoint: "/bin/sh"
|
||||
command: "kube-scheduler --version"
|
||||
@@ -1,6 +1,6 @@
|
||||
FROM {{ registry }}{{ alt_image }}:{{ branch }} as installer
|
||||
|
||||
{{ install_pakages("kubernetes-pause") }}
|
||||
{{ install_packages("kubernetes-pause") }}
|
||||
|
||||
FROM scratch
|
||||
|
||||
|
||||
2
org/k8s/pause/test.yaml
Normal file
2
org/k8s/pause/test.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
entrypoint: "/pause"
|
||||
command: "-v"
|
||||
@@ -2,7 +2,13 @@ FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
||||
|
||||
MAINTAINER alt-cloud
|
||||
|
||||
{{ install_pakages(
|
||||
LABEL org.opencontainers.image.title="trivy-node-collector"
|
||||
LABEL org.opencontainers.image.description="Open source collector who collect Node information (fs and process data) and output in a table/json format"
|
||||
LABEL org.opencontainers.image.source="https://github.com/aquasecurity/k8s-node-collector"
|
||||
LABEL org.opencontainers.image.licenses="Apache-2.0"
|
||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
||||
|
||||
{{ install_packages(
|
||||
"k8s-trivy-node-collector"
|
||||
) }}
|
||||
|
||||
|
||||
1
org/k8s/trivy-node-collector/test
Normal file
1
org/k8s/trivy-node-collector/test
Normal file
@@ -0,0 +1 @@
|
||||
node-collector --help
|
||||
2
org/k8s/trivy-node-collector/test.yaml
Normal file
2
org/k8s/trivy-node-collector/test.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
entrypoint: "/bin/sh"
|
||||
command: "node-collector --help"
|
||||
15
org/other/apache2/Dockerfile.template
Normal file
15
org/other/apache2/Dockerfile.template
Normal file
@@ -0,0 +1,15 @@
|
||||
FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
||||
|
||||
MAINTAINER alt-cloud
|
||||
|
||||
LABEL org.opencontainers.image.title="apache2"
|
||||
LABEL org.opencontainers.image.description="The most widely used Web server on the Internet"
|
||||
LABEL org.opencontainers.image.source="http://httpd.apache.org"
|
||||
LABEL org.opencontainers.image.licenses="Apache-2.0"
|
||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
||||
|
||||
{{ install_packages("apache2") }}
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["/usr/sbin/httpd2", "-D", "NO_DETACH", "-k", "start"]
|
||||
2
org/other/apache2/test.yaml
Normal file
2
org/other/apache2/test.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
entrypoint: "/bin/sh"
|
||||
command: "apachectl -v"
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user