Files
houston-be/Makefile

96 lines
6.7 KiB
Makefile
Raw Permalink Normal View History

TP-44162 | Google Meet integration to create calendar invite with meeting link creation on incident creation (#277) * TP-44158 | Adding service to get transcript files from Google Drive (#234) Adding service to get transcript files from Google Drive * TP-45120 (#275) TP-45120 | merging Google auth implementation and calendar event fix * TP-44162 | added service implementation for calendar actions * TP-44162 | Updated label in slack message * TP-44162 | Fixed build failures * TP-44162 | Updated sql migration file name * TP-44162 | added unit tests for google calendar service * TP-48200 | updated response messages in link and unlink jira apis (#278) * TP-44162 | resolved review comments * TP-44158 | Adding service to get transcript files from Google Drive (#234) Adding service to get transcript files from Google Drive * TP-45120 (#275) TP-45120 | merging Google auth implementation and calendar event fix * TP-44162 | added service implementation for calendar actions * TP-44162 | Updated label in slack message * TP-44162 | Fixed build failures * TP-44162 | Updated sql migration file name * TP-44162 | added unit tests for google calendar service * TP-44162 | resolved review comments * TP-44162 | updated few naming conventions * TP-44162 | Adding timeouts to google drive api calls and related UTs * TP-44162 | Adding drive api timeout to viper for unit test --------- Co-authored-by: Sriram Bhargav <sriram.bhargav@navi.com> Co-authored-by: Shashank Shekhar <shashank.shekhar@navi.com>
2023-11-09 16:25:20 +05:30
.PHONY: docker-run
docker-run: docker-build
docker run houston
2023-03-29 20:57:20 +05:30
2023-06-14 12:45:13 +05:30
.PHONY: docker-build
2023-03-29 20:57:20 +05:30
docker-build:
2023-04-12 00:14:47 +05:30
docker build -t houston -f Dockerfile.houston .
2023-03-29 20:57:20 +05:30
2023-06-14 12:45:13 +05:30
.PHONY: migration-up
2023-04-12 00:14:47 +05:30
migration-up:
migrate -path db/migration/ -database "${POSTGRES_DSN}?sslmode=require" -verbose up
2023-04-12 00:14:47 +05:30
2023-06-14 12:45:13 +05:30
.PHONY: migration-down
2023-04-12 00:14:47 +05:30
migration-down:
migrate -path db/migration/ -database "${POSTGRES_DSN}?sslmode=require" -verbose down
TP-44162 | Google Meet integration to create calendar invite with meeting link creation on incident creation (#277) * TP-44158 | Adding service to get transcript files from Google Drive (#234) Adding service to get transcript files from Google Drive * TP-45120 (#275) TP-45120 | merging Google auth implementation and calendar event fix * TP-44162 | added service implementation for calendar actions * TP-44162 | Updated label in slack message * TP-44162 | Fixed build failures * TP-44162 | Updated sql migration file name * TP-44162 | added unit tests for google calendar service * TP-48200 | updated response messages in link and unlink jira apis (#278) * TP-44162 | resolved review comments * TP-44158 | Adding service to get transcript files from Google Drive (#234) Adding service to get transcript files from Google Drive * TP-45120 (#275) TP-45120 | merging Google auth implementation and calendar event fix * TP-44162 | added service implementation for calendar actions * TP-44162 | Updated label in slack message * TP-44162 | Fixed build failures * TP-44162 | Updated sql migration file name * TP-44162 | added unit tests for google calendar service * TP-44162 | resolved review comments * TP-44162 | updated few naming conventions * TP-44162 | Adding timeouts to google drive api calls and related UTs * TP-44162 | Adding drive api timeout to viper for unit test --------- Co-authored-by: Sriram Bhargav <sriram.bhargav@navi.com> Co-authored-by: Shashank Shekhar <shashank.shekhar@navi.com>
2023-11-09 16:25:20 +05:30
.PHONY: build
build: test
go mod tidy && CGO_ENABLED=0 go build -ldflags="-s -w" -o houston cmd/main.go
.PHONY: test
test: generatemocks
go test -v -count=1 $(CURDIR)/service/...
go test -v -count=1 $(CURDIR)/pkg/...
go test -v -count=1 $(CURDIR)/common/...
TP-44162 | Google Meet integration to create calendar invite with meeting link creation on incident creation (#277) * TP-44158 | Adding service to get transcript files from Google Drive (#234) Adding service to get transcript files from Google Drive * TP-45120 (#275) TP-45120 | merging Google auth implementation and calendar event fix * TP-44162 | added service implementation for calendar actions * TP-44162 | Updated label in slack message * TP-44162 | Fixed build failures * TP-44162 | Updated sql migration file name * TP-44162 | added unit tests for google calendar service * TP-48200 | updated response messages in link and unlink jira apis (#278) * TP-44162 | resolved review comments * TP-44158 | Adding service to get transcript files from Google Drive (#234) Adding service to get transcript files from Google Drive * TP-45120 (#275) TP-45120 | merging Google auth implementation and calendar event fix * TP-44162 | added service implementation for calendar actions * TP-44162 | Updated label in slack message * TP-44162 | Fixed build failures * TP-44162 | Updated sql migration file name * TP-44162 | added unit tests for google calendar service * TP-44162 | resolved review comments * TP-44162 | updated few naming conventions * TP-44162 | Adding timeouts to google drive api calls and related UTs * TP-44162 | Adding drive api timeout to viper for unit test --------- Co-authored-by: Sriram Bhargav <sriram.bhargav@navi.com> Co-authored-by: Shashank Shekhar <shashank.shekhar@navi.com>
2023-11-09 16:25:20 +05:30
@rm -rf $(CURDIR)/mocks
# Keep all mock file generation below this line
.PHONY: generatemocks
generatemocks:
@go install github.com/gojuno/minimock/v3/cmd/minimock@v3.1.3
@go mod tidy
@rm -rf $(CURDIR)/mocks
@echo "Generating mocks..."
@mkdir "mocks"
@mkdir "mocks/incidentStatus"
cd $(CURDIR)/pkg/google/googleDrive && minimock -i DriveActions -s _mock.go -o $(CURDIR)/mocks
TP-44162 | Google Meet integration to create calendar invite with meeting link creation on incident creation (#277) * TP-44158 | Adding service to get transcript files from Google Drive (#234) Adding service to get transcript files from Google Drive * TP-45120 (#275) TP-45120 | merging Google auth implementation and calendar event fix * TP-44162 | added service implementation for calendar actions * TP-44162 | Updated label in slack message * TP-44162 | Fixed build failures * TP-44162 | Updated sql migration file name * TP-44162 | added unit tests for google calendar service * TP-48200 | updated response messages in link and unlink jira apis (#278) * TP-44162 | resolved review comments * TP-44158 | Adding service to get transcript files from Google Drive (#234) Adding service to get transcript files from Google Drive * TP-45120 (#275) TP-45120 | merging Google auth implementation and calendar event fix * TP-44162 | added service implementation for calendar actions * TP-44162 | Updated label in slack message * TP-44162 | Fixed build failures * TP-44162 | Updated sql migration file name * TP-44162 | added unit tests for google calendar service * TP-44162 | resolved review comments * TP-44162 | updated few naming conventions * TP-44162 | Adding timeouts to google drive api calls and related UTs * TP-44162 | Adding drive api timeout to viper for unit test --------- Co-authored-by: Sriram Bhargav <sriram.bhargav@navi.com> Co-authored-by: Shashank Shekhar <shashank.shekhar@navi.com>
2023-11-09 16:25:20 +05:30
cd $(CURDIR)/pkg/conference && minimock -i ICalendarActions -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/pkg/rest/ && minimock -i HttpRestClient -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/pkg/atlassian/ && minimock -i JiraClient -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/service/slack && minimock -i ISlackService -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/service/incident && minimock -i IIncidentService -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/repository/rca && minimock -i IRcaRepository -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/model/incident && minimock -i IIncidentRepository -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/pkg/monitoringService && minimock -i MonitoringServiceActions -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/pkg/monitoringService && minimock -i ServiceActions -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/pkg/monitoringService && minimock -i EEMonitoringServiceClient -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/common/util/channel && minimock -i IChannelUtil -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/service/incident_channel && minimock -i IIncidentChannelService -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/model/team && minimock -i ITeamRepository -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/repository/severity && minimock -i ISeverityRepository -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/model/user && minimock -i IUserRepository -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/pkg/documentService && minimock -i ServiceActions -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/repository/rcaInput && minimock -i IRcaInputRepository -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/service/teamService && minimock -i ITeamServiceV2 -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/model/user && minimock -i IUserRepositoryInterface -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/repository/tag && minimock -i ITagRepository -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/service/krakatoa && minimock -i IKrakatoaService -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/pkg/socketModeClient && minimock -i ISocketModeClientWrapper -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/pkg/maverick && minimock -i IMaverickClient -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/service/incident_jira && minimock -i IncidentJiraService -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/model/incident_jira && minimock -i IncidentJiraRepository -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/model/product && minimock -i ProductRepository -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/model/products_teams && minimock -i ProductsTeamsRepository -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/model/incident_products && minimock -i IncidentProductsRepository -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/service/google && minimock -i IDriveService -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/service/rca && minimock -i IRcaService -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/pkg/alertClient && minimock -i AlertClient -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/repository/externalTeamRepo && minimock -i IExternalTeamRepository -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/service/alertService && minimock -i IAlertService -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/service/tag && minimock -i ITagService -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/service/conference && minimock -i ICalendarService -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/service/severity && minimock -i ISeverityService -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/service/user && minimock -i UserService -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/service/teamSeverity && minimock -i ITeamSeverityService -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/service/teamUser && minimock -i ITeamUserService -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/service/teamUserSeverity && minimock -i ITeamUserSeverityService -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/service/productsTeams && minimock -i ProductTeamsService -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/service/products && minimock -i ProductService -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/repository/teamSeverity && minimock -i TeamSeverityRepository -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/repository/teamUser && minimock -i TeamUserRepository -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/repository/teamUserSeverity && minimock -i TeamUserSeverityRepository -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/model/incident_channel && minimock -i IncidentChannelRepositoryInterface -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/repository/incidentStatus && minimock -i IncidentStatusRepository -s _mock.go -o $(CURDIR)/mocks/incidentStatus
cd $(CURDIR)/service/incidentStatus && minimock -i IncidentStatusService -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/repository/incidentUser && minimock -i IncidentUserRepository -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/repository/requestStatus && minimock -i RequestStatusRepository -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/service/requestStatus && minimock -i RequestStatusService -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/service/incidentTeam && minimock -i IncidentTeamService -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/service/incidentTeamTagValue && minimock -i IncidentTeamTagValueService -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/repository/incidentTeam && minimock -i IncidentTeamRepository -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/repository/incidentTeamTagValue && minimock -i IncidentTeamTagValueRepository -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/service/externalTeam && minimock -i ExternalTeamService -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/repository/externalTeamRepo && minimock -i ExternalTeamRepository -s _mock.go -o $(CURDIR)/mocks
cd $(CURDIR)/repository/tagValue && minimock -i TagValueRepository -s _mock.go -o $(CURDIR)/mocks