Skip to content
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

Proctor version 2 #86

Open
wants to merge 282 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
282 commits
Select commit Hold shift + click to select a range
4b5aacf
[Jasoet|Bimozx] V2: Finish Watch pod Status
jasoet Jul 15, 2019
d3891a0
[Jasoet|Bimozx] V2: Fix test after adding watch pod
jasoet Jul 15, 2019
b00f5ea
[Jasoet|Bimozx] V2: Add integration test for execution service
jasoet Jul 15, 2019
adcf8f6
[Jasoet|Bimozx] V2: Change makefile adds integration test
jasoet Jul 15, 2019
bbfa18c
[Jasoet|Bimozx] V2: Implement Execution Http Handler
jasoet Jul 15, 2019
bd0f997
[bimo.horizon|jasoet] Renamed http handler to just http
Jul 16, 2019
dc6fbf8
[bimo.horizon|jasoet] Fix insufficient mock
Jul 16, 2019
72ff223
[bimo.horizon|jasoet] Add test for execution handler
Jul 16, 2019
d70c055
[bimo.horizon|jasoet] Change assert expectations location to be neare…
Jul 16, 2019
49c7c84
[bimo.horizon|jasoet] Add not found test of job execution status handler
Jul 16, 2019
54e1567
[bimo.horizon|jasoet] Swap job execution related routes to use the ne…
Jul 16, 2019
9feebe9
[bimo.horizon|jasoet] Change imports placement on router according to…
Jul 16, 2019
99f2654
[Jasoet|Bimozx] V2: Change Router route
jasoet Jul 17, 2019
2bf96aa
[bimo.horizon|jasoet] Change store to repo in schedule handler
Jul 17, 2019
76796e0
[Jasoet|Bimozx] V2: Migrate middleware to server
jasoet Jul 17, 2019
2c26b75
[bimo.horizon|jasoet] Add handler status constants
Jul 17, 2019
06944a6
[bimo.horizon|jasoet] Update dependency
Jul 17, 2019
bca22a3
[bimo.horizon|jasoet] Rename metadata handler to maintain consistency
Jul 17, 2019
aa15d88
[bimo.horizon|jasoet] Change handler method name
Jul 17, 2019
b6a7aed
[Jasoet|Bimozx] V2: Fix race condition
jasoet Jul 17, 2019
ca2a1b9
[bimo.horizon|jasoet] Add json notation to schedule model
Jul 17, 2019
2ae7331
[bimo.horizon|jasoet] Swap constant usage with a more specific handle…
Jul 17, 2019
321ca30
[bimo.horizon|jasoet] Change handler name to be more descriptive
Jul 17, 2019
9789a0c
[bimo.horizon|jasoet] Update schedule handler
Jul 17, 2019
cb9e74c
[bimo.horizon|jasoet] Add schedule handler test
Jul 17, 2019
f51d62f
Merge branch 'hexa' of github.com:jasoet/proctor into hexa
Jul 17, 2019
e7839dd
[bimo.horizon|jasoet] Add missing schedule handler test
Jul 18, 2019
89a5473
[bimo.horizon] Change inconsistent 'id' naming to 'ID' instead
Jul 24, 2019
d8f1b93
[bimo.horizon] Update dependencies
Jul 24, 2019
5ab3078
[bimo.horizon] Change mailer send method to use execution context and…
Jul 24, 2019
3cbb3e6
[bimo.horizon] Add worker service
Jul 24, 2019
fb2a68f
[bimo.horizon|mazbergaz] Move scheduler start to worker
Jul 25, 2019
175f05c
[bimo.horizon|mazbergaz] Remove scheduler and move the start function…
Jul 25, 2019
c7ff333
[bimo.horizon|mazbergaz] Swap out audit log persistence on test to ex…
Jul 25, 2019
c28db60
[bimo.horizon|mazbergaz] Move docs into service
Jul 25, 2019
a3d5e13
[bimo.horizon|mazbergaz] Remove unneeded app proctord
Jul 25, 2019
81b740e
[bimo.horizon|mazbergaz] Move worker email to worker
Jul 25, 2019
dcbb2ea
[bimo.horizon|mazbergaz] Change Http instance to HTTP to follow prope…
Jul 25, 2019
bc5f9e9
[Jasoet] Add wait time on integration test
jasoet Jul 25, 2019
d639d1e
[bimo.horizon] Fix incorrect routes
Jul 26, 2019
8a96f1a
Merge branch 'hexa' of github.com:jasoet/proctor into hexa
Jul 26, 2019
22863ba
[bimo.horizon] Change binary name
Jul 26, 2019
53c643e
[Jasoet] Fix cmd folder name and Makefile
jasoet Aug 5, 2019
e934aed
[Jasoet] Merge utility helper to particular app
jasoet Aug 5, 2019
1ce5136
[Jasoet] Fix goreleaser build config
jasoet Aug 5, 2019
58fec01
[Jasoet|Bimo.horizon] Functional Test: add script to package procs an…
jasoet Aug 5, 2019
5abcaa7
[Jasoet|Bimo.horizon] Add Gracefull Shutdown for Proctor Server
jasoet Aug 5, 2019
61f83dc
[Jasoet|Bimo.horizon] Tyding Go Mod
jasoet Aug 5, 2019
563569e
[Jasoet] fix validate client middleware bug
jasoet Aug 6, 2019
2c06061
[Jasoet|Bimo.horizon] Fixing Proctor CLI
jasoet Aug 6, 2019
551408a
Fix some failing tests
Aug 7, 2019
c662fd1
[Jasoet|Bimo.horizon] Fix Failed Test
jasoet Aug 7, 2019
fcffb87
[Jasoet|Bimo.horizon] Make CLI message more descriptive
jasoet Aug 7, 2019
aa9deb3
[Jasoet|Bimo.horizon] Store image tag from metadata
jasoet Aug 7, 2019
6a6f153
Add log command
Aug 7, 2019
22d6c2f
Change test mock value
Aug 7, 2019
3dec7b2
[Jasoet] Create new table for ScheduleContext
jasoet Aug 8, 2019
30b7dac
[Jasoet] Add test for Schedule Context Table
jasoet Aug 9, 2019
91c7387
[Jasoet] Fix test for Schedule Worker
jasoet Aug 9, 2019
ceea1e1
[Jasoet] Move Worker into Schedule
jasoet Aug 9, 2019
f6c0604
[Jasoet] Add Insert Schedule Context on Worker
jasoet Aug 9, 2019
5215b60
[Jasoet|Bimo.horizon] Change mechanism to persist when execute job
jasoet Aug 12, 2019
d92642f
[bimo.horizon] Add updated at on execution result model
Aug 12, 2019
c0ced64
[bimo.horizon] Split get status method into two method with polling a…
Aug 12, 2019
2ed331d
[bimo.horizon] Tidy import order
Aug 12, 2019
ba14065
[bimo.horizon] Add id generation on insert and delete
Aug 12, 2019
a32994e
[bimo.horizon] Add status cmd
Aug 12, 2019
0e66060
[bimo.horizon] Add missing make command
Aug 12, 2019
f2a3795
Merge branch 'master' of github.com:jasoet/proctor
Aug 12, 2019
5f42a29
[bimo.horizon] Remove unneeded tests
Aug 12, 2019
b387375
[bimo.horizon] Fix failing test caused by moved execution id generation
Aug 13, 2019
0e849f5
[bimo.horizon] Add missing mocks
Aug 13, 2019
2c7006b
[bimo.horizon] Fix failing test because weird log behavior
Aug 13, 2019
e7de4cd
[Jasoet] Set integration to disable parallel build
jasoet Aug 13, 2019
7915d05
[Jasoet] Move printer to cli
jasoet Aug 13, 2019
c4d8fef
[bimo.horizon] Reduce integration test waiting time
Aug 13, 2019
dfc5bf3
[Jasoet] Add Security Service
jasoet Aug 14, 2019
1cca83a
[Jasoet] Add test for Verify Auth
jasoet Aug 14, 2019
efde137
[bimo.horizon] Add yaml dependency
Aug 14, 2019
621b364
[bimo.horizon] Move schedule flags declaration from root to its own c…
Aug 14, 2019
98f7d06
[bimo.horizon] Fix executioner help grammar
Aug 14, 2019
6c0e1be
[bimo.horizon] Move args parsing to its own utility
Aug 14, 2019
b073ff3
[bimo.horizon] Add yaml parsing support on executioner command
Aug 14, 2019
f00fb02
[bimo.horizon] Add example yaml file for testing
Aug 14, 2019
6e3b9d8
[bimo.horizon] Add make entry of executing with yaml
Aug 14, 2019
8cc23d8
[Jasoet] Enable Integration test for plugin
jasoet Aug 14, 2019
1983073
[Jasoet] Change Config Mechanism
jasoet Aug 15, 2019
4ee383a
[Jasoet] Add Reset Mechanism for Config() using atomic boolean
jasoet Aug 15, 2019
76bbaad
[Jasoet] Remove unused log
jasoet Aug 15, 2019
fab4852
[Jasoet] Change config mechanism for gate
jasoet Aug 20, 2019
be9cce9
Merge branch 'master' into plugin
jasoet Aug 20, 2019
1dc2c6e
[GOJ-100075] Add template command
Aug 23, 2019
12536e1
Add template to root command
Aug 23, 2019
ba97067
Add WriteYAML to utility
Aug 23, 2019
6e5950e
[Dembo] Refactor cli daemon client test to extract method for mock li…
walbertus Aug 26, 2019
b75c806
[Dembo] Refactor cli daemon client test to extract method for mock ex…
walbertus Aug 26, 2019
4c7c393
[Dembo] Refactor cli daemon client test to extract method for mock sc…
walbertus Aug 26, 2019
115cef3
[Dembo] Refactor cli daemon client test to extract method for mock ex…
walbertus Aug 26, 2019
6aa5496
[Dembo] Refactor cli daemon client test to extract method for mock de…
walbertus Aug 26, 2019
4e458a4
[Dembo] Refactor cli daemon client test to extract method for mock li…
walbertus Aug 26, 2019
23ab010
[Dembo] Refactor cli daemon client test to extract method for mock re…
walbertus Aug 26, 2019
d3ca03c
[Dembo] Refactor cli daemon client test to delete mock requests to ge…
walbertus Aug 26, 2019
46f7ad9
[Dembo] Refactor cli daemon client test to inline specific mock request
walbertus Aug 27, 2019
80cb621
[Dembo] Add test gate client get user profile success
walbertus Aug 27, 2019
43b971a
Add poll count config
Aug 28, 2019
461b00e
Tidy up long line
Aug 28, 2019
f1a6c07
Tidy import entries
Aug 28, 2019
9209f1d
Fix type
Aug 28, 2019
26dee2f
Add poll count to config entry
Aug 28, 2019
c89b1af
Fix coverage not detected
Aug 28, 2019
70abd83
Add test for #Close and #GetDB method
Aug 28, 2019
9ad7a47
Add generic timeout error
Aug 28, 2019
ce469c2
Add kubernetes resource poll retries
Aug 28, 2019
c6d95f6
Fix test result typo
Aug 28, 2019
e56fa8e
[Dembo] Update test gate client get user profile success to make make…
walbertus Aug 28, 2019
a78047c
[Dembo] Add test gate client get user profile unauthenticated
walbertus Aug 28, 2019
723a1e2
[Dembo] Add test gate client get user profile not found
walbertus Aug 28, 2019
e8dfa3a
[Dembo] Refactor test gate client get user profile to move variable body
walbertus Aug 28, 2019
accf808
[Dembo] Add test gate client get user profile server failure
walbertus Aug 28, 2019
f70e3f2
[Dembo] Add test gate client get user profile connection failure
walbertus Aug 28, 2019
9a9e3be
[Dembo] Add test plugin gate auth success
walbertus Aug 28, 2019
f6aba75
[Dembo] Add test plugin gate auth wrong token
walbertus Aug 28, 2019
439717a
[Dembo] Add test plugin gate auth wrong email
walbertus Aug 28, 2019
6ce3a76
[Dembo] Add test plugin gate auth verify success
walbertus Aug 28, 2019
1d59b36
[Dembo] Add test plugin gate auth verify inactive user
walbertus Aug 28, 2019
542b0a2
[Dembo] Add test plugin gate auth verify insufficient group
walbertus Aug 28, 2019
61b0ae0
[Dembo] Add integration test plugin gate client get user profile success
walbertus Aug 28, 2019
70f25ee
[Dembo] Add makefile command to run plugin integration test
walbertus Aug 28, 2019
8b1ab47
[Dembo] Add integration test plugin gate client get user profile unau…
walbertus Aug 28, 2019
756c986
[Dembo] Add integration test plugin gate client get user profile not …
walbertus Aug 28, 2019
fe87699
[Dembo] Refactor test plugin gate client to extract constant message
walbertus Aug 28, 2019
d9b16ff
[Dembo] Update response api mock for gate get user profile
walbertus Aug 29, 2019
2b8d849
[Dembo] Security middleware authentication success case
walbertus Aug 30, 2019
b7e32fc
[Dembo] Security middleware authentication without token case
walbertus Aug 30, 2019
14c41b4
[Dembo] Security middleware authentication without email case
walbertus Aug 30, 2019
2eb2fae
[Dembo] Security middleware authentication auth failed case
walbertus Aug 30, 2019
8d6ca7b
[Dembo] Update security middleware authentication success case to giv…
walbertus Aug 30, 2019
5ce979a
[Dembo] Security middleware authorization success case
walbertus Aug 30, 2019
4b557c7
[Dembo] Security middleware authorization case without name
walbertus Aug 30, 2019
4b2b099
[Dembo] Security middleware authorization case metadata error
walbertus Aug 30, 2019
481635c
[Dembo] Security middleware authorization case without user detail
walbertus Aug 30, 2019
41538e0
[Dembo] Security middleware authorization case authorization failed
walbertus Aug 30, 2019
ecaac86
[Dembo] Refactor security middleware authorization to extract job met…
walbertus Aug 30, 2019
5a19ea8
[Dembo] Security middleware authorization success case for schedule
walbertus Aug 30, 2019
34a11ec
Change retry mechanism of wait for ready job and pod
Sep 2, 2019
495af04
[Jasoet|Dembo] Set machine ID for snowflakeId
jasoet Sep 2, 2019
40f6cce
[Jasoet|Dembo] Tidyup security middleware
jasoet Sep 2, 2019
b8f0145
[Jasoet|Dembo] Add authentication and authorization to router
walbertus Sep 2, 2019
aef8bcf
[Jasoet|Dembo] Integrate security service with plugin
walbertus Sep 2, 2019
97948fd
[Dembo] Add env flag for auth
walbertus Sep 3, 2019
1ef1d10
[Jasoet|Dembo] Merge with Master
jasoet Sep 3, 2019
8dbf85b
[Jasoet|Dembo] Rename wrong config name
walbertus Sep 3, 2019
01eaf97
[Jasoet|Dembo] Set auth default to false
walbertus Sep 3, 2019
1bef2fc
[Dembo] Add docker capability
walbertus Sep 4, 2019
b81d8e8
[Dembo] Use multistage build for docker
walbertus Sep 5, 2019
0100b14
Add error message when watch is throwing an error
Sep 5, 2019
e001efc
Merge branch 'master' of github.com:jasoet/proctor
Sep 5, 2019
830ccb8
[Dembo] Copy migrations to docker image
walbertus Sep 5, 2019
2d9d809
[Dembo] Install ca-certificates in docker image
walbertus Sep 6, 2019
98d633a
[Dembo] Change cli schedule id payload
walbertus Sep 6, 2019
a6f6f2e
[Dembo] Remove schedule job payload model from cli
walbertus Sep 6, 2019
c86016e
[Dembo] Change schedule time to cron
walbertus Sep 6, 2019
2d149fd
[Dembo] Sync schedule payload model between cli and service
walbertus Sep 6, 2019
710f374
Merge branch 'master' into docker
walbertus Sep 6, 2019
390b676
[Dembo] Add readme content
walbertus Sep 9, 2019
a95aaae
[Dembo] Add travis stage to publish docker image
walbertus Sep 10, 2019
666cd62
[Dembo] Change docker login on travis
walbertus Sep 10, 2019
d0737c0
[Dembo] Add tags to schedule
walbertus Sep 11, 2019
cbcbfee
[Dembo] Add tags to schedule payload
walbertus Sep 11, 2019
78927e7
[Dembo] Add mechanism for middleware to ignore route
walbertus Sep 13, 2019
47c30fa
[Dembo] Exclude common route from authentication
walbertus Sep 13, 2019
7e90d70
[Dembo] Add content for security in README
walbertus Sep 13, 2019
b0a812e
[Dembo] Add configuration for kubernetes service name
walbertus Sep 13, 2019
c7663a5
[Dembo] Edit kubernetes execute job with custom service name
walbertus Sep 13, 2019
3be5e90
[Dembo] Add notification mechanism interfaces
walbertus Sep 17, 2019
4d09986
[Jasoet] Change binary name for proctor2
jasoet Sep 17, 2019
81ffc87
[Jasoet] Enable prometheus metrics exporter
jasoet Sep 17, 2019
f9687f4
[Dembo] Add execution event
walbertus Sep 17, 2019
ca1861e
Merge pull request #1 from jasoet/prometheus
jasoet Sep 17, 2019
c7767a8
[Dembo] Add observer mock
walbertus Sep 17, 2019
885e52c
[Dembo] Add slack notification client
walbertus Sep 17, 2019
b970e6e
[Dembo] Add standard slack notification message
walbertus Sep 17, 2019
12d1f48
[Dembo] Add slack notification plugin main struct
walbertus Sep 18, 2019
0735f94
[Dembo] Change observer signature to return error
walbertus Sep 18, 2019
c1ddb05
[Dembo] Add test for slack notification plugin on publish error
walbertus Sep 18, 2019
c0ebbf3
[Dembo] Change message structure to publish
walbertus Sep 18, 2019
332f2c7
[Dembo] Add slack client integration test
walbertus Sep 18, 2019
494a57e
[Dembo] Add proctor config for notification plugin binary and exported
walbertus Sep 18, 2019
fd8c804
[Dembo] Add test integration plugin with slack notification
walbertus Sep 18, 2019
0025526
[Dembo] Add notification service
walbertus Sep 18, 2019
5614c58
[Dembo] Add notification service to execution handler
walbertus Sep 18, 2019
91e4348
[Dembo] Refactor move standard message to own package
walbertus Sep 18, 2019
5a68f3e
[Dembo] Refactor extract standard message to own file
walbertus Sep 18, 2019
e4e9dc2
[Dembo] Refactor move formatting to message object
walbertus Sep 18, 2019
cc82a27
[Dembo] Add slack execution message
walbertus Sep 18, 2019
c17f231
[Dembo] Change slack notification to use execution message
walbertus Sep 18, 2019
5d6a78f
[Dembo] Add error when slack request fail
walbertus Sep 18, 2019
b4e2570
[Dembo] Slack notification will send standard message for unsupported…
walbertus Sep 18, 2019
8e97e63
[Dembo] Change content of standard slack message
walbertus Sep 18, 2019
480adc9
[Dembo] Remove unused code
walbertus Sep 18, 2019
35f73b0
[Dembo] Refactor slack notification to extract method for generate me…
walbertus Sep 18, 2019
3f2b0d9
[Dembo] Update readme about plugin
walbertus Sep 18, 2019
74a39d6
[Dembo] Change event type signature to return type
walbertus Sep 18, 2019
1f33a58
[Dembo] Change config type for notification plugin binary
walbertus Sep 19, 2019
456f621
[Dembo] Change config type for notification plugin exported name
walbertus Sep 19, 2019
258cd2a
[Dembo] Add integration test for slack notification plugin
walbertus Sep 19, 2019
70fef21
Merge pull request #2 from jasoet/notification
jasoet Sep 20, 2019
7a9027a
[Jasoet] Enable Admin Authorization
jasoet Sep 20, 2019
34a5cdf
Merge pull request #3 from jasoet/adminAuth
walbertus Sep 20, 2019
a8a86c5
update README for local setup
mazbergaz Sep 23, 2019
5309e99
Merge pull request #4 from mazbergaz/readme-update-setup
jasoet Sep 23, 2019
2ec9c09
[Jasoet] Enable Support for Yaml Config
jasoet Sep 25, 2019
bd9bb20
[Jasoet] Fix load env on makefile
jasoet Sep 25, 2019
8bc6d05
[Jasoet] Add current directory as config path
jasoet Sep 25, 2019
4dfb872
[Jasoet] Change config loader logic
jasoet Sep 25, 2019
c5c56d0
[Jasoet] Revert config to match current yggdrasil
jasoet Sep 25, 2019
bb47b6a
[Jasoet] resolve failed test
jasoet Sep 25, 2019
e51cc1b
Merge pull request #5 from jasoet/yaml
jasoet Sep 25, 2019
dd0501e
Add cli feature list on readme
walbertus Oct 3, 2019
8b4aadd
[Jasoet|Dembo] fix required parameter check on CLI
jasoet Oct 4, 2019
48e3276
[Jasoet|Dembo] remove documentation for yaml file flag
jasoet Oct 4, 2019
27ef13f
[Jasoet|Dembo] add missing env variable on README
jasoet Oct 7, 2019
d12c05b
[hadrian.siregar|bimo.horizon] Inject user email to execution argumen…
hadrianbs Oct 11, 2019
0278713
[hadrian.siregar|bimo.horizon] Inject context args to execution args …
hadrianbs Oct 11, 2019
e827d70
remove unnecessary test code
hadrianbs Oct 11, 2019
91fb85f
Merge pull request #7 from jasoet/feature/add-proctor-author-to-env-var
jasoet Oct 14, 2019
0257fdf
[Eko] Fix typo and hyperlink on plugin.md
ecojuntak Oct 23, 2019
fce7752
Merge pull request #8 from ecojuntak/master
jasoet Oct 24, 2019
8ee8810
[Dembo|Hadrian.Siregar] Change order of message content for slack
walbertus Oct 24, 2019
69d8eac
[Dembo|Hadrian.Siregar] Change route order to monitor correct route i…
walbertus Oct 24, 2019
901c953
[Jasoet] fix(version): Fix client version checking
jasoet Dec 16, 2019
757c8d8
[Jasoet] fix(version): Client Version to v2.0.2
jasoet Dec 16, 2019
4ad8418
[Jasoet] fix(version): Client Version to v2.0.3
jasoet Dec 16, 2019
30c7e6f
[Jasoet] script(goreleaser): setup binary target
jasoet Dec 17, 2019
1ab8ff9
[william.dembo] test(cli-version): update broken test for version cli
walbertus Jan 6, 2020
a2e8cf9
[william.dembo] fix(schedule-worker): fix wrong config for mailer
walbertus Jan 6, 2020
a096965
[william.dembo] chore(travis): add travis-ci to run test on pipeline
walbertus Jan 6, 2020
a3d1c74
Bump version 2.0.4
walbertus Jan 6, 2020
c06e2bd
[william.dembo] feat(config): add config for redis password
walbertus Jan 13, 2020
cdfa4cf
[william.demo] feat(redis): able to use password for redis connection
walbertus Jan 13, 2020
f65e2c4
[william.dembo] chore(env): set default redis password to empty
walbertus Jan 13, 2020
2bd2506
Bump version 2.0.5
walbertus Jan 14, 2020
77117f6
[Jasoet] feat(metadata): Show jobs list now depends on user's authent…
jasoet Jan 15, 2020
3b6ce1f
Bump version 2.0.6
walbertus Jan 15, 2020
6e38b40
[william.dembo] feat(authentication): Add context to check authentica…
walbertus Jan 15, 2020
ae0f798
[william.dembo] feat(metadata): handle case when authentication is di…
walbertus Jan 15, 2020
dc49f52
Bump version 2.0.7
walbertus Jan 15, 2020
8393bef
[Ralibi] fix(schedule-handler) Add optional second before cron valida…
May 29, 2020
d4fa37e
Bump version 2.0.8
May 29, 2020
0293cb8
[Ralibi] script(goreleaser): Updated config file
Jun 2, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 10 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.env
scripts/proctor.rb
_output/*

*.swp
*.swo
.idea
.DS_Store
.vscode/
dist/
31 changes: 0 additions & 31 deletions .env.sample

This file was deleted.

38 changes: 21 additions & 17 deletions .env.test
Original file line number Diff line number Diff line change
@@ -1,34 +1,38 @@
export ENVIRONMENT=test
export PROCTOR_KUBE_CONFIG=out-of-cluster
export PROCTOR_KUBE_CONTEXT=minikube
export PROCTOR_LOG_LEVEL=debug
export PROCTOR_APP_PORT=5000
export PROCTOR_DEFAULT_NAMESPACE=default
export PROCTOR_REDIS_ADDRESS=localhost:6379
export PROCTOR_REDIS_PASSWORD=
export PROCTOR_REDIS_MAX_ACTIVE_CONNECTIONS=10
export PROCTOR_KUBE_JOB_ACTIVE_DEADLINE_SECONDS=60
export PROCTOR_KUBE_JOB_RETRIES=0
export PROCTOR_KUBE_SERVICE_ACCOUNT_NAME=default
export PROCTOR_LOGS_STREAM_READ_BUFFER_SIZE=140
export PROCTOR_LOGS_STREAM_WRITE_BUFFER_SIZE=4096
export PROCTOR_KUBE_CLUSTER_HOST_NAME=localhost:8001
export PROCTOR_KUBE_POD_LIST_WAIT_TIME=5
export PROCTOR_KUBE_CA_CERT_ENCODED=LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCmNlcnRpZmljYXRlCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K
export PROCTOR_KUBE_BASIC_AUTH_ENCODED=YWRtaW46cGFzc3dvcmQK
export PROCTOR_KUBE_WAIT_FOR_RESOURCE_POLL_COUNT=5
export PROCTOR_KUBE_LOG_PROCESS_WAIT_TIME=60
export PROCTOR_POSTGRES_USER=postgres
export PROCTOR_POSTGRES_PASSWORD=
export PROCTOR_POSTGRES_HOST=localhost
export PROCTOR_POSTGRES_PORT=5432
export PROCTOR_POSTGRES_DATABASE=proctord_test
export PROCTOR_POSTGRES_MAX_CONNECTIONS=50
export PROCTOR_POSTGRES_CONNECTIONS_MAX_LIFETIME=30
export PROCTOR_NEW_RELIC_APP_NAME="PROCTORD"
export PROCTOR_NEW_RELIC_LICENCE_KEY="nrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnr"
export PROCTOR_MIN_CLIENT_VERSION="v0.2.0"
export PROCTOR_SCHEDULED_JOBS_FETCH_INTERVAL_IN_MINS="5"
export PROCTOR_MAIL_USERNAME="[email protected]"
export PROCTOR_MAIL_PASSWORD="password"
export PROCTOR_MAIL_SERVER_HOST="smtp.mail.com"
export PROCTOR_MAIL_SERVER_PORT="123"
export PROCTOR_JOB_POD_ANNOTATIONS="{\"key.one\":\"true\"}"
export PROCTOR_SENTRY_DSN="foo"
export PROCTOR_DOCS_PATH="/path/to/docs/dir"

export PROCTOR_NEW_RELIC_APP_NAME=PROCTORD
export PROCTOR_NEW_RELIC_LICENCE_KEY=0123456789012345678901234567890123456789
export PROCTOR_MIN_CLIENT_VERSION=v2.0.0
export PROCTOR_SCHEDULED_JOBS_FETCH_INTERVAL_IN_MINS=5
export [email protected]
export PROCTOR_MAIL_PASSWORD=password
export PROCTOR_MAIL_SERVER_HOST=smtp.mail.com
export PROCTOR_MAIL_SERVER_PORT=123
export PROCTOR_JOB_POD_ANNOTATIONS={\"key.one\":\"true\"}
export PROCTOR_DOCS_PATH=/path/to/docs/dir
export PROCTOR_AUTH_PLUGIN_BINARY=
export PROCTOR_AUTH_PLUGIN_EXPORTED=GateAuth
export PROCTOR_AUTH_ENABLED=false
export PROCTOR_NOTIFICATION_PLUGIN_BINARY=
export PROCTOR_NOTIFICATION_PLUGIN_EXPORTED=SlackNotification
export PROCTOR_REQUIRED_ADMIN_GROUP=proctor_admin
8 changes: 2 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@


homebrew-gojek
scripts/proctor.rb
_output/*

proctord
.env

proctord

*.swp
*.swo
.idea
.DS_Store
.vscode/
.vscode/
dist/
25 changes: 21 additions & 4 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,27 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
builds:
- env:
- CGO_ENABLED=0
archive:
replacements:
-
id: "proctor-server"
main: ./cmd/server/main.go
binary: proctor-server
goos:
- darwin
- linux
env:
- CGO_ENABLED=0
-
id: "proctor-cli"
main: ./cmd/cli/main.go
binary: proctor2
goos:
- darwin
- linux
- windows
env:
- CGO_ENABLED=0
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
Expand Down
9 changes: 3 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ dist: trusty
sudo: required
language: go
go:
- "1.12"
- "1.12"

services:
- redis-server
- postgresql

before_script:
- sudo service redis-server start
- sudo service redis-server start

stages:
- test
Expand All @@ -18,7 +18,4 @@ jobs:
include:
- stage: test
script:
- make db.setup test-with-race

after_success:
- scripts/release.sh
- make db.setup test
2 changes: 2 additions & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Proctor Team

* [Akshat](//github.com/olttwa)
* [Jasoet](//github.com/jasoet)
* [Bimo Horizon](//github.com/bimozx)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add William Dembo + all users from git history

4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Proctor - Contributing

Proctor `github.com/gojektech/proctor` is an open-source project.
Proctor `github.com/gojek/proctor` is an open-source project.
It is licensed using the [Apache License 2.0][1].
We appreciate pull requests; here are our guidelines:

Expand Down Expand Up @@ -36,7 +36,7 @@ Much Thanks! ❤❤❤
GO-JEK Tech

[1]: http://www.apache.org/licenses/LICENSE-2.0
[2]: https://github.com/gojektech/proctor/issues
[2]: https://github.com/gojek/proctor/issues
[3]: https://golang.org/doc/effective_go.html
[4]: http://gun.io/blog/how-to-github-fork-branch-and-pull-request
[5]: https://chris.beams.io/posts/git-commit/
Expand Down
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM golang:1.12 AS builder
WORKDIR /go/src/app
COPY . .
RUN make plugin.auth
RUN make plugin.slack
RUN make server

FROM ubuntu:latest
RUN apt-get update
RUN apt-get install -y ca-certificates
WORKDIR /app/
COPY --from=builder /go/src/app/_output/bin/server .
COPY --from=builder /go/src/app/_output/bin/plugin/auth.so .
COPY --from=builder /go/src/app/_output/bin/plugin/slack.so .
COPY --from=builder /go/src/app/migrations ./migrations

ENTRYPOINT ["./server"]
CMD ["s"]
97 changes: 88 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ export $(shell sed 's/=.*//' .env.test)
SRC_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
OUT_DIR := $(SRC_DIR)/_output
BIN_DIR := $(OUT_DIR)/bin
PLUGIN_DIR := $(BIN_DIR)/plugin
FTEST_DIR := test/procs
CONFIG_DIR := test/config
GOPROXY ?= https://proxy.golang.org
GO111MODULE := on
CONFIG_LOCATION := $(SRC_DIR)

