Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.

Commit 82ee154

Browse files
committed
⚡️ First shot
1 parent a327c2d commit 82ee154

File tree

2 files changed

+35
-4
lines changed

2 files changed

+35
-4
lines changed

.circleci/config.yml

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,22 @@ jobs:
4848
- ms-teams/report:
4949
only_on_fail: true
5050
webhook_url: $MS_TEAMS_WEBHOOK_URL
51-
build:
51+
build-container:
52+
docker:
53+
- image: cimg/base:stable-20.04
54+
steps:
55+
- checkout
56+
- setup_remote_docker
57+
- run:
58+
name: Build opencti/python-client
59+
command: |
60+
docker run --privileged --rm tonistiigi/binfmt --install all
61+
docker build -t opencti/client-python:${CIRCLE_TAG}
62+
echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
63+
docker tag opencti/client-python:${CIRCLE_TAG} opencti/client-python:latest
64+
docker push opencti/client-python:${CIRCLE_TAG}
65+
docker push opencti/client-python:latest
66+
build-library:
5267
working_directory: ~/opencti-client
5368
docker:
5469
- image: cimg/python:3.12
@@ -144,7 +159,13 @@ workflows:
144159
filters:
145160
tags:
146161
only: /.*/
147-
- build:
162+
- build-library:
163+
filters:
164+
tags:
165+
only: /[0-9]+(\.[0-9]+)+(\.[0-9]+)?\.?(\w)*/
166+
branches:
167+
ignore: /.*/
168+
- build-container:
148169
filters:
149170
tags:
150171
only: /[0-9]+(\.[0-9]+)+(\.[0-9]+)?\.?(\w)*/
@@ -155,15 +176,15 @@ workflows:
155176
- linter
156177
- deploy:
157178
requires:
158-
- build
179+
- build-library
159180
filters:
160181
tags:
161182
only: /[0-9]+(\.[0-9]+)+(\.[0-9]+)?\.?(\w)*/
162183
branches:
163184
ignore: /.*/
164185
- notify_rolling:
165186
requires:
166-
- build
187+
- build-library
167188
- notify:
168189
requires:
169190
- deploy

Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
ARG BASE_IMAGE="python:3.12-alpine3.20"
2+
FROM ${BASE_IMAGE}
3+
4+
# Install Python modules
5+
# hadolint ignore=DL3003
6+
COPY ./requirements.txt /opt/requirements.txt
7+
8+
RUN apk --no-cache add git build-base libmagic libffi-dev && \
9+
pip3 install --no-cache-dir -r /opt/requirements.txt && \
10+
apk del git build-base && rm /opt/requirements.txt

0 commit comments

Comments
 (0)