8000 cicd: remove hardcoded values and small changes by polaroi8d · Pull Request #795 · dyrector-io/dyrectorio · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

cicd: remove hardcoded values and small changes #795

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/deploy_external.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,8 @@ jobs:
steps:
- name: Execute dedicated Sunilium instance webhook
run: |
curl -X POST -H 'Authorization: Bearer ${{secrets.SUN_DYO_WEBHOOK_TOKEN}}' https://app.dyrectorio.com/api/deployments/8322f763-e611-40c7-a29b-bb21f2fd4822/start
if curl -s -X POST --fail --head' Authorization: Bearer ${{secrets.SUN_DYO_WEBHOOK_TOKEN}}' ${{secrets.SUN_DYO_WEBHOOK_API_URL}}; then
echo "Deployment successful."
else
exit 1
fi
55 changes: 38 additions & 17 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,24 @@ If you're worried or don’t know where to start, check out our next section exp
## Development

1. Run `make upd` in the repo's root folder.
- Save your `DATABASE_URL=<connection_string>` environment variable for later.

- Save your `DATABASE_URL=<connection_string>` environment variable for later.

2. Go to the `web/crux` directory: `cd web/crux`
3. Install dependencies `npm ci`
4. Copy the _env.example_ file as _.env_ `cp .env.example .env`
- Paste `DATABASE_URL=<connection_string>` variable from step 1 to _.env_

- Paste `DATABASE_URL=<connection_string>` variable from step 1 to _.env_

5. On Linux:
- Uncomment the `DNS_DEFAULT_RESULT_ORDER=ipv4first` line in the _.env_ file
- Change the `CRUX_AGENT_ADDRESS` variable's value to `172.17.0.1:5000`

- Uncomment the `DNS_DEFAULT_RESULT_ORDER=ipv4first` line in the _.env_ file
- Change the `CRUX_AGENT_ADDRESS` variable's value to `172.17.0.1:5000`

6. On Mac / Windows you may have to edit your OS's hosts file to be sure the `host.docker.internal` domain resolves to docker's bridge network.
- Alternatively you can use your machine's LAN IP.

- Alternatively you can use your machine's LAN IP.

