update(.circleci): split run steps for publishing artifacts

Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
This commit is contained in:
Leonardo Di Donato
2020-02-28 02:10:13 +01:00
committed by poiana
parent 8e92b588d5
commit eeea37a298

View File

@@ -145,33 +145,42 @@ jobs:
steps:
- attach_workspace:
at: /
- run:
name: Get version
command: |
export FALCO_VERSION=$(sed -e 's/^"//' -e 's/"$//' <<< $(cat /build/release/userspace/falco/config_falco.h | grep 'FALCO_VERSION ' | cut -d' ' -f3))
- run:
name: Create versions
command: |
jfrog bt vc falcosecurity/deb-dev/falco/${FALCO_VERSION} --desc="Falco (master)" --github-rel-notes=CHANGELOG.md --released=$(date -u +"%Y-%m-%dT%H:%M:%S.000Z") --vcs-tag=${CIRCLE_SHA1}
jfrog bt vc falcosecurity/rpm-dev/falco/${FALCO_VERSION} --desc="Falco (master)" --github-rel-notes=CHANGELOG.md --released=$(date -u +"%Y-%m-%dT%H:%M:%S.000Z") --vcs-tag=${CIRCLE_SHA1}
jfrog bt vc falcosecurity/bin-dev/falco/${FALCO_VERSION} --desc="Falco (master)" --github-rel-notes=CHANGELOG.md --released=$(date -u +"%Y-%m-%dT%H:%M:%S.000Z") --vcs-tag=${CIRCLE_SHA1}
- run:
name: Publish deb
command: |
FALCO_VERSION=$(sed -e 's/^"//' -e 's/"$//' <<< $(cat /build/release/userspace/falco/config_falco.h | grep 'FALCO_VERSION ' | cut -d' ' -f3))
jfrog bt vc falcosecurity/deb-dev/falco/${FALCO_VERSION} --desc="Falco (master)" --github-rel-notes=CHANGELOG.md --released=$(date -u +"%Y-%m-%dT%H:%M:%S.000Z") --vcs-tag=${CIRCLE_SHA1}
jfrog bt u /build/release/falco-${FALCO_VERSION}-x86_64.deb falcosecurity/deb-dev/falco/${FALCO_VERSION} stable/ --deb stable/main/amd64 --user poiana --key ${BINTRAY_SECRET} --publish
- run:
name: Publish rpm
command: |
FALCO_VERSION=$(sed -e 's/^"//' -e 's/"$//' <<< $(cat /build/release/userspace/falco/config_falco.h | grep 'FALCO_VERSION ' | cut -d' ' -f3))
jfrog bt vc falcosecurity/rpm-dev/falco/${FALCO_VERSION} --desc="Falco (master)" --github-rel-notes=CHANGELOG.md --released=$(date -u +"%Y-%m-%dT%H:%M:%S.000Z") --vcs-tag=${CIRCLE_SHA1}
jfrog bt u /build/release/falco-${FALCO_VERSION}-x86_64.rpm falcosecurity/rpm-dev/falco/${FALCO_VERSION} --user poiana --key ${BINTRAY_SECRET} --publish
- run:
name: Publish tgz
command: |
FALCO_VERSION=$(sed -e 's/^"//' -e 's/"$//' <<< $(cat /build/release/userspace/falco/config_falco.h | grep 'FALCO_VERSION ' | cut -d' ' -f3))
jfrog bt vc falcosecurity/bin-dev/falco/${FALCO_VERSION} --desc="Falco (master)" --github-rel-notes=CHANGELOG.md --released=$(date -u +"%Y-%m-%dT%H:%M:%S.000Z") --vcs-tag=${CIRCLE_SHA1}
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
# Publish docker packages
"publish/docker-dev":
docker:
- image: buildpack-deps:bionic
steps:
- run: Publish slim-dev
command: echo "slim-dev"
- run: Publish minimal-dev
command: echo "minimal-dev"
- run: Publish dev
command: echo "dev"
- run:
name: Publish slim-dev
command: echo "slim-dev"
- run:
name: Publish minimal-dev
command: echo "minimal-dev"
- run:
name: Publish dev
command: echo "dev"
# Publish the packages
"publish/packages":
docker:
@@ -179,6 +188,7 @@ jobs:
steps:
- attach_workspace:
at: /
- run:
- run:
name: Publish deb
command: |
@@ -199,13 +209,18 @@ jobs:
jfrog bt u /build/release/falco-${FALCO_VERSION}-x86_64.tar.gz falcosecurity/bin/falco/${FALCO_VERSION} x86_64/ --user poiana --key ${BINTRAY_SECRET} --publish
# Publish docker packages
"publish/docker":
docker:
- image: buildpack-deps:trusty
steps:
- run: Publish slim
command: echo "slim"
- run: Publish minimal
command: echo "minimal"
- run: Publish stable
command: echo "stable"
- run:
name: Publish slim
command: echo "slim"
- run:
name: Publish minimal
command: echo "minimal"
- run:
name: Publish stable
command: echo "stable"
workflows:
version: 2
build_and_test: