Commit Graph

522 Commits

Author SHA1 Message Date
Denis Gukov
8308f7ecce chore(runners): descrypt secrets before send 2023-09-11 03:15:33 +02:00
Denis Gukov
d990a4da8f fix(runner): decrypt key 2023-09-11 02:30:40 +02:00
Denis Gukov
0304e7cac3 fix(runners): pass vault key 2023-09-11 02:00:10 +02:00
Denis Gukov
a8921e6e82
Runners (#1458)
* feat(runners): update task status

* feat(config): add remote runner flag

* feat(runners): kill remote job

* feat(runners): update state
2023-09-10 23:18:25 +02:00
Denis Gukov
d1b7ad021e
Runners (#1444)
* feat(runners): add register endpoint

* feat(runners): add remote runner

* refactor(runners): move functionality TaskRunner -> AnsibleJobRunner

* fix(runners): init job

* chore(runners): remote unused field

* feat(runners): use external logger from AnsibleJobRunner

* refactor(runners): remove status field

* refactor(runners): remove mutation from job

* feat(runners): pass username and verison to task

* test(runners): fix tests

* fix(runners): params for Run

* feat(runners): implement runner selection

* feat(runners): fill required fields

* fix(runners): session block

* feat(runners): kill process

* refactor(runners): rename fields to public

* feat(runners): remote runner functionallity

* refactor(runners): remove unused class

* fix(runners): send json

* feat(runners): runner registration

* feat(runners): logging

* feat(runners): server <-> running communication works

* feat(runners): pass creds to runenr
2023-08-29 00:51:04 +02:00
Denis Gukov
b5a99eba7f
Runners (#1439)
* refactor(runners): extract jobs to separate entity
2023-08-27 18:02:51 +02:00
Denis Gukov
d32a31f4b6 feat: remove demo mode 2023-08-27 15:00:54 +02:00
Denis Gukov
5c8e518e83 test: pass tests 2023-08-27 00:10:02 +02:00
Denis Gukov
97c0cbbfde fix: merge conflict 2023-08-27 00:05:15 +02:00
Denis Gukov
9de5a0ebd3
Merge pull request #1420 from skorobkov/develop
Issue #1376
2023-08-26 23:31:45 +02:00
Denis Gukov
4398544e91 feat(fe): handle permissions on UI 2023-08-26 20:43:42 +02:00
Denis Gukov
b522169832 test: check role permissions 2023-08-26 18:48:16 +02:00
Denis Gukov
d9a0a4d0fa fix(be): do not expire session for demo mode 2023-08-26 13:16:25 +02:00
Serhii Korobkov
3208dbfaf7 Issue #1376 2023-08-16 17:12:15 +03:00
Denis Gukov
1145eec9a4 feat(be): add config options 2023-07-24 16:04:03 +02:00
Denis Gukov
076bb19910 fix(ui): merge conflict 2023-07-09 11:43:23 +02:00
Denis Gukov
93e42b7023 fix(roles): validate user role in project when add or update 2023-07-09 10:24:03 +02:00
Denis Gukov
87d983556f refactor(be): create middleware to check permissions 2023-07-08 23:35:39 +02:00
Denis Gukov
7fac4d34ea feat(ui): add select for project users' role 2023-07-08 13:42:50 +02:00
Denis Gukov
9c9c005955 refactor(be): add struct UserWithProjectRole 2023-07-08 12:41:57 +02:00
Denis Gukov
49a06d540f feat(be): add migration project__user.admin -> project_user.role 2023-07-07 23:16:43 +02:00
s3lph
2896dc72d9 feat(oidc): add config option to manually configure provider endpoints 2023-04-17 22:57:50 +02:00
s3lph
c3cd04fdce feat: implement oidc authentication 2023-04-16 23:57:56 +02:00
Denis Gukov
3e4a62b7f2 fix: authentization bug 2023-03-13 14:04:58 +01:00
Denis Gukov
64b52fba94 fix(be): remove db info from /info 2023-02-23 18:27:25 +04:00
Denis Gukov
04688a786e fix(be): remove db info from /info 2023-02-23 18:26:45 +04:00
Denis Gukov
668c81a991 fix(be): use DbConfig getter method instead of direct access to fields 2023-01-28 03:25:25 +04:00
Denis Gukov
07c6860ccb feat(be): support session connection for boltdb 2022-11-19 03:23:30 +05:00
Denis Gukov
8d0a27822d fix(be): creating task/output for boltdb with no keep connection mode 2022-11-09 22:31:52 +05:00
Denis Gukov
b2f5d42a6f test: remove date/time pattern from open api 2022-11-09 22:04:35 +05:00
Denis Gukov
579f978ffc feat(be): do not keep connection by BoltDB 2022-11-09 21:30:35 +05:00
Denis Gukov
9614ca04a8 fix(be): validate data which returns LDAP server 2022-11-06 20:25:25 +05:00
Denis Gukov
38f16c81b8 fix(be): remove panic from login 2022-10-30 22:29:06 +05:00
Denis Gukov
f4c9cbff1e fix: merge conflict 2022-10-30 21:49:15 +05:00
Denis Gukov
f3f9c71358 refactor(be): split auth process to serveral functions 2022-10-30 21:34:03 +05:00
Denis Gukov
3eb55aacd6 refactor(be): simplify ldap auth code 2022-10-30 20:57:08 +05:00
Denis Gukov
d382a822fe refactor: rename directory web2 to web 2022-10-29 18:37:20 +05:00
Robert Rettig
b48e4e8645 fixes #1026 2022-09-08 18:14:19 +02:00
Denis Gukov
bd855dab9b test: fix dredd tests 2022-06-29 21:25:28 +05:00
quantumsheep
5761b4e15e
feat: support yaml static inventories 2022-05-24 17:55:20 +02:00
Jean-Yves LEBLEU
e4086609f7 fix: force username to lower case when creating LDAP user 2022-05-09 18:44:09 +02:00
Denis Gukov
7774378d8c fix(be): bug with ldap tls https://github.com/ansible-semaphore/semaphore/issues/756 2022-02-10 10:53:10 +05:00
Denis Gukov
1036af1fc6 fix(be): disable migration for mysql
fix: check refs to template before delete

fix(be): drop breaking foreign key
2022-02-05 13:30:25 +05:00
Denis Gukov
751eeb4204 fix(be): bug with ldap auth related to https://github.com/ansible-semaphore/semaphore/issues/808 2022-02-04 14:22:02 +05:00
Denis Gukov
a09a1fc6d1 chore(be): update ldap deps 2022-02-04 04:00:49 +05:00
Denis Gukov
05dd7c5653 feat: remove soft delete functionality 2022-02-03 12:06:24 +05:00
Denis Gukov
fa4e13a0f1 refactor(be): remove global vars of task pool and schedule pool 2022-01-29 23:14:36 +05:00
Denis Gukov
b5eac6ca2f refactor(be): move schedules to package services 2022-01-29 16:24:51 +05:00
Denis Gukov
d3d002a818 refactor(be): change params for store method
chore(fe): remove passphrase from key settings because it is not implemented

fix(be): boltdb migration
2022-01-29 13:47:11 +05:00
Denis Gukov
6ce208d0f2 Merge branch 'develop' of github.com:ansible-semaphore/semaphore into develop 2022-01-27 19:30:41 +05:00
Denis Gukov
ec39816cf1 feat: add personal access token suport 2022-01-27 19:21:46 +05:00
Denis Gukov
2716a3989b fix(be): clear repository cache if access key changed 2022-01-27 17:55:01 +05:00
Denis Gukov
6799208b62 feat(be): add ability to override template extra args in task https://github.com/ansible-semaphore/semaphore/issues/832 2022-01-27 00:51:20 +05:00
Denis Gukov
f5ad81f7c0 fix(be): checking build version by nil 2022-01-26 16:52:31 +05:00
Denis Gukov
ef46f9b175 fix(ci): default access key encryption key in dockerfile 2022-01-25 13:33:32 +05:00
Denis Gukov
1d166cd1f7 fix(be): directory of git commands 2022-01-24 02:29:37 +05:00
Denis Gukov
1b88630348 fix(be): bug with git clone parameters 2022-01-24 00:45:12 +05:00
Denis Gukov
9520c0cd1b feat(be): implement migrations for BoltDB 2022-01-23 18:03:23 +05:00
Denis Gukov
f704379dfa test(be): fix repo creating test 2022-01-22 13:21:11 +05:00
Denis Gukov
f6b5a39432 fix(be): remove checking of updates from system info endpoint 2022-01-20 19:53:48 +05:00
Denis Gukov
755dca67e2 feat(be): small changes in semaphore_vars 2022-01-20 03:08:34 +05:00
Denis Gukov
315dba69fb feat(be): passing to ansible new variable semaphore_vars 2022-01-20 03:07:30 +05:00
Denis Gukov
d8afdb19d8 feat(be): recursive retreaving task version. Now we can make pipelines :) 2022-01-20 01:42:08 +05:00
Denis Gukov
51fc40e9c8 feat(be): triggering autorun tasks 2022-01-20 00:35:59 +05:00
Denis Gukov
54eaad249f test(be): remove unused test 2022-01-19 13:11:36 +05:00
Denis Gukov
34a6df651b feat: demo-mode label 2022-01-19 04:55:32 +05:00
Denis Gukov
f28364dc35 fix(be): pass linter 2022-01-19 04:09:21 +05:00
Denis Gukov
948bb8d1c3 feat(be): in demo mode user can stop task 2022-01-19 03:53:42 +05:00
Denis Gukov
2cd95afb29 feat(be): add demo mode 2022-01-19 03:19:31 +05:00
Denis Gukov
85d489a064 feat(be): non-admin users can manage keys in project, now it is secure because api doesn't return secrets 2022-01-19 03:07:53 +05:00
Denis Gukov
7eca14c2a8 feat(be): only admin can add new project 2022-01-19 02:50:15 +05:00
Denis Gukov
6be09da63c feat: REMOVE PLACEHOLDER USER FUNCTIONALITY 2022-01-19 02:26:48 +05:00
Denis Gukov
ba8ea4c650 feat(ui): add survey vars to ui 2022-01-19 00:17:48 +05:00
Denis Gukov
312cafa23c style(be): joining path 2022-01-17 01:23:49 +05:00
Denis Gukov
5860e1378b fix(be): test for register user 2022-01-17 01:14:44 +05:00
Denis Gukov
458ee316ba feat(be): placeholder user 2021-12-18 18:16:34 +05:00
Denis Gukov
b839c95573 test(be): register new user tests 2021-12-17 01:44:07 +05:00
Denis Gukov
edddc78098 Merge branch 'develop' of github.com:ansible-semaphore/semaphore into develop 2021-12-16 02:23:02 +05:00
Denis Gukov
73443a9612 feat: display Register form if no users in database 2021-12-16 02:22:52 +05:00
Denis Gukov
ee3432724d fix(be): fail task in repo source code not found for file:// repo 2021-12-14 23:07:10 +05:00
Denis Gukov
e06287fb86 fix(be): correct cropping file prefix 2021-12-14 20:24:17 +05:00
Denis Gukov
2287be34ce feat(fe): return to view from template 2021-11-03 18:06:28 +05:00
Denis Gukov
a36b948691 fix(be): Access key file not found https://github.com/ansible-semaphore/semaphore/issues/783 2021-11-03 17:51:36 +05:00
Denis Gukov
db89f5487d test(be): pass tests 2021-11-03 00:35:45 +05:00
Denis Gukov
54773d0c35 feat(be): data validation 2021-11-03 00:30:45 +05:00
Denis Gukov
d44a3f6681 test(be): pass tests 2021-11-02 23:02:44 +05:00
Denis Gukov
6e07b8ec84 feat(be): pass username and task message to ansible playbook 2021-11-02 22:57:02 +05:00
Denis Gukov
fa47a24078 feat(be): merge task environment with template environment 2021-11-02 22:44:09 +05:00
Denis Gukov
4dc9106fe7 test(be): tests for task.populateDetails 2021-11-02 22:37:31 +05:00
Denis Gukov
c7a0396144 fix(be): passing deploy version to ansible-playbook 2021-11-02 12:16:20 +05:00
Denis Gukov
101bccc5a9 chore: remove Link from telegram message 2021-11-01 14:56:20 +05:00
Denis Gukov
3a6bc0f7b6
Merge branch 'develop' into develop 2021-10-30 01:07:52 +05:00
Denis Gukov
001ddd3ae3 feat(fe): view tabs 2021-10-28 00:48:51 +05:00
Denis Gukov
943ab38768 feat(fe): views edit dialog 2021-10-27 23:05:54 +05:00
Denis Gukov
106a53bcae test(be): fix dredd tests 2021-10-27 21:22:52 +05:00
Denis Gukov
76a81cc29c fix(be): view positions endpoint 2021-10-27 17:25:51 +05:00
Denis Gukov
1285f10201 feat(be): views implementation for bolt 2021-10-27 16:43:04 +05:00
Denis Gukov
3b2f62ffbd feat(be): add view mock 2021-10-26 23:19:12 +05:00
Denis Gukov
6d05ea434e fix(be): send email alert only for failed tasks 2021-10-26 22:18:31 +05:00
Denis Gukov
4410a39a4c feat(be): telegram message format 2021-10-26 21:54:19 +05:00
Denis Gukov
a3755e70da feat(be): remove arguments for task 2021-10-26 03:00:10 +05:00
Denis Gukov
eb20640262 feat(fe): extendable task 2021-10-26 01:15:14 +05:00
Denis Gukov
bc1594329d refactor(be): move BuildTask to TaskWithTpl 2021-10-25 23:09:46 +05:00
Denis Gukov
e0b309b2e1 fix: updating task status on templates page 2021-10-25 14:42:34 +05:00
Denis Gukov
bc3a5a6ac9 feat: use reference to build task by id insead of by version 2021-10-20 16:56:29 +05:00
Denis Gukov
89240737a0 feat(fe): ui docs 2021-10-18 17:41:54 +05:00
Denis Gukov
0a454b0d97 refactor(be): add enum TemplateType based on string 2021-10-15 01:25:12 +05:00
Denis Gukov
191c6ed438 feat(be): passing semaphore vars via extra vars 2021-10-15 00:14:21 +05:00
Denis Gukov
8c10b9fc6e feat(fe): display commit hash and message on deploy window 2021-10-14 20:13:21 +05:00
Denis Gukov
85ef96320d feat(be): store commit message to task 2021-10-14 15:36:33 +05:00
Denis Gukov
f8b9fcf3d4 fix(ui): small UI issues 2021-10-13 23:51:35 +05:00
Denis Gukov
d87a0147d5 refactor(be): remove duplication 2021-10-13 19:33:07 +05:00
Denis Gukov
e692d2403e refactor(be): add enum for event object type 2021-10-13 19:07:22 +05:00
Denis Gukov
dfb0415e93 refactor(runner): add validate repo method 2021-10-13 02:17:11 +05:00
Denis Gukov
5f1351e04a chore(be): remove unused env vars from git command 2021-10-13 01:58:18 +05:00
Denis Gukov
a46b0e3ae3 feat(be): retreaving commit hash from repo 2021-10-13 01:44:10 +05:00
Denis Gukov
e7e807bc51 feat(be): build versioning 2021-10-13 00:43:15 +05:00
Denis Gukov
b32b42b817 feat(be): add support ldaps 2021-10-11 20:49:07 +05:00
Loïc Tosser
a59a0ed99f Secure Mail sender 2021-09-22 08:01:53 +04:00
Loïc Tosser
942aa537f5 Secure Email 2021-09-22 07:43:19 +04:00
Denis Gukov
d4dd2052bb refactor(be): rename column vault_pass_id to vault_key_id 2021-09-17 02:20:59 +05:00
Denis Gukov
1d46aa72a8 test(be): fix access key tests 2021-09-13 18:22:08 +05:00
Denis Gukov
749291a690 feat(be): pass ansible_user/password to ansible-playbook via file 2021-09-12 03:18:26 +05:00
Denis Gukov
b771068369 feat(be): ignore known hosts file 2021-09-11 02:54:35 +05:00
Denis Gukov
2c9bc5ba0f fix(be): add \n to end of private key 2021-09-10 23:48:23 +05:00
Denis Gukov
f207aa6bff feat(be): change error message for access key decryption 2021-09-10 03:41:36 +05:00
Denis Gukov
554e797e24 fix(be): use correct config field for access key encryption 2021-09-10 02:31:06 +05:00
Denis Gukov
9451c3791e fix(fe): do not check empty cron format 2021-09-07 13:42:06 +05:00
Denis Gukov
28cea3543e fix(fe): validate cron format before send save request 2021-09-06 21:36:25 +05:00
Denis Gukov
c236737473 fix(fe): error message for invalid cron format 2021-09-06 21:15:37 +05:00
Denis Gukov
813eae8fa3 refactor(be): refreshing schedule pool after schedule updated 2021-09-06 20:45:43 +05:00
Denis Gukov
efc44277ee feat(fe): implement schedule for template 2021-09-06 19:12:57 +05:00
Denis Gukov
0b5998274d refactor(be): remove schedule global variable 2021-09-06 17:01:38 +05:00
Denis Gukov
6eeb6706d4 feat: add schedule functionality 2021-09-06 16:05:10 +05:00
Denis Gukov
54a35c61d4 fix: access key validation 2021-09-04 11:39:16 +05:00
Jason Cameron
89e64fcbcc forcing local repo checks for 'file://' prefixed repositories 2021-09-02 08:57:46 -05:00
Denis Gukov
ecf8331e57 fix(style): pass linter 2021-09-02 02:22:31 +05:00
Denis Gukov
efe6c02793 feat: support vault pass file and ansible user login / password in inventory 2021-09-02 02:14:32 +05:00
Denis Gukov
3e223e2359 fix(be): don't return error when tring install non-ssh key 2021-09-01 23:11:24 +05:00
Denis Gukov
b950dacd73 test(dredd): fix api docs and return key secret validation 2021-09-01 22:56:44 +05:00
Denis Gukov
6194fb6036 refactor(be): use method instead of string statement 2021-09-01 21:18:49 +05:00
Denis Gukov
53e15d7bb2 fix(be): requirements path 2021-09-01 21:14:52 +05:00
Denis Gukov
aa6cb856b7 feat: add password file for Access Key 2021-09-01 19:38:28 +05:00
Denis Gukov
290c876045 feat(ui): add help 2021-08-31 17:27:33 +05:00
Denis Gukov
64b5dea6fa feat(ui): add help 2021-08-31 17:03:52 +05:00
Denis Gukov
e991800693 feat: removed public key. fix: encrypt private key for new access key 2021-08-31 10:47:19 +05:00
Denis Gukov
7443671059 feat(be): add access key encryption 2021-08-31 04:02:41 +05:00
Denis Gukov
ab098b8b82 fix(be): checking error by nil before log it 2021-08-31 03:15:00 +05:00
Denis Gukov
c1c8a9ebf9 feat(be): use chan for storing logs to database 2021-08-31 03:12:33 +05:00
Denis Gukov
21c14d82dc feat(be): use separate repository for each task template 2021-08-31 01:55:46 +05:00
Denis Gukov
fe36b8ce9f feat(be): do not return private key in rest api 2021-08-31 01:48:53 +05:00
Denis Gukov
974f3066e5 feat(be): stopping hung tasks 2021-08-31 00:42:11 +05:00
Denis Gukov
c6a02a81fe fix(be): handing empty forign column name 2021-08-30 21:04:18 +05:00
Denis Gukov
92895f9f3c refactor(be): remove unused columns 2021-08-30 19:24:20 +05:00
Denis Gukov
07559d61b3 fix(be): issue with login after new ldap user creaded 2021-08-30 11:05:41 +05:00
Denis Gukov
e3f9b32abb fix(be): move goodman import to separate package to fix tests 2021-08-27 11:58:31 +05:00
Denis Gukov
fe97469fde chore: add goodman to fake helper 2021-08-26 17:03:25 +05:00
Denis Gukov
ef545f89e6 test(be): fix tests 2021-08-26 16:41:42 +05:00
Denis Gukov
931a9cafb2 fix: add goodman dep 2021-08-26 15:24:26 +05:00
Denis Gukov
5b3402ef9d fix: add goodman dep 2021-08-26 15:17:06 +05:00
Denis Gukov
f7f23f999f feat(cli): use cobra library 2021-08-26 01:12:19 +05:00
Denis Gukov
633c5936b2 feat: stop task button 2021-08-25 20:46:40 +05:00
Denis Gukov
63a4a32ac1 feat: refactor to support postgres 2021-08-24 20:20:34 +05:00
Denis Gukov
d269a53625 feat(be): add user id to activity log 2021-08-20 11:28:50 +05:00
Denis Gukov
a1b2d2dc7f fix(be): returns correct error object if user not found 2021-08-11 19:54:27 +05:00
Denis Gukov
2b8a942e33 fix(be): remove boltdb user 2021-05-17 02:44:42 +05:00
Denis Gukov
c607b20b26 feat: remove old ui 2021-05-15 17:59:06 +05:00
Denis Gukov
bdd0977706 test(be): add some tests for bolt db 2021-05-15 17:23:47 +05:00
Denis Gukov
ca05dd94db fix(be): return correct http error code 2021-05-14 17:31:24 +05:00
Denis Gukov
82c3b62660 refactor: user auth via Store 2021-05-06 17:41:31 +05:00
Denis Gukov
d21b32fe6c refactor(be): remove method fetch, use Store instaed of it 2021-05-06 13:34:44 +05:00
Denis Gukov
421c05a962 fix(fe): add field project_id to each mutation request from class ItemFormBase.js 2021-04-22 15:36:23 +05:00
derks.patrick
a1d39652c1 change log for missing requirements file in roles directory 2021-04-15 18:51:44 +02:00
derks.patrick
63d3f88b08 added GetMd5Hash func in helpers. Add import and refactor imports 2021-04-15 18:46:00 +02:00
derks.patrick
ea1640c6a9 add dependency for md5 hash func. Refactor imports 2021-04-15 18:45:00 +02:00
derks.patrick
6481d95cc6 use hasrequirementsChanges check for galaxy run 2021-04-15 18:42:47 +02:00
derks.patrick
64d53abd61 added function to write requirement hash to file 2021-04-15 18:39:36 +02:00
derks.patrick
50236966d0 add function for checking requirements changes 2021-04-15 18:39:19 +02:00
derks.patrick
3a3450d85c Check in install requirements for the file and log if not exists 2021-04-15 18:07:49 +02:00
derks.patrick
ceea57351a move galaxy run commands to func. Remove -p for collection
The parameter -p doesnt work with collections, it simply skip any collection
2021-04-15 18:06:22 +02:00
Denis Gukov
696353ffdf feat(be): init boltdb 2021-04-10 02:02:35 +05:00
Denis Gukov
0787920d97 fix(web2): password field for new/edited user 2021-03-13 02:13:39 +05:00
Denis Gukov
779760d6aa fix(be): lint 2021-03-13 01:30:17 +05:00
Denis Gukov
ac2132f290 fix(ci): capabilities 2021-03-13 01:20:18 +05:00
Denis Gukov
d0392485eb feat: migrate logging to Store 2021-03-12 22:41:41 +05:00
Denis Gukov
d10b421538 refactor(be): split SqlDb to several files 2020-12-20 23:00:59 +05:00
Denis Gukov
c472dc66dd refactor(be): migrate users to Store 2020-12-17 19:00:05 +05:00
Denis Gukov
0c3a7c0c7e fix(be): events endpoint 2020-12-17 16:52:00 +05:00
Denis Gukov
d32f35f2ec refactor(be): events via Store 2020-12-17 01:57:54 +05:00
Denis Gukov
027e45fc86 refactor(be): migrate projects to Store 2020-12-17 00:19:20 +05:00
Denis Gukov
49fea98db3 refactor(be): migrate key to Store 2020-12-08 13:24:54 +05:00
Denis Gukov
19c7b7cbf9 refactor(be): migrate repos to Store 2020-12-08 00:48:52 +05:00
Denis Gukov
4707bd92ee refactor(be): delete inventory via Store 2020-12-07 23:51:11 +05:00
Denis Gukov
385e788795 feat(be): migrate inventories to Store 2020-12-07 17:13:59 +05:00
Denis Gukov
78f2474fb6 chore(be): remove unused function 2020-12-06 20:11:49 +05:00
Denis Gukov
fd1d42782b refactor(be): return models to db package 2020-12-05 14:13:43 +05:00
Denis Gukov
1295435f18 test(be): fix dredd tests 2020-12-05 03:26:24 +05:00
Denis Gukov
6291647d5b refactor(be): migrate environment endpoints to Store 2020-12-04 21:29:37 +05:00
Denis Gukov
6e1a6d20ca refactor(be): template and environment endpoints use Store
Rename util to helpers
Bind returns bool instead of error
2020-12-04 13:46:02 +05:00
Denis Gukov
0d64b43f18 refactor(be): move util.go to api directory 2020-12-04 13:46:02 +05:00