Skip to content

Commit 61fb591

Browse files
committed
[collectors] Try to use release/current for pyobas
1 parent 57ed74e commit 61fb591

File tree

2 files changed

+28
-16
lines changed

2 files changed

+28
-16
lines changed

.circleci/config.yml

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,6 @@ jobs:
2525
- slack/notify:
2626
event: fail
2727
template: basic_fail_1
28-
linter:
29-
docker:
30-
- image: alpine/flake8
31-
working_directory: ~/repo
32-
steps:
33-
- checkout
34-
- run: apk update && apk upgrade && apk --no-cache add curl gettext bash
35-
- run:
36-
name: flake8
37-
command: flake8 --ignore=E,W ~/repo
38-
- slack/notify:
39-
event: fail
40-
template: basic_fail_1
4128
test:
4229
working_directory: ~/openbas
4330
docker:
@@ -48,11 +35,34 @@ jobs:
4835
- run:
4936
working_directory: ~/openbas/crowdstrike
5037
name: Install dependencies for crowdstrike collector
51-
command: pip install -r requirements.txt
38+
command: |
39+
CIRCLE_BRANCH_EXISTS=$(git ls-remote --heads https://github.com/OpenBAS-Platform/client-python.git ${CIRCLE_BRANCH} | wc -l)
40+
41+
if [ "CIRCLE_BRANCH_EXISTS" -eq "1" ]; then
42+
TARGET_BRANCH=${CIRCLE_BRANCH}
43+
else
44+
TARGET_BRANCH="release/current"
45+
fi
46+
47+
sed -i "s|^pyobas.*$|pyobas @ git+https://github.com/OpenBAS-Platform/client-python.git@${TARGET_BRANCH}|" requirements.txt
48+
pip install -r requirements.txt
5249
- run:
5350
working_directory: ~/openbas/crowdstrike
5451
name: Tests for crowdstrike collector
5552
command: python -m unittest
53+
linter:
54+
docker:
55+
- image: alpine/flake8
56+
working_directory: ~/repo
57+
steps:
58+
- checkout
59+
- run: apk update && apk upgrade && apk --no-cache add curl gettext bash
60+
- run:
61+
name: flake8
62+
command: flake8 --ignore=E,W ~/repo
63+
- slack/notify:
64+
event: fail
65+
template: basic_fail_1
5666
build_1:
5767
working_directory: ~/openbas
5868
docker:
@@ -290,6 +300,7 @@ workflows:
290300
requires:
291301
- ensure_formatting
292302
- linter
303+
- test
293304
filters:
294305
branches:
295306
only:
@@ -298,6 +309,7 @@ workflows:
298309
requires:
299310
- ensure_formatting
300311
- linter
312+
- test
301313
filters:
302314
branches:
303315
only:

crowdstrike/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
pyobas==1.15.1
2-
crowdstrike-falconpy==1.4.8
3-
pydantic==2.11.3
2+
crowdstrike-falconpy==1.4.9
3+
pydantic==2.11.3

0 commit comments

Comments
 (0)