mirror of
https://github.com/falcosecurity/falco.git
synced 2025-07-23 10:50:43 +00:00
update(.circleci): cleanup/packages-dev job
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
This commit is contained in:
parent
2880bb1f23
commit
cd449cb89b
@ -16,6 +16,9 @@ get_versions() {
|
|||||||
IFS=$'\n' read -r -d '' -a all < <(curl -s --header "Content-Type: application/json" "https://api.bintray.com/packages/falcosecurity/$1/falco" | jq -r '.versions | .[]' | tail -n "+$2")
|
IFS=$'\n' read -r -d '' -a all < <(curl -s --header "Content-Type: application/json" "https://api.bintray.com/packages/falcosecurity/$1/falco" | jq -r '.versions | .[]' | tail -n "+$2")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Remove all the versions (${all[@]} array).
|
||||||
|
#
|
||||||
|
# $1: repository containing the versions.
|
||||||
rem_versions() {
|
rem_versions() {
|
||||||
for i in "${!all[@]}";
|
for i in "${!all[@]}";
|
||||||
do
|
do
|
||||||
@ -54,5 +57,5 @@ if [[ "${repo}" == "bin-dev" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
get_versions "${repo}" ${skip}
|
get_versions "${repo}" ${skip}
|
||||||
echo "# versions: ${#all[@]}"
|
echo "number of versions to delete: ${#all[@]}"
|
||||||
rem_versions "${repo}"
|
rem_versions "${repo}"
|
@ -271,6 +271,28 @@ jobs:
|
|||||||
command: |
|
command: |
|
||||||
FALCO_VERSION=$(cat /build/release/userspace/falco/config_falco.h | grep 'FALCO_VERSION ' | cut -d' ' -f3 | sed -e 's/^"//' -e 's/"$//')
|
FALCO_VERSION=$(cat /build/release/userspace/falco/config_falco.h | grep 'FALCO_VERSION ' | cut -d' ' -f3 | sed -e 's/^"//' -e 's/"$//')
|
||||||
jfrog bt u /build/release/falco-${FALCO_VERSION}-x86_64.tar.gz falcosecurity/bin-dev/falco/${FALCO_VERSION} x86_64/ --user poiana --key ${BINTRAY_SECRET} --publish --override
|
jfrog bt u /build/release/falco-${FALCO_VERSION}-x86_64.tar.gz falcosecurity/bin-dev/falco/${FALCO_VERSION} x86_64/ --user poiana --key ${BINTRAY_SECRET} --publish --override
|
||||||
|
# Clenup the Falco development release packages
|
||||||
|
"cleanup/packages-dev":
|
||||||
|
docker:
|
||||||
|
- image: docker.bintray.io/jfrog/jfrog-cli-go:latest
|
||||||
|
steps:
|
||||||
|
- run:
|
||||||
|
name: Prepare env
|
||||||
|
command: |
|
||||||
|
apk add --no-cache --update
|
||||||
|
apk add curl jq
|
||||||
|
- run:
|
||||||
|
name: Only keep the 10 most recet Falco development release tarballs
|
||||||
|
command: |
|
||||||
|
.circleci/cleanup -p ${BINTRAY_SECRET} -r bin-dev
|
||||||
|
- run:
|
||||||
|
name: Only keep the 50 most recent Falco development release RPMs
|
||||||
|
command: |
|
||||||
|
.circleci/cleanup -p ${BINTRAY_SECRET} -r rpm-dev
|
||||||
|
- run:
|
||||||
|
name: Only keep the 50 most recent Falco development release DEBs
|
||||||
|
command: |
|
||||||
|
.circleci/cleanup -p ${BINTRAY_SECRET} -r deb-dev
|
||||||
# Publish docker packages
|
# Publish docker packages
|
||||||
"publish/docker-dev":
|
"publish/docker-dev":
|
||||||
docker:
|
docker:
|
||||||
@ -402,6 +424,15 @@ workflows:
|
|||||||
only: master
|
only: master
|
||||||
requires:
|
requires:
|
||||||
- "rpm/sign"
|
- "rpm/sign"
|
||||||
|
- "cleanup/packages-dev":
|
||||||
|
context: falco
|
||||||
|
filters:
|
||||||
|
tags:
|
||||||
|
ignore: /.*/
|
||||||
|
branches:
|
||||||
|
only: master
|
||||||
|
requires:
|
||||||
|
- "publish/packages-dev"
|
||||||
- "publish/docker-dev":
|
- "publish/docker-dev":
|
||||||
context: falco
|
context: falco
|
||||||
filters:
|
filters:
|
||||||
|
Loading…
Reference in New Issue
Block a user