$(@info $(shell mkdir -p $(OUT_DIR) $(BIN_DIR)))
$(@info $(shell mkdir -p $(OUT_DIR) $(BIN_DIR) $(PLUGIN_DIR))

.PHONY: build
build: test-with-race server cli
Expand All @@ -23,23 +27,51 @@ test-with-race: test

.PHONY: test
test:
go test $(RACE_FLAG) -coverprofile=$(OUT_DIR)/coverage.out ./...
ENABLE_INTEGRATION_TEST=false \
go test -race -coverprofile=$(OUT_DIR)/coverage.out ./...

.PHONY: itest
itest: plugin.auth plugin.slack
PROCTOR_AUTH_PLUGIN_BINARY=$(PLUGIN_DIR)/auth.so \
PROCTOR_NOTIFICATION_PLUGIN_BINARY=$(PLUGIN_DIR)/slack.so \
ENABLE_INTEGRATION_TEST=true \
go test -p 1 -race -coverprofile=$(OUT_DIR)/coverage.out ./...

.PHONY: plugin.itest
plugin.itest: plugin.auth plugin.slack
PROCTOR_AUTH_PLUGIN_BINARY=$(PLUGIN_DIR)/auth.so \
PROCTOR_NOTIFICATION_PLUGIN_BINARY=$(PLUGIN_DIR)/slack.so \
ENABLE_PLUGIN_INTEGRATION_TEST=true \
go test -race -coverprofile=$(OUT_DIR)/coverage.out ./...

.PHONY: server
server:
go build -o $(BIN_DIR)/server ./exec/server/server.go
PROCTOR_AUTH_PLUGIN_BINARY=$(PLUGIN_DIR)/auth.so \
go build -race -o $(BIN_DIR)/server ./cmd/server/main.go

.PHONY: start-server
start-server:
$(BIN_DIR)/server s
.PHONY: plugin.auth
plugin.auth:
go build -race -buildmode=plugin -o $(PLUGIN_DIR)/auth.so ./plugins/gate-auth-plugin/auth.go

.PHONY: plugin.slack
plugin.slack:
go build -race -buildmode=plugin -o $(PLUGIN_DIR)/slack.so ./plugins/slack-notification-plugin/slack_notification.go

.PHONY: cli
cli:
go build -o $(BIN_DIR)/cli ./exec/cli/cli.go
go build -race -o $(BIN_DIR)/cli ./cmd/cli/main.go

build-all: server cli plugin.auth plugin.slack

.PHONY: start-server
start-server:
PROCTOR_AUTH_PLUGIN_BINARY=$(PLUGIN_DIR)/auth.so \
PROCTOR_NOTIFICATION_PLUGIN_BINARY=$(PLUGIN_DIR)/slack.so \
$(BIN_DIR)/server s

generate:
go get github.com/go-bindata/go-bindata
$(GOPATH)/bin/go-bindata -pkg config -o config/data.go data/config_template.yaml
go get -u github.com/go-bindata/go-bindata/...
$(GOPATH)/bin/go-bindata -pkg config -o internal/app/cli/config/data.go internal/app/cli/config_template.yaml

db.setup: db.create db.migrate

Expand All @@ -54,3 +86,50 @@ db.rollback: server

db.teardown:
-PGPASSWORD=$(PROCTOR_POSTGRES_PASSWORD) psql -h $(PROCTOR_POSTGRES_HOST) -p $(PROCTOR_POSTGRES_PORT) -c 'drop database $(PROCTOR_POSTGRES_DATABASE);' -U $(PROCTOR_POSTGRES_USER)
redis-cli FLUSHALL

.PHONY: ftest.package.procs
ftest.package.procs:
PROCTOR_JOBS_PATH=$(FTEST_DIR) \
ruby ./test/package_procs.rb

.PHONY: ftest.update.metadata
ftest.update.metadata:
PROCTOR_JOBS_PATH=$(FTEST_DIR) \
PROCTOR_URI=http://localhost:$(PROCTOR_APP_PORT)/metadata \
ruby ./test/update_metadata.rb

.PHONY: ftest.update.secret
ftest.update.secret:
curl -X POST \
http://localhost:5000/secret \
-H 'Content-Type: application/json' \
-d '{"job_name": "say-hello-world","secrets": {"SAMPLE_SECRET_ONE": "Secret One :*","SAMPLE_SECRET_TWO": "Secret Two :V"}}'

.PHONY: ftest.proctor.list
ftest.proctor.list:
LOCAL_CONFIG_DIR=$(CONFIG_DIR) $(BIN_DIR)/cli list

.PHONY: ftest.proctor.describe
ftest.proctor.describe:
LOCAL_CONFIG_DIR=$(CONFIG_DIR) $(BIN_DIR)/cli describe say-hello-world

.PHONY: ftest.proctor.template
ftest.proctor.template:
LOCAL_CONFIG_DIR=$(CONFIG_DIR) $(BIN_DIR)/cli template say-hello-world say-hello-world.yaml

.PHONY: ftest.proctor.execute
ftest.proctor.execute:
LOCAL_CONFIG_DIR=$(CONFIG_DIR) $(BIN_DIR)/cli execute say-hello-world SAMPLE_ARG_ONE=foo SAMPLE_ARG_TWO=bar

.PHONY: ftest.proctor.execute-with-yaml
ftest.proctor.execute-with-yaml:
LOCAL_CONFIG_DIR=$(CONFIG_DIR) $(BIN_DIR)/cli execute say-hello-world -f $(FTEST_DIR)/say-hello-world/say_hello_world.yaml

.PHONY: ftest.proctor.logs
ftest.proctor.logs:
LOCAL_CONFIG_DIR=$(CONFIG_DIR) $(BIN_DIR)/cli logs $(EXECUTION_ID)

.PHONY: ftest.proctor.status
ftest.proctor.status:
LOCAL_CONFIG_DIR=$(CONFIG_DIR) $(BIN_DIR)/cli status $(EXECUTION_ID)
Loading