7. Deploy the database with `npm run prisma:migrate`
8. Start the backend with `npm run start`
9. Go to the `web/crux-ui` directory: `cd web/crux-ui`
Expand All @@ -38,37 +46,50 @@ If you're worried or don’t know where to start, check out our next section exp
Read more about the CLI in the [documentation](https://docs.dyrector.io/get-started/cli).

## Testing

Unit tests:
- In the `web/crux` or `web/crux-ui` folder respectively:

- In the `web/crux` or `web/crux-ui` folder respectively:

1. Run `npm ci`.
2. Start the tests with `npm run test`.

End-to-end tests:

1. Run `make upd` in the repo's root folder.
- Save your `DATABASE_URL=<connection_string>` environment variable for later.

- Save your `DATABASE_URL=<connection_string>` environment variable for later.

2. Go to the `web/crux` directory: `cd web/crux`
3. Install dependencies `npm ci`
4. Build the package `npm run build`
5. Copy the _env.example_ file as _.env_ `cp .env.example .env`
6. On Linux:
- Uncomment the `DNS_DEFAULT_RESULT_ORDER=ipv4first` line in the _.env_ file
- Change the `CRUX_AGENT_ADDRESS` variable's value to `172.17.0.1:5000`

- Uncomment the `DNS_DEFAULT_RESULT_ORDER=ipv4first` line in the _.env_ file
- Change the `CRUX_AGENT_ADDRESS` variable's value to `172.17.0.1:5000`

6. On Mac / Windows you may have to edit your OS's hosts file to be sure the `host.docker.internal` domain resolves to docker's bridge network.
- Alternatively you can use your machine's LAN IP.

- Alternatively you can use your machine's LAN IP.

7. Deploy the database with `npm run prisma:migrate`
8. Start the backend in production mode with `npm run start:prod`
9. Repeat steps 3-5 in the `web/crux-ui` folder in a different terminal
10. Start the frontend in production mode with `npm run start:prod`
11. Be sure that `chromium` is installed on your system
- You may have to run `npx playwright install-deps`
- More info: https://playwright.dev/docs/intro
- Additional note: On some systems like Manjaro, `npx playwright install-deps` does not work

- You may have to run `npx playwright install-deps`
- More info: https://playwright.dev/docs/intro
- Additional note: On some systems like Manjaro, `npx playwright install-deps` does not work
(warning message: "your OS is not officially supported by Playwright").
In this case, you can run `npm init playwright@latest` and when prompted with the question "Install Playwright operating system dependencies", choose "No".
After that, for Manjaro, you need to separately install Playwright from the AUR repository with the package manager and everything works just fine.

12. In a different terminal go to the `web/crux-ui` folder and run `npm run test:e2e`
- If you want to run a specific test file from the `web/crux-ui/e2e` folder you can do it with `DEBUG=1 npx playwright test <file_name>`
- If you want to open the inspector to see the tests running you can do it with `PWDEBUG=1 npx playwright test <file_name>`

- If you want to run a specific test file from the `web/crux-ui/e2e` folder you can do it with `DEBUG=1 npx playwright test <file_name>`
- If you want to open the inspector to see the tests running you can do it with `PWDEBUG=1 npx playwright test <file_name>`

## Changelog

Expand All @@ -80,13 +101,13 @@ make release

## Git branching strategy

We have two persistent branches: main, develop.
We have two persistent branches: main, develop.
PRs are going into develop.
The develop branch is always fast-forward mergable to main.
PR titles must follow the conventional commit guidelines.

Release: a release commit is made to develop, package versions are bumped, develop is fast-forward merged into main.
Hotfix: in rare occassions, a hotfix/** branch is created from main and the PR targets the main branch,
Hotfix: in rare occassions, a hotfix/\*\* branch is created from main and the PR targets the main branch,
develop must be rebased to main -- using rebase-onto.

## Submit a Pull Request
Expand Down
1 change: 1 addition & 0 deletions GETTING_STARTED.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Our CLI tool lets you run and manage the entire, fully functional stack for development purposes.

Stack:

- UI Service (crux-ui)
- Backend Service (crux)
- PostgreSQL database
Expand Down
13 changes: 7 additions & 6 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# dyrector.io platform maintainers

| Name | GitHub ID | Scope |
| ----------------- | -------------- | -------------------------- |
| Mate Vago | @m8vago | Web (crux and crux-ui) |
| Nandor Magyar | @nandor-magyar | Golang releated components |
| Szilveszter Liszy | @c3ppc3pp | CLI and CI pipelines |
| Levente Orban | @polaroi8d | Releases & Issues |
| Name | GitHub ID | Scope |
| ---------- | -------------- | -------------------------- |
| Mate | @m8vago | Web components |
| Bence | @robot9706 | Web components |
| Nandor | @nandor-magyar | Golang releated components |
| @core-team | @core-team | CLI and CI pipelines |
| Levente | @polaroi8d | Releases & Issues |

Please use [GitHub Issues](https://github.com/dyrector-io/dyrectorio/issues) for reporting non-security issues,
and [GitHub Discussions](https://github.com/dyrector-io/dyrectorio/discussions)
Expand Down
20 changes: 10 additions & 10 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ If you discover a vulnerability, we would like to know about it so we can take s

Please do the following:

- E-mail your findings to hello@dyrector.io.
- Do not take advantage of the vulnerability or problem you have discovered, for example by downloading more data than necessary to demonstrate the vulnerability or deleting or modifying other people's data,
- Do not reveal the problem to others until it has been resolved,
- Do not use attacks on physical security, social engineering, distributed denial of service, spam or applications of third parties, and
- Do provide sufficient information to reproduce the problem, so we will be able to resolve it as quickly as possible. Usually, the IP address or the URL of the affected system and a description of the vulnerability will be sufficient, but complex vulnerabilities may require further explanation.
- E-mail your findings to hello@dyrector.io.
- Do not take advantage of the vulnerability or problem you have discovered, for example by downloading more data than necessary to demonstrate the vulnerability or deleting or modifying other people's data,
- Do not reveal the problem to others until it has been resolved,
- Do not use attacks on physical security, social engineering, distributed denial of service, spam or applications of third parties, and
- Do provide sufficient information to reproduce the problem, so we will be able to resolve it as quickly as possible. Usually, the IP address or the URL of the affected system and a description of the vulnerability will be sufficient, but complex vulnerabilities may require further explanation.

What we promise:

- We will respond to your report within 3 business days with our evaluation of the report and an expected resolution date,
- If you have followed the instructions above, we will not take any legal action against you in regard to the report,
- We will handle your report with strict confidentiality, and not pass on your personal details to third parties without your permission,
- We will keep you informed of the progress towards resolving the problem,
- In the public information concerning the problem reported, we will give your name as the discoverer of the problem (unless you desire otherwise)
- We will respond to your report within 3 business days with our evaluation of the report and an expected resolution date,
- If you have followed the instructions above, we will not take any legal action against you in regard to the report,
- We will handle your report with strict confidentiality, and not pass on your personal details to third parties without your permission,
- We will keep you informed of the progress towards resolving the problem,
- In the public information concerning the problem reported, we will give your name as the discoverer of the problem (unless you desire otherwise)

We strive to resolve all problems as quickly as possible, and we would like to play an active role in the ultimate publication on the problem after it is resolved.

Expand Down
0