Skip to content

Commit

Permalink
copy the cfn folder of paws collector as well
Browse files Browse the repository at this point in the history
  • Loading branch information
Rakhi Mundhada authored and Rakhi Mundhada committed Feb 12, 2024
1 parent e565db2 commit 568cba6
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,12 @@ package-all:
echo -e "\n************\n\n creaating package for $$d\n\n************\n\n"; \
make -C collectors/$$d package || exit 1; \
mkdir -p artifact_folder/$$d-collector; \
cp -r collectors/$$d/cfn collectors/$$d/al-$$d-collector.zip collectors/$$d/al-$$d-collector.json collectors/$$d/themis-template artifact_folder/$$d-collector/; \
cp -r collectors/$$d/cfn collectors/$$d/al-$$d-collector.zip collectors/$$d/al-$$d-collector.json artifact_folder/$$d-collector/; \
if [ -d "./collectors/$$d/themis-template" ]; then \
cp -r collectors/$$d/themis-template artifact_folder/$$d-collector/; \
fi; \
done;
cp -r cfn artifact_folder;

package: test package.zip

Expand Down
11 changes: 7 additions & 4 deletions build_collector.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
#!/bin/sh
COLLECTOR_NAME=$1

cd collectors/"$COLLECTOR_NAME" || exit 1
npm install || exit 1
make package || exit 1
cd collectors/"$COLLECTOR_NAME"
npm install
make package

mkdir -p "${COLLECTOR_NAME}"-collector
cp -r cfn al-"${COLLECTOR_NAME}"-collector.zip al-"${COLLECTOR_NAME}"-collector.json themis-template "${COLLECTOR_NAME}"-collector
cp -r cfn al-"${COLLECTOR_NAME}"-collector.zip al-"${COLLECTOR_NAME}"-collector.json "${COLLECTOR_NAME}"-collector
if [ -d "./themis-template" ]; then \
cp -r themis-template "${COLLECTOR_NAME}"-collector; \
fi; \
zip -r ../../"${COLLECTOR_NAME}"-collector.zip "${COLLECTOR_NAME}"-collector
14 changes: 7 additions & 7 deletions ps_spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ stages:
packagers:
- basic

- name: build-collector-carbonback
- name: build-collector-carbonblack
image: 422372788747.dkr.ecr.us-east-1.amazonaws.com/al-paws-collector-pipeline:latest
compute_size: small_arm
when:
Expand All @@ -84,7 +84,7 @@ stages:
ALPS_SERVICE_NAME: "paws-carbonblack-collector"
ALPS_SERVICE_VERSION: "1.0.52" #set the value from collector package json
outputs:
file: ./carbonback-collector*
file: ./carbonblack-collector*
packagers:
- basic

Expand Down Expand Up @@ -164,22 +164,22 @@ stages:
packagers:
- basic

- name: build-collector-gsuit
- name: build-collector-gsuite
image: 422372788747.dkr.ecr.us-east-1.amazonaws.com/al-paws-collector-pipeline:latest
compute_size: small_arm
when:
- pull_request:
trigger_phrase: build-collector-gsuit
trigger_phrase: build-collector-gsuite
- pull_request:
trigger_phrase: build-collectors
env:
ALPS_SERVICE_NAME: "paws-gsuit-collector"
ALPS_SERVICE_NAME: "paws-gsuite-collector"
ALPS_SERVICE_VERSION: "1.2.53" #set the value from collector package json
commands:
- source $NVM_DIR/nvm.sh && nvm use 18
- ./build_collector.sh gsuit
- ./build_collector.sh gsuite
outputs:
file: ./gsuit-collector*
file: ./gsuite-collector*
packagers:
- basic

Expand Down

0 comments on commit 568cba6

Please sign in to comment.