Skip to content

Commit 06d0386

Browse files
committed
First commit
1 parent 43fc69a commit 06d0386

File tree

1 file changed

+97
-1
lines changed

1 file changed

+97
-1
lines changed

README.md

Lines changed: 97 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,101 @@ Content CI/CD Template
22

33
This repository demonstrates how to create your own repository in which to create your content and configure your CI/CD process.
44

5-
Follow [XSOAR CI/CD](https://xsoar.pan.dev/docs/reference/packs/content-management) Article
5+
Follow [XSOAR CI/CD](https://xsoar.pan.dev/docs/reference/packs/content-management) Article.
66

7+
# Getting Started
8+
9+
## Setting up the repository in Github
10+
11+
### Creating new private repository
12+
13+
Press the `Use this Template` button and choose to `Create a new repository` in your own GitHub account.
14+
15+
### Clone the repository
16+
17+
Clone the private repository to your local machine, so you can start working on it.
18+
19+
```bash
20+
git clone https://github.com/yourname/private-repo.git
21+
cd private-repo
22+
```
23+
24+
## Setup the repository
25+
26+
### Install dependencies
27+
28+
This repository uses [poetry](https://python-poetry.org/) to manage dependencies.
29+
To install the dependencies, run the following command:
30+
31+
```bash
32+
poetry install
33+
```
34+
35+
This command will create a virtual environment and install all the dependencies.
36+
37+
To activate the virtual environment, run the following command:
38+
39+
```bash
40+
poetry shell
41+
```
42+
43+
## Create a new content item
44+
45+
### Create a new pack
46+
47+
To create a new pack, run the following command:
48+
49+
```bash
50+
demisto-sdk init --name <pack_name>
51+
```
52+
53+
### Create a new Integration or Script
54+
55+
To create a new Integration or Script, run the following command:
56+
57+
```bash
58+
cd Packs/<pack_name>
59+
demisto-sdk init <--integration|--script> --name <integration_or_script_name>
60+
```
61+
62+
Or you can download custom items from your XSOAR instance.
63+
To do that, you need to set the `DEMISTO_BASE_URL` and `DEMISTO_API_KEY` (and `XSIAM_AUTH_ID` for XSOAR 8) environment variables in your terminal or in the `.env` file. see [Demisto SDK](https://github.com/demisto/demisto-sdk/?tab=readme-ov-file#installation) for more information.
64+
65+
Then run the following command:
66+
67+
```bash
68+
demisto-sdk download -i <item_id> -o <path_to_the_pack>
69+
```
70+
71+
## Deploying to XSOAR
72+
73+
We have two options to deploy our content to XSOAR:
74+
75+
1. Via an artifact server.
76+
2. Directly to XSOAR.
77+
78+
See [XSOAR CI/CD](https://xsoar.pan.dev/docs/reference/packs/content-management#deployment) Article for more information.
79+
80+
In this repository, we have an example of [GitHub Action file](.github/workflows/config.yml) that contains the two options.
81+
Under the `Upload Packs to Artifacts Server` job, you can see the two options.
82+
Delete the one you don't want to use.
83+
84+
### Deploying to XSOAR via artifact server
85+
86+
In the `Upload Packs to Artifacts Server` job, you can choose to upload the modified packs to an artifact server.
87+
Use the following scripts to upload the modified packs to the artifact server:
88+
89+
#### Google Cloud Storage
90+
91+
Use the `bucket_upload.py` script to upload the modified packs to a Google Cloud Storage bucket.
92+
93+
#### AWS S3
94+
95+
Use the `bucket_upload_aws.py` script to upload the modified packs to an AWS S3 bucket.
96+
97+
### Deploying to XSOAR directly
98+
99+
To upload the modified packs directly to XSOAR, you need to add the following environment variables to your repository:
100+
`DEMISTO_BASE_URL` and `DEMISTO_API_KEY` as secret.
101+
`XSIAM_AUTH_ID` as variable.
102+
See [Creating secrets for a repository](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-a-repository) for more information.

0 commit comments

Comments
 (0)