Compare commits
94 Commits
Author | SHA1 | Date | |
---|---|---|---|
90ff275009 | |||
3cb889958f | |||
eda31085fb | |||
9978a86d47 | |||
3afd8bc54e | |||
a12660480b | |||
380a0edde2 | |||
350b30deb8 | |||
fa91af9346 | |||
b2405d1e94 | |||
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 | |||
55d9707d24 | |||
4250455f66 | |||
d54807cce9 | |||
2b7e1fec89 |
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 }}
|
@ -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 }}"
|
@ -6,72 +6,54 @@
|
||||
#$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)
|
||||
for IM in $(ls $5/org/$2/ | 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
|
||||
if test -f $5/org/$2/$IM/test
|
||||
then
|
||||
test=$(cat $5/org/$2/$IM/test)
|
||||
else test=''
|
||||
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"
|
||||
echo "test script=$test"
|
||||
imgpath="$2/$IM:$1"
|
||||
|
||||
if [[ $2 == 'k8s' ]]
|
||||
then imgpath="$2-$1/$IM:latest"
|
||||
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
|
||||
|
||||
command="echo empty_command"
|
||||
if [[ $test != '' ]]; then
|
||||
command="podman run --rm --entrypoint=\"/bin/sh\" $3/$4/$imgpath -c \"$test\""
|
||||
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"
|
||||
if [[ $IM = 'distroless-true' ]]; then
|
||||
command="podman run --rm $3/$4/$imgpath \"true\""
|
||||
fi
|
||||
if [[ $IM = 'distroless-gotop' ]]; then
|
||||
command="podman run --rm $3/$4/$imgpath \"--version\""
|
||||
fi
|
||||
if [[ $IM = 'flannel-cni-plugin' ]]; then
|
||||
command="podman run --rm $3/$4/$imgpath \"/flannel\""
|
||||
fi
|
||||
if [[ $IM = 'pause' ]]; then
|
||||
command="podman run --rm $3/$4/$imgpath \"/pause\" \"-v\""
|
||||
fi
|
||||
fi
|
||||
|
||||
echo $command
|
||||
eval $command 2>$IM.log || haserr=true
|
||||
|
||||
echo "podman rmi --all"
|
||||
podman rmi --all
|
||||
|
||||
if [ "$haserr" = true ]
|
||||
then
|
||||
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
|
||||
haserr=false
|
||||
done
|
||||
|
||||
|
142
.gitea/workflows/wf.yaml
Normal file
142
.gitea/workflows/wf.yaml
Normal file
@ -0,0 +1,142 @@
|
||||
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
|
||||
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"
|
||||
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: |
|
||||
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
|
||||
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:
|
||||
needs: build-process
|
||||
runs-on: alt-latest
|
||||
outputs:
|
||||
testres: ${{ steps.test-script.outcome == 'success' || steps.special-test.outcome == 'success' }}
|
||||
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: Run test
|
||||
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 }}
|
||||
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 ]
|
||||
runs-on: alt-latest
|
||||
steps:
|
||||
- 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
|
||||
- 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 }} ]]; 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 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.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 }}
|
@ -2,10 +2,7 @@ name: Full building alt images
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*_*'
|
||||
tags-ignore:
|
||||
- '*_k8s'
|
||||
- 'sisyphus_*'
|
||||
- '*10*_*'
|
||||
|
||||
jobs:
|
||||
build-process:
|
||||
@ -15,7 +12,6 @@ jobs:
|
||||
org: ${{ env.ORG }}
|
||||
url: ${{ env.URL }}
|
||||
repo: ${{ env.REPO }}
|
||||
ws: ${{ env.WS }}
|
||||
buildres: ${{ steps.build-script.outcome }}
|
||||
steps:
|
||||
- name: Check workspace
|
||||
@ -25,28 +21,22 @@ jobs:
|
||||
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
|
||||
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 python3-module-tomli python3-module-jinja2 podman buildah jq curl apt-repo"
|
||||
apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah jq curl apt-repo
|
||||
#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
|
||||
echo "apt-repo add 345290 && apt-get update"
|
||||
apt-repo add 345290 && apt-get update
|
||||
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
|
||||
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
|
||||
@ -57,139 +47,90 @@ jobs:
|
||||
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"
|
||||
echo "ORG=$org"
|
||||
- name: Login podman gitea
|
||||
run: |
|
||||
echo "podman login ${{ env.URL }}"
|
||||
podman login --username $P_USER --password $P_PASS ${{ env.URL }}
|
||||
podman login --username $P_USER --password $P_PASS ${{ env.URL }}
|
||||
env:
|
||||
P_USER: ${{ secrets.PODMAN_USER }}
|
||||
P_PASS: ${{ secrets.PODMAN_PASS }}
|
||||
- name: Run standart building script
|
||||
- name: Run building script
|
||||
id: build-script
|
||||
run: |
|
||||
build_args="-b $BR -o $ORG --skip-images base/distroless-devel --registry $URL/$REPO/$BR -a amd64"
|
||||
build_args="-b $BR -o $ORG"
|
||||
#-o $ORG --skip-images alt/distroless-devel
|
||||
if [[ $BR == 'sisyphus' ]]; then build_args="$build_args --skip-arches arm"; fi
|
||||
if [[ $ORG == 'k8s' ]]; then build_args="$build_args --tags tags.toml --overwrite-organization $ORG-$BR"; fi
|
||||
echo "build.py $build_args"
|
||||
${{ gitea.workspace }}/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"
|
||||
issueid=$(curl -X 'GET' "$URL/api/v1/repos/$REPO/gitea-image-forge/issues?state=open&labels=building&type=issues&page=1&limit=1&token=$T" -H 'accept: application/json' -s | jq '.[].number' -r)
|
||||
if [[ $issueid != '' ]]; then \
|
||||
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"; \
|
||||
else echo "no issue to send notification"; fi
|
||||
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"
|
||||
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 }}
|
||||
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
|
||||
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: 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
|
||||
- name: Test
|
||||
id: test-script
|
||||
continue-on-error: true
|
||||
run: |
|
||||
$WS/.gitea/workflows/testscript $BR $ORG $URL $REPO $GWS
|
||||
$WS/.gitea/workflows/testscript $BR $ORG $URL $REPO $WS
|
||||
cat haserr.log >> ${GITHUB_ENV}
|
||||
echo "test process finished"
|
||||
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"
|
||||
issueid=$(curl -X 'GET' "$URL/api/v1/repos/$REPO/gitea-image-forge/issues?state=open&labels=building&type=issues&page=1&limit=1&token=$T" -H 'accept: application/json' -s | jq '.[].number' -r)
|
||||
if [[ $issueid != '' ]]; then \
|
||||
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"; \
|
||||
else echo "no issue to send notification"; fi
|
||||
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
|
||||
|
@ -54,7 +54,9 @@ jobs:
|
||||
- name: Run building script
|
||||
id: build-script
|
||||
run: |
|
||||
build_args="-b $BR -o $ORG --skip-images alt/distroless-devel"
|
||||
build_args="-b $BR -o $ORG"
|
||||
#-o $ORG --skip-images alt/distroless-devel
|
||||
if [[ $BR == 'sisyphus' ]]; then build_args="$build_args --skip-arches arm"; fi
|
||||
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
|
||||
@ -65,10 +67,12 @@ jobs:
|
||||
- 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"
|
||||
issueid=$(curl -X 'GET' "$URL/api/v1/repos/$REPO/gitea-image-forge/issues?state=open&labels=building&type=issues&page=1&limit=1&token=$T" -H 'accept: application/json' -s | jq '.[].number' -r)
|
||||
if [[ $issueid != '' ]]; then \
|
||||
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"; \
|
||||
else echo "no issue to send notification"; fi
|
||||
env:
|
||||
T: ${{ secrets.TOKEN }}
|
||||
BR: ${{ env.BRANCH }}
|
||||
@ -77,7 +81,7 @@ jobs:
|
||||
- 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
|
||||
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 }}
|
||||
@ -114,11 +118,13 @@ jobs:
|
||||
- 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"
|
||||
issueid=$(curl -X 'GET' "$URL/api/v1/repos/$REPO/gitea-image-forge/issues?state=open&labels=building&type=issues&page=1&limit=1&token=$T" -H 'accept: application/json' -s | jq '.[].number' -r)
|
||||
if [[ $issueid != '' ]]; then \
|
||||
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"; \
|
||||
else echo "no issue to send notification"; fi
|
||||
env:
|
||||
T: ${{ secrets.TOKEN }}
|
||||
BR: ${{ needs.build-process.outputs.branch }}
|
||||
|
@ -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
|
21
.gitea/workflows/wf_test.yaml
Normal file
21
.gitea/workflows/wf_test.yaml
Normal file
@ -0,0 +1,21 @@
|
||||
name: Test job
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'test*'
|
||||
|
||||
jobs:
|
||||
test-job:
|
||||
runs-on: alt-latest
|
||||
steps:
|
||||
- name: Parse target branch
|
||||
run: |
|
||||
echo $EV
|
||||
echo $RE
|
||||
echo $RE2
|
||||
echo $BR
|
||||
env:
|
||||
EV: ${{ toJson(gitea.event) }}
|
||||
RE: ${{ github.ref_name }}
|
||||
RE2: ${{ github.ref }}
|
||||
BR: ${{ github.head_ref }}
|
50
build.py
50
build.py
@ -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()
|
||||
|
||||
|
9
org/alt/apache2/Dockerfile.template
Normal file
9
org/alt/apache2/Dockerfile.template
Normal 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
1
org/alt/apache2/test
Normal file
@ -0,0 +1 @@
|
||||
apachectl -v
|
@ -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"]
|
1
org/alt/base/test
Normal file
1
org/alt/base/test
Normal file
@ -0,0 +1 @@
|
||||
LC_ALL=ru_RU.UTF-8 TZ=/usr/share/zoneinfo/Europe/Moscow date| grep MSK
|
10
org/alt/buildpack-deps-curl/Dockerfile.template
Normal file
10
org/alt/buildpack-deps-curl/Dockerfile.template
Normal file
@ -0,0 +1,10 @@
|
||||
FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
||||
|
||||
MAINTAINER alt-cloud
|
||||
|
||||
{{ install_pakages(
|
||||
"ca-certificates",
|
||||
"curl",
|
||||
"gnupg",
|
||||
"wget"
|
||||
) }}
|
1
org/alt/buildpack-deps-curl/test
Normal file
1
org/alt/buildpack-deps-curl/test
Normal file
@ -0,0 +1 @@
|
||||
curl --version;gpg --version
|
12
org/alt/buildpack-deps-scm/Dockerfile.template
Normal file
12
org/alt/buildpack-deps-scm/Dockerfile.template
Normal file
@ -0,0 +1,12 @@
|
||||
FROM {{ registry }}{{ organization }}/buildpack-deps-curl:{{ branch }}
|
||||
|
||||
MAINTAINER alt-cloud
|
||||
|
||||
|
||||
{{ install_pakages(
|
||||
"git",
|
||||
"mercurial",
|
||||
"openssh-clients",
|
||||
"procps",
|
||||
"subversion"
|
||||
) }}
|
1
org/alt/buildpack-deps-scm/test
Normal file
1
org/alt/buildpack-deps-scm/test
Normal file
@ -0,0 +1 @@
|
||||
git --version;hg --version
|
@ -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",
|
1
org/alt/buildpack-deps/test
Normal file
1
org/alt/buildpack-deps/test
Normal file
@ -0,0 +1 @@
|
||||
gcc --version;make --version
|
29
org/alt/devel/Dockerfile.template
Normal file
29
org/alt/devel/Dockerfile.template
Normal 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"]
|
1
org/alt/devel/test
Normal file
1
org/alt/devel/test
Normal file
@ -0,0 +1 @@
|
||||
man --version;ip -V;vim --version | grep vim
|
@ -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")}}',
|
11
org/alt/distroless-builder/Dockerfile.template
Normal file
11
org/alt/distroless-builder/Dockerfile.template
Normal 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 .
|
3
org/alt/distroless-builder/README.md
Normal file
3
org/alt/distroless-builder/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
ALT dockerfile for distroless-builder image.
|
||||
|
||||
This images is using to build tarball for distroless images.
|
1
org/alt/distroless-builder/test
Normal file
1
org/alt/distroless-builder/test
Normal file
@ -0,0 +1 @@
|
||||
apt-repo --version
|
@ -1,4 +1,4 @@
|
||||
from = "{{ registry }}base/distroless-base:{{ branch }}"
|
||||
from = "{{ registry }}{{ organization }}/distroless-base:{{ branch }}"
|
||||
builder-install-packages = [
|
||||
"coreutils",
|
||||
"findutils",
|
1
org/alt/distroless-devel/test
Normal file
1
org/alt/distroless-devel/test
Normal file
@ -0,0 +1 @@
|
||||
ss -V
|
3
org/alt/distroless-gotop/distroless.toml
Normal file
3
org/alt/distroless-gotop/distroless.toml
Normal file
@ -0,0 +1,3 @@
|
||||
from = "{{ registry }}{{ organization }}/distroless-base:{{ branch }}"
|
||||
full-files = ["/usr/bin/gotop"]
|
||||
entrypoint = ["/usr/bin/gotop"]
|
3
org/alt/distroless-true/distroless.toml
Normal file
3
org/alt/distroless-true/distroless.toml
Normal file
@ -0,0 +1,3 @@
|
||||
from = "{{ registry }}{{ organization }}/distroless-static:{{ branch }}"
|
||||
files = ["/bin/true"]
|
||||
cmd = ["/bin/true"]
|
9
org/alt/etcd/Dockerfile.template
Normal file
9
org/alt/etcd/Dockerfile.template
Normal 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"]
|
1
org/alt/etcd/test
Normal file
1
org/alt/etcd/test
Normal file
@ -0,0 +1 @@
|
||||
etcdctl version
|
21
org/alt/gitea/Dockerfile.template
Normal file
21
org/alt/gitea/Dockerfile.template
Normal 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
1
org/alt/gitea/test
Normal file
@ -0,0 +1 @@
|
||||
gitea --version
|
@ -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 .
|
||||
|
1
org/alt/nginx/test
Normal file
1
org/alt/nginx/test
Normal file
@ -0,0 +1 @@
|
||||
nginx -v
|
12
org/alt/node/Dockerfile.template
Normal file
12
org/alt/node/Dockerfile.template
Normal 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"
|
||||
) }}
|
1
org/alt/node/test
Normal file
1
org/alt/node/test
Normal file
@ -0,0 +1 @@
|
||||
node -v
|
11
org/alt/prometheus/Dockerfile.template
Normal file
11
org/alt/prometheus/Dockerfile.template
Normal 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"]
|
1
org/alt/prometheus/test
Normal file
1
org/alt/prometheus/test
Normal file
@ -0,0 +1 @@
|
||||
prometheus --version
|
12
org/alt/python/Dockerfile.template
Normal file
12
org/alt/python/Dockerfile.template
Normal 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
1
org/alt/python/test
Normal file
@ -0,0 +1 @@
|
||||
python3 --version
|
15
org/alt/registry/Dockerfile.template
Normal file
15
org/alt/registry/Dockerfile.template
Normal 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"]
|
1
org/alt/registry/test
Normal file
1
org/alt/registry/test
Normal file
@ -0,0 +1 @@
|
||||
registry --version
|
7
org/alt/ruby/Dockerfile.template
Normal file
7
org/alt/ruby/Dockerfile.template
Normal file
@ -0,0 +1,7 @@
|
||||
FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
||||
|
||||
MAINTAINER alt-cloud
|
||||
|
||||
{{ install_pakages("irb") }}
|
||||
|
||||
CMD ["irb"]
|
1
org/alt/ruby/test
Normal file
1
org/alt/ruby/test
Normal file
@ -0,0 +1 @@
|
||||
ruby --version
|
@ -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/; \
|
1
org/alt/systemd/test
Normal file
1
org/alt/systemd/test
Normal file
@ -0,0 +1 @@
|
||||
ls -la /sbin/init | grep systemd
|
@ -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 \
|
1
org/alt/unit/test
Normal file
1
org/alt/unit/test
Normal file
@ -0,0 +1 @@
|
||||
unitd --version
|
@ -1,2 +0,0 @@
|
||||
entrypoint: "/bin/sh"
|
||||
command: "LC_ALL=ru_RU.UTF-8 TZ=/usr/share/zoneinfo/Europe/Moscow date| grep MSK"
|
@ -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"
|
||||
) }}
|
@ -1,2 +0,0 @@
|
||||
entrypoint: "/bin/sh"
|
||||
command: "curl --version && gpg --version"
|
@ -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"
|
||||
) }}
|
@ -1,2 +0,0 @@
|
||||
entrypoint: "/bin/sh"
|
||||
command: "git --version && hg --version"
|
@ -1,2 +0,0 @@
|
||||
entrypoint: "/bin/sh"
|
||||
command: "gcc --version && make --version"
|
@ -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"]
|
@ -1 +0,0 @@
|
||||
man --version && ip -V && vim --version | grep vim
|
@ -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 .
|
@ -1,3 +0,0 @@
|
||||
ALT dockerfile for distroless-builder image.
|
||||
|
||||
This image is used to build tarballs for distroless images.
|
@ -1,2 +0,0 @@
|
||||
entrypoint: "/bin/sh"
|
||||
command: "apt-repo --version"
|
@ -1,2 +0,0 @@
|
||||
entrypoint: "/bin/sh"
|
||||
command: "ss -V"
|
@ -1,3 +0,0 @@
|
||||
from = "{{ registry }}base/distroless-base:{{ branch }}"
|
||||
full-files = ["/usr/bin/gotop"]
|
||||
entrypoint = ["/usr/bin/gotop"]
|
@ -1,2 +0,0 @@
|
||||
entrypoint: ""
|
||||
command: "--version"
|
@ -1,3 +0,0 @@
|
||||
from = "{{ registry }}base/distroless-static:{{ branch }}"
|
||||
files = ["/bin/true"]
|
||||
cmd = ["/bin/true"]
|
@ -1,2 +0,0 @@
|
||||
entrypoint: ""
|
||||
command: "true"
|
@ -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" ]
|
@ -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`
|
@ -1,2 +0,0 @@
|
||||
entrypoint: "/bin/sh"
|
||||
command: "trivy --version"
|
@ -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"]
|
@ -1,2 +0,0 @@
|
||||
entrypoint: "/bin/sh"
|
||||
command: "cainjector --help"
|
@ -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"]
|
@ -1,2 +0,0 @@
|
||||
entrypoint: "/bin/sh"
|
||||
command: "controller --help"
|
@ -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"]
|
@ -1,2 +0,0 @@
|
||||
entrypoint: "/bin/sh"
|
||||
command: "webhook --help"
|
@ -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
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user