From 1b92cbaaf67e30a0578ca3d06722cbda9a32bdab Mon Sep 17 00:00:00 2001 From: Samuel Hassine Date: Wed, 18 Oct 2023 00:45:25 +0200 Subject: [PATCH] [integration] Enhance CI/CD for deployment --- .circleci/config.yml | 128 +------------------------------------------ 1 file changed, 1 insertion(+), 127 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 171578c896d1..eb15b877f3a7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -156,94 +156,6 @@ jobs: only_on_fail: true webhook_url: $MS_TEAMS_WEBHOOK_URL - deploy_demo: - working_directory: ~/opencti - docker: - - image: circleci/node:current - resource_class: medium+ - steps: - - attach_workspace: - at: ~/ - - add_ssh_keys - - run: ssh-keyscan -H opencti.io >> ~/.ssh/known_hosts - - run: sudo apt-get update -qq && sudo apt install rsync curl - - run: mkdir deploy - - run: git config --global user.email "ci@opencti.io" && git config --global user.name "OpenCTI CircleCI" - - run: - working_directory: ~/opencti/deploy - command: git clone ssh://opencti-fiqid45E@opencti.io:/~/opencti-fiqid45E.git . - - run: - working_directory: ~/opencti/deploy - command: git submodule init && git submodule update --remote - - run: - working_directory: ~/opencti/deploy - command: git remote add ci ~/opencti && git pull --no-edit -s recursive -X theirs ci master - - run: - working_directory: ~/opencti/deploy - command: rsync -av --delete ~/opencti/opencti-platform/opencti-graphql/public/ ./opencti-platform/opencti-graphql/public/ - - run: - working_directory: ~/opencti/deploy - command: rsync -av --delete ~/opencti/opencti-platform/opencti-graphql/build/ ./opencti-platform/opencti-graphql/build/ - - run: - working_directory: ~/opencti/deploy - command: rsync -av ./opencti-connectors/ ./opencti-connectors-enabled/ - - run: - working_directory: ~/opencti/deploy - command: git add -A && git add -f ./opencti-platform/opencti-graphql/public && git add -f ./opencti-platform/opencti-graphql/build - - run: - working_directory: ~/opencti/deploy - command: git diff-index --quiet HEAD || git commit -a -m "[CircleCI-Workflow] Deploy new version" && git push origin master - - slack/notify: - event: fail - template: basic_fail_1 - - ms-teams/report: - only_on_fail: true - webhook_url: $MS_TEAMS_WEBHOOK_URL - - deploy_reference: - working_directory: ~/opencti - docker: - - image: circleci/node:current - resource_class: medium+ - steps: - - attach_workspace: - at: ~/ - - add_ssh_keys - - run: ssh-keyscan -H opencti.io >> ~/.ssh/known_hosts - - run: sudo apt-get update -qq && sudo apt install rsync curl - - run: mkdir -p deploy - - run: git config --global user.email "ci@opencti.io" && git config --global user.name "OpenCTI CircleCI" - - run: - working_directory: ~/opencti/deploy - command: git clone ssh://opencti-b0gY5UHe@opencti.io:/~/opencti-b0gY5UHe.git . - - run: - working_directory: ~/opencti/deploy - command: git submodule init && git submodule update --remote - - run: - working_directory: ~/opencti/deploy - command: git remote add ci ~/opencti && git pull --no-edit -s recursive -X theirs ci master - - run: - working_directory: ~/opencti/deploy - command: rsync -av --delete ~/opencti/opencti-platform/opencti-graphql/public/ ./opencti-platform/opencti-graphql/public/ - - run: - working_directory: ~/opencti/deploy - command: rsync -av --delete ~/opencti/opencti-platform/opencti-graphql/build/ ./opencti-platform/opencti-graphql/build/ - - run: - working_directory: ~/opencti/deploy - command: rsync -av ./opencti-connectors/ ./opencti-connectors-enabled/ - - run: - working_directory: ~/opencti/deploy - command: git add -A && git add -f ./opencti-platform/opencti-graphql/public && git add -f ./opencti-platform/opencti-graphql/build - - run: - working_directory: ~/opencti/deploy - command: git diff-index --quiet HEAD || git commit -a -m "[CircleCI-Workflow] Deploy new version" && git push origin master - - slack/notify: - event: fail - template: basic_fail_1 - - ms-teams/report: - only_on_fail: true - webhook_url: $MS_TEAMS_WEBHOOK_URL - docker_build_platform: working_directory: ~/opencti_docker machine: @@ -412,29 +324,7 @@ jobs: steps: - checkout - kubernetes/install-kubectl - - run: kubectl --server=https://api.staging.eu-west.filigran.io --token=$K8S_TOKEN -n customer-testing rollout restart deployment/opencti-front - - run: kubectl --server=https://api.staging.eu-west.filigran.io --token=$K8S_TOKEN -n customer-testing rollout restart deployment/opencti-ingest - - run: kubectl --server=https://api.staging.eu-west.filigran.io --token=$K8S_TOKEN -n customer-testing rollout restart deployment/opencti-worker - - run: kubectl --server=https://api.staging.eu-west.filigran.io --token=$K8S_TOKEN -n customer-testing rollout restart deployment/opencti-connector-alienvault - - run: kubectl --server=https://api.staging.eu-west.filigran.io --token=$K8S_TOKEN -n customer-testing rollout restart deployment/opencti-connector-abuseipdb - - run: kubectl --server=https://api.staging.eu-west.filigran.io --token=$K8S_TOKEN -n customer-testing rollout restart deployment/opencti-connector-common-vulnerabilities-and-exposures - - run: kubectl --server=https://api.staging.eu-west.filigran.io --token=$K8S_TOKEN -n customer-testing rollout restart deployment/opencti-connector-exportfilecsv - - run: kubectl --server=https://api.staging.eu-west.filigran.io --token=$K8S_TOKEN -n customer-testing rollout restart deployment/opencti-connector-exportfilestix2 - - run: kubectl --server=https://api.staging.eu-west.filigran.io --token=$K8S_TOKEN -n customer-testing rollout restart deployment/opencti-connector-exportfiletxt - - run: kubectl --server=https://api.staging.eu-west.filigran.io --token=$K8S_TOKEN -n customer-testing rollout restart deployment/opencti-connector-exportreportpdf - - run: kubectl --server=https://api.staging.eu-west.filigran.io --token=$K8S_TOKEN -n customer-testing rollout restart deployment/opencti-connector-google-dns - - run: kubectl --server=https://api.staging.eu-west.filigran.io --token=$K8S_TOKEN -n customer-testing rollout restart deployment/opencti-connector-hybrid-analysis-sandbox-windows-10-64bit - - run: kubectl --server=https://api.staging.eu-west.filigran.io --token=$K8S_TOKEN -n customer-testing rollout restart deployment/opencti-connector-hygiene - - run: kubectl --server=https://api.staging.eu-west.filigran.io --token=$K8S_TOKEN -n customer-testing rollout restart deployment/opencti-connector-importdocument - - run: kubectl --server=https://api.staging.eu-west.filigran.io --token=$K8S_TOKEN -n customer-testing rollout restart deployment/opencti-connector-importexternalreference - - run: kubectl --server=https://api.staging.eu-west.filigran.io --token=$K8S_TOKEN -n customer-testing rollout restart deployment/opencti-connector-importfilestix - - run: kubectl --server=https://api.staging.eu-west.filigran.io --token=$K8S_TOKEN -n customer-testing rollout restart deployment/opencti-connector-ipinfo - - run: kubectl --server=https://api.staging.eu-west.filigran.io --token=$K8S_TOKEN -n customer-testing rollout restart deployment/opencti-connector-malpedia - - run: kubectl --server=https://api.staging.eu-west.filigran.io --token=$K8S_TOKEN -n customer-testing rollout restart deployment/opencti-connector-misp-feed-cert-fr-cert-fr - - run: kubectl --server=https://api.staging.eu-west.filigran.io --token=$K8S_TOKEN -n customer-testing rollout restart deployment/opencti-connector-misp-feed-circl-circl - - run: kubectl --server=https://api.staging.eu-west.filigran.io --token=$K8S_TOKEN -n customer-testing rollout restart deployment/opencti-connector-mitre-datasets - - run: kubectl --server=https://api.staging.eu-west.filigran.io --token=$K8S_TOKEN -n customer-testing rollout restart deployment/opencti-connector-opencti-datasets - - run: kubectl --server=https://api.staging.eu-west.filigran.io --token=$K8S_TOKEN -n customer-testing rollout restart deployment/opencti-connector-virustotal + - run: kubectl --server=https://api.staging.eu-west.filigran.io --token=$K8S_TOKEN -n customer-testing rollout restart deployment notify_rolling: docker: @@ -494,20 +384,6 @@ workflows: branches: only: - master - - deploy_demo: - requires: - - build_platform - filters: - branches: - only: - - master - - deploy_reference: - requires: - - build_platform - filters: - branches: - only: - - master - docker_build_platform_rolling: requires: - build_frontend @@ -544,8 +420,6 @@ workflows: - docker_build_worker_rolling - notify_rolling: requires: - - deploy_demo - - deploy_reference - deploy_testing - package_rolling - package_rolling_musl