@@ -3,6 +3,8 @@ version: 2.1
33orbs :
4455 ms-teams :
cloudradar-monitoring/[email protected] 6+ env :
7+ BASE_REPO : opencti
68jobs :
79 ensure_formatting :
810 docker :
@@ -48,27 +50,76 @@ jobs:
4850 - ms-teams/report :
4951 only_on_fail : true
5052 webhook_url : $MS_TEAMS_WEBHOOK_URL
51- build-container :
53+ build-container-python-3-11 :
5254 docker :
5355 - image : cimg/base:stable-20.04
5456 steps :
5557 - checkout
5658 - setup_remote_docker
5759 - run :
58- name : Build opencti/python-client
60+ name : Build opencti/python-client-container
5961 command : |
6062 docker run --privileged --rm tonistiigi/binfmt --install all
6163 CIRCLE_TAG=${CIRCLE_TAG:-nightly}
6264 echo "CIRCLE_TAG=${CIRCLE_TAG}"
63- BASE_REPO="opencti"
6465 echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
6566 docker buildx create --platform linux/amd64,linux/arm64 --use --name mybuilder || true
6667 docker buildx inspect mybuilder --bootstrap
6768 docker buildx build . \
6869 --platform linux/amd64,linux/arm64 \
69- -t $BASE_REPO/client-python:${CIRCLE_TAG} \
70- -t $BASE_REPO/client-python:latest \
71- --push
70+ -t ${{ env.BASE_REPO }}/client-python-3-11:${CIRCLE_TAG} \
71+ -t ${{ env.BASE_REPO }}client-python-3-11:latest \
72+ --build-arg BASE_IMAGE="python:3.11-alpine3.20" \
73+
74+ - name : Run Trivy vulnerability scanner
75+ uses :
aquasecurity/[email protected] 76+ with :
77+ image-ref : ${{ env.BASE_REPO }}/client-python-3-11:latest
78+ format : ' table'
79+ exit-code : ' 1'
80+ ignore-unfixed : true
81+ vuln-type : ' os,library'
82+ severity : ' CRITICAL,HIGH'
83+
84+ - run :
85+ name : Push image to regsitry
86+ command : docker push ${{ env.BASE_REPO }}/client-python-3-11:latest --all-tags
87+
88+ build-container-python-3-12 :
89+ docker :
90+ - image : cimg/base:stable-20.04
91+ steps :
92+ - checkout
93+ - setup_remote_docker
94+ - run :
95+ name : Build opencti/python-client
96+ command : |
97+ docker run --privileged --rm tonistiigi/binfmt --install all
98+ CIRCLE_TAG=${CIRCLE_TAG:-nightly}
99+ echo "CIRCLE_TAG=${CIRCLE_TAG}"
100+ echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
101+ docker buildx create --platform linux/amd64,linux/arm64 --use --name mybuilder || true
102+ docker buildx inspect mybuilder --bootstrap
103+ docker buildx build . \
104+ --platform linux/amd64,linux/arm64 \
105+ -t ${{ env.BASE_REPO }}/client-python-3-12:${CIRCLE_TAG} \
106+ -t ${{ env.BASE_REPO }}/client-python-3-12:latest \
107+ --build-arg BASE_IMAGE="python:3.12-alpine3.20" \
108+
109+ - name : Run Trivy vulnerability scanner
110+ uses :
aquasecurity/[email protected] 111+ with :
112+ image-ref : ${{ env.BASE_REPO }}/client-python-3-11:latest
113+ format : ' table'
114+ exit-code : ' 1'
115+ ignore-unfixed : true
116+ vuln-type : ' os,library'
117+ severity : ' CRITICAL,HIGH'
118+
119+ - run :
120+ name : Push image to regsitry
121+ command : docker push ${{ env.BASE_REPO }}/client-python-3-12:latest --all-tags
122+
72123 build-library :
73124 working_directory : ~/opencti-client
74125 docker :
0 commit comments