diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml index c93cec08f..3b5a4ebda 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/go.yaml @@ -249,7 +249,7 @@ jobs: push: true tags: | ghcr.io/${{ github.repository_owner }}/checkup-job:${{ needs.tag.outputs.latest_tag }} - file: docker/CheckupJobDockerfile + file: docker/checkupJobDockerfile context: . deploy-compliance-report-job: diff --git a/cmd/checkup-job/main.go b/cmd/checkup-job/main.go index 50196ed6e..aed23c535 100644 --- a/cmd/checkup-job/main.go +++ b/cmd/checkup-job/main.go @@ -7,7 +7,7 @@ import ( "os/signal" "syscall" - "github.com/opengovern/opengovernance/jobs/checkup" + "github.com/opengovern/opengovernance/jobs/checkup-job" ) func main() { diff --git a/cmd/compliance-report-job/main.go b/cmd/compliance-report-job/main.go index 7fb64abb1..0704d6cca 100644 --- a/cmd/compliance-report-job/main.go +++ b/cmd/compliance-report-job/main.go @@ -7,7 +7,7 @@ import ( "os/signal" "syscall" - runner "github.com/opengovern/opengovernance/jobs/compliance-runner" + runner "github.com/opengovern/opengovernance/jobs/compliance-runner-job" ) func main() { diff --git a/cmd/compliance-summarizer-job/main.go b/cmd/compliance-summarizer-job/main.go index 5d04d961b..9fd1474b4 100644 --- a/cmd/compliance-summarizer-job/main.go +++ b/cmd/compliance-summarizer-job/main.go @@ -7,7 +7,7 @@ import ( "os/signal" "syscall" - summarizer "github.com/opengovern/opengovernance/jobs/compliance-summarizer" + summarizer "github.com/opengovern/opengovernance/jobs/compliance-summarizer-job" ) func main() { diff --git a/cmd/demo-importer-job/main.go b/cmd/demo-importer-job/main.go index e9e5c3b87..17202f1e2 100644 --- a/cmd/demo-importer-job/main.go +++ b/cmd/demo-importer-job/main.go @@ -7,7 +7,7 @@ import ( "os/signal" "syscall" - demoimporter "github.com/opengovern/opengovernance/jobs/demo-importer" + demoimporter "github.com/opengovern/opengovernance/jobs/demo-importer-job" ) func main() { diff --git a/cmd/query-runner-job/main.go b/cmd/query-runner-job/main.go index e6d08546d..0b077b761 100644 --- a/cmd/query-runner-job/main.go +++ b/cmd/query-runner-job/main.go @@ -7,7 +7,7 @@ import ( "os/signal" "syscall" - queryrunner "github.com/opengovern/opengovernance/jobs/query-runner" + queryrunner "github.com/opengovern/opengovernance/jobs/query-runner-job" ) func main() { diff --git a/cmd/query-validator-job/main.go b/cmd/query-validator-job/main.go index 58951b84a..2a60091be 100644 --- a/cmd/query-validator-job/main.go +++ b/cmd/query-validator-job/main.go @@ -7,7 +7,7 @@ import ( "os/signal" "syscall" - queryvalidator "github.com/opengovern/opengovernance/jobs/query-validator" + queryvalidator "github.com/opengovern/opengovernance/jobs/query-validator-job" ) func main() { diff --git a/jobs/checkup/api/checkup.go b/jobs/checkup-job/api/checkup.go similarity index 100% rename from jobs/checkup/api/checkup.go rename to jobs/checkup-job/api/checkup.go diff --git a/jobs/checkup/command.go b/jobs/checkup-job/command.go similarity index 94% rename from jobs/checkup/command.go rename to jobs/checkup-job/command.go index 0944eab2a..5c33f4e5d 100644 --- a/jobs/checkup/command.go +++ b/jobs/checkup-job/command.go @@ -5,7 +5,7 @@ import ( "os" config2 "github.com/opengovern/og-util/pkg/config" - "github.com/opengovern/opengovernance/jobs/checkup/config" + "github.com/opengovern/opengovernance/jobs/checkup-job/config" "github.com/spf13/cobra" "go.uber.org/zap" diff --git a/jobs/checkup/config/type.go b/jobs/checkup-job/config/type.go similarity index 100% rename from jobs/checkup/config/type.go rename to jobs/checkup-job/config/type.go diff --git a/jobs/checkup/const.go b/jobs/checkup-job/const.go similarity index 100% rename from jobs/checkup/const.go rename to jobs/checkup-job/const.go diff --git a/jobs/checkup/job.go b/jobs/checkup-job/job.go similarity index 97% rename from jobs/checkup/job.go rename to jobs/checkup-job/job.go index a1ff1c309..2a4e5d764 100644 --- a/jobs/checkup/job.go +++ b/jobs/checkup-job/job.go @@ -9,13 +9,13 @@ import ( authAPI "github.com/opengovern/og-util/pkg/api" shared_entities "github.com/opengovern/og-util/pkg/api/shared-entities" "github.com/opengovern/og-util/pkg/httpclient" - "github.com/opengovern/opengovernance/jobs/checkup/config" + "github.com/opengovern/opengovernance/jobs/checkup-job/config" authClient "github.com/opengovern/opengovernance/services/auth/client" metadataClient "github.com/opengovern/opengovernance/services/metadata/client" "golang.org/x/net/context" "github.com/go-errors/errors" - "github.com/opengovern/opengovernance/jobs/checkup/api" + "github.com/opengovern/opengovernance/jobs/checkup-job/api" "github.com/opengovern/opengovernance/services/integration/client" "go.uber.org/zap" ) diff --git a/jobs/checkup/worker.go b/jobs/checkup-job/worker.go similarity index 97% rename from jobs/checkup/worker.go rename to jobs/checkup-job/worker.go index 154c939b6..660a51246 100644 --- a/jobs/checkup/worker.go +++ b/jobs/checkup-job/worker.go @@ -6,7 +6,7 @@ import ( "fmt" "github.com/opengovern/og-util/pkg/jq" - "github.com/opengovern/opengovernance/jobs/checkup/config" + "github.com/opengovern/opengovernance/jobs/checkup-job/config" authClient "github.com/opengovern/opengovernance/services/auth/client" metadataClient "github.com/opengovern/opengovernance/services/metadata/client" diff --git a/jobs/compliance-runner/command.go b/jobs/compliance-runner-job/command.go similarity index 100% rename from jobs/compliance-runner/command.go rename to jobs/compliance-runner-job/command.go diff --git a/jobs/compliance-runner/compliance_result.go b/jobs/compliance-runner-job/compliance_result.go similarity index 100% rename from jobs/compliance-runner/compliance_result.go rename to jobs/compliance-runner-job/compliance_result.go diff --git a/jobs/compliance-runner/const.go b/jobs/compliance-runner-job/const.go similarity index 100% rename from jobs/compliance-runner/const.go rename to jobs/compliance-runner-job/const.go diff --git a/jobs/compliance-runner/job.go b/jobs/compliance-runner-job/job.go similarity index 100% rename from jobs/compliance-runner/job.go rename to jobs/compliance-runner-job/job.go diff --git a/jobs/compliance-runner/job_result.go b/jobs/compliance-runner-job/job_result.go similarity index 100% rename from jobs/compliance-runner/job_result.go rename to jobs/compliance-runner-job/job_result.go diff --git a/jobs/compliance-runner/service.go b/jobs/compliance-runner-job/service.go similarity index 100% rename from jobs/compliance-runner/service.go rename to jobs/compliance-runner-job/service.go diff --git a/jobs/compliance-summarizer/command.go b/jobs/compliance-summarizer-job/command.go similarity index 100% rename from jobs/compliance-summarizer/command.go rename to jobs/compliance-summarizer-job/command.go diff --git a/jobs/compliance-summarizer/const.go b/jobs/compliance-summarizer-job/const.go similarity index 100% rename from jobs/compliance-summarizer/const.go rename to jobs/compliance-summarizer-job/const.go diff --git a/jobs/compliance-summarizer/job.go b/jobs/compliance-summarizer-job/job.go similarity index 99% rename from jobs/compliance-summarizer/job.go rename to jobs/compliance-summarizer-job/job.go index de3aabbad..7c5ad6f78 100644 --- a/jobs/compliance-summarizer/job.go +++ b/jobs/compliance-summarizer-job/job.go @@ -9,7 +9,7 @@ import ( es2 "github.com/opengovern/og-util/pkg/es" "github.com/opengovern/og-util/pkg/httpclient" "github.com/opengovern/og-util/pkg/opengovernance-es-sdk" - types2 "github.com/opengovern/opengovernance/jobs/compliance-summarizer/types" + types2 "github.com/opengovern/opengovernance/jobs/compliance-summarizer-job/types" "github.com/opengovern/opengovernance/pkg/types" "github.com/opengovern/opengovernance/services/compliance/es" es3 "github.com/opengovern/opengovernance/services/describe/es" diff --git a/jobs/compliance-summarizer/job_result.go b/jobs/compliance-summarizer-job/job_result.go similarity index 97% rename from jobs/compliance-summarizer/job_result.go rename to jobs/compliance-summarizer-job/job_result.go index 922dddb06..7fee30c9a 100644 --- a/jobs/compliance-summarizer/job_result.go +++ b/jobs/compliance-summarizer-job/job_result.go @@ -3,7 +3,7 @@ package summarizer import ( "time" - "github.com/opengovern/opengovernance/jobs/compliance-summarizer/types" + "github.com/opengovern/opengovernance/jobs/compliance-summarizer-job/types" ) type ComplianceSummarizerStatus string diff --git a/jobs/compliance-summarizer/service.go b/jobs/compliance-summarizer-job/service.go similarity index 99% rename from jobs/compliance-summarizer/service.go rename to jobs/compliance-summarizer-job/service.go index 26fae0776..27432d3c7 100644 --- a/jobs/compliance-summarizer/service.go +++ b/jobs/compliance-summarizer-job/service.go @@ -13,7 +13,7 @@ import ( esSinkClient "github.com/opengovern/og-util/pkg/es/ingest/client" "github.com/opengovern/og-util/pkg/jq" "github.com/opengovern/og-util/pkg/opengovernance-es-sdk" - "github.com/opengovern/opengovernance/jobs/compliance-summarizer/types" + "github.com/opengovern/opengovernance/jobs/compliance-summarizer-job/types" integrationClient "github.com/opengovern/opengovernance/services/integration/client" inventoryClient "github.com/opengovern/opengovernance/services/inventory/client" "go.uber.org/zap" diff --git a/jobs/compliance-summarizer/types/benchmark_summary.go b/jobs/compliance-summarizer-job/types/benchmark_summary.go similarity index 100% rename from jobs/compliance-summarizer/types/benchmark_summary.go rename to jobs/compliance-summarizer-job/types/benchmark_summary.go diff --git a/jobs/compliance-summarizer/types/job.go b/jobs/compliance-summarizer-job/types/job.go similarity index 100% rename from jobs/compliance-summarizer/types/job.go rename to jobs/compliance-summarizer-job/types/job.go diff --git a/jobs/compliance-summarizer/types/job_docs.go b/jobs/compliance-summarizer-job/types/job_docs.go similarity index 100% rename from jobs/compliance-summarizer/types/job_docs.go rename to jobs/compliance-summarizer-job/types/job_docs.go diff --git a/jobs/demo-importer/cmd.go b/jobs/demo-importer-job/cmd.go similarity index 93% rename from jobs/demo-importer/cmd.go rename to jobs/demo-importer-job/cmd.go index c961bec6b..383fb1ab5 100644 --- a/jobs/demo-importer/cmd.go +++ b/jobs/demo-importer-job/cmd.go @@ -11,10 +11,10 @@ import ( "github.com/opengovern/og-util/pkg/config" "github.com/opengovern/og-util/pkg/httpclient" "github.com/opengovern/og-util/pkg/postgres" - db2 "github.com/opengovern/opengovernance/jobs/demo-importer/db" - "github.com/opengovern/opengovernance/jobs/demo-importer/fetch" - "github.com/opengovern/opengovernance/jobs/demo-importer/types" - "github.com/opengovern/opengovernance/jobs/demo-importer/worker" + db2 "github.com/opengovern/opengovernance/jobs/demo-importer-job/db" + "github.com/opengovern/opengovernance/jobs/demo-importer-job/fetch" + "github.com/opengovern/opengovernance/jobs/demo-importer-job/types" + "github.com/opengovern/opengovernance/jobs/demo-importer-job/worker" "github.com/opengovern/opengovernance/services/metadata/client" "github.com/opengovern/opengovernance/services/metadata/models" "github.com/opensearch-project/opensearch-go/v4" diff --git a/jobs/migrator/db/db.go b/jobs/demo-importer-job/db/db.go similarity index 94% rename from jobs/migrator/db/db.go rename to jobs/demo-importer-job/db/db.go index 93f01c3a6..1cb923b68 100644 --- a/jobs/migrator/db/db.go +++ b/jobs/demo-importer-job/db/db.go @@ -4,7 +4,7 @@ import ( "errors" "github.com/jackc/pgtype" - "github.com/opengovern/opengovernance/jobs/migrator/db/model" + "github.com/opengovern/opengovernance/jobs/demo-importer-job/db/model" "gorm.io/gorm" ) diff --git a/jobs/demo-importer/db/model/migration.go b/jobs/demo-importer-job/db/model/migration.go similarity index 100% rename from jobs/demo-importer/db/model/migration.go rename to jobs/demo-importer-job/db/model/migration.go diff --git a/jobs/demo-importer/fetch/decode.go b/jobs/demo-importer-job/fetch/decode.go similarity index 100% rename from jobs/demo-importer/fetch/decode.go rename to jobs/demo-importer-job/fetch/decode.go diff --git a/jobs/demo-importer/fetch/git.go b/jobs/demo-importer-job/fetch/git.go similarity index 95% rename from jobs/demo-importer/fetch/git.go rename to jobs/demo-importer-job/fetch/git.go index 32960d249..4c6fdb137 100644 --- a/jobs/demo-importer/fetch/git.go +++ b/jobs/demo-importer-job/fetch/git.go @@ -9,7 +9,7 @@ import ( "github.com/go-git/go-git/v5/plumbing" "github.com/go-git/go-git/v5/plumbing/transport" githttp "github.com/go-git/go-git/v5/plumbing/transport/http" - "github.com/opengovern/opengovernance/jobs/demo-importer/types" + "github.com/opengovern/opengovernance/jobs/demo-importer-job/types" "go.uber.org/zap" ) diff --git a/jobs/demo-importer/fetch/s3.go b/jobs/demo-importer-job/fetch/s3.go similarity index 100% rename from jobs/demo-importer/fetch/s3.go rename to jobs/demo-importer-job/fetch/s3.go diff --git a/jobs/demo-importer/fetch/unzip.go b/jobs/demo-importer-job/fetch/unzip.go similarity index 100% rename from jobs/demo-importer/fetch/unzip.go rename to jobs/demo-importer-job/fetch/unzip.go diff --git a/jobs/demo-importer/types/config.go b/jobs/demo-importer-job/types/config.go similarity index 100% rename from jobs/demo-importer/types/config.go rename to jobs/demo-importer-job/types/config.go diff --git a/jobs/demo-importer/types/paths.go b/jobs/demo-importer-job/types/paths.go similarity index 100% rename from jobs/demo-importer/types/paths.go rename to jobs/demo-importer-job/types/paths.go diff --git a/jobs/demo-importer/types/worker.go b/jobs/demo-importer-job/types/worker.go similarity index 100% rename from jobs/demo-importer/types/worker.go rename to jobs/demo-importer-job/types/worker.go diff --git a/jobs/demo-importer/worker/bulk.go b/jobs/demo-importer-job/worker/bulk.go similarity index 100% rename from jobs/demo-importer/worker/bulk.go rename to jobs/demo-importer-job/worker/bulk.go diff --git a/jobs/demo-importer/worker/create_indices.go b/jobs/demo-importer-job/worker/create_indices.go similarity index 100% rename from jobs/demo-importer/worker/create_indices.go rename to jobs/demo-importer-job/worker/create_indices.go diff --git a/jobs/demo-importer/worker/import.go b/jobs/demo-importer-job/worker/import.go similarity index 96% rename from jobs/demo-importer/worker/import.go rename to jobs/demo-importer-job/worker/import.go index 2e745e771..15b761b72 100644 --- a/jobs/demo-importer/worker/import.go +++ b/jobs/demo-importer-job/worker/import.go @@ -13,9 +13,9 @@ import ( "time" "github.com/jackc/pgtype" - "github.com/opengovern/opengovernance/jobs/demo-importer/db" - "github.com/opengovern/opengovernance/jobs/demo-importer/db/model" - "github.com/opengovern/opengovernance/jobs/demo-importer/types" + "github.com/opengovern/opengovernance/jobs/demo-importer-job/db" + "github.com/opengovern/opengovernance/jobs/demo-importer-job/db/model" + "github.com/opengovern/opengovernance/jobs/demo-importer-job/types" "github.com/opensearch-project/opensearch-go/v4/opensearchapi" "go.uber.org/zap" ) diff --git a/jobs/migrator/job/migration_list.go b/jobs/migrator/job/migration_list.go deleted file mode 100644 index d9a824192..000000000 --- a/jobs/migrator/job/migration_list.go +++ /dev/null @@ -1,30 +0,0 @@ -package job - -import ( - "github.com/opengovern/opengovernance/jobs/migrator/job/migrations/auth" - "github.com/opengovern/opengovernance/jobs/migrator/job/migrations/compliance" - "github.com/opengovern/opengovernance/jobs/migrator/job/migrations/elasticsearch" - "github.com/opengovern/opengovernance/jobs/migrator/job/migrations/integration" - "github.com/opengovern/opengovernance/jobs/migrator/job/migrations/inventory" - "github.com/opengovern/opengovernance/jobs/migrator/job/migrations/metadata" - "github.com/opengovern/opengovernance/jobs/migrator/job/migrations/resource_collection" - "github.com/opengovern/opengovernance/jobs/migrator/job/migrations/resource_info" - "github.com/opengovern/opengovernance/jobs/migrator/job/types" -) - -var migrations = map[string]types.Migration{ - - "elasticsearch": elasticsearch.Migration{}, - -} - -var manualMigrations =map[string]types.Migration{ - "metadata": metadata.Migration{}, - "integration": integration.Migration{}, - "inventory": inventory.Migration{}, - "resource_collection": resource_collection.Migration{}, - "elasticsearch": elasticsearch.Migration{}, - "compliance": compliance.Migration{}, - "resource_info": resource_info.Migration{}, - "auth": auth.Migration{}, -} diff --git a/jobs/migrator/cmd.go b/jobs/post-install-job/cmd.go similarity index 83% rename from jobs/migrator/cmd.go rename to jobs/post-install-job/cmd.go index 997a0e7f3..08d556942 100644 --- a/jobs/migrator/cmd.go +++ b/jobs/post-install-job/cmd.go @@ -4,8 +4,8 @@ import ( "fmt" "github.com/opengovern/og-util/pkg/config" - config2 "github.com/opengovern/opengovernance/jobs/migrator/config" - "github.com/opengovern/opengovernance/jobs/migrator/job" + config2 "github.com/opengovern/opengovernance/jobs/post-install-job/config" + "github.com/opengovern/opengovernance/jobs/post-install-job/job" "github.com/spf13/cobra" "go.uber.org/zap" ) diff --git a/jobs/migrator/config/paths.go b/jobs/post-install-job/config/paths.go similarity index 100% rename from jobs/migrator/config/paths.go rename to jobs/post-install-job/config/paths.go diff --git a/jobs/migrator/config/service.go b/jobs/post-install-job/config/service.go similarity index 100% rename from jobs/migrator/config/service.go rename to jobs/post-install-job/config/service.go diff --git a/jobs/demo-importer/db/db.go b/jobs/post-install-job/db/db.go similarity index 94% rename from jobs/demo-importer/db/db.go rename to jobs/post-install-job/db/db.go index dea013c90..c9508d4c1 100644 --- a/jobs/demo-importer/db/db.go +++ b/jobs/post-install-job/db/db.go @@ -4,7 +4,7 @@ import ( "errors" "github.com/jackc/pgtype" - "github.com/opengovern/opengovernance/jobs/demo-importer/db/model" + "github.com/opengovern/opengovernance/jobs/post-install-job/db/model" "gorm.io/gorm" ) diff --git a/jobs/migrator/db/model/migration.go b/jobs/post-install-job/db/model/migration.go similarity index 100% rename from jobs/migrator/db/model/migration.go rename to jobs/post-install-job/db/model/migration.go diff --git a/jobs/migrator/job/git.go b/jobs/post-install-job/job/git.go similarity index 93% rename from jobs/migrator/job/git.go rename to jobs/post-install-job/job/git.go index 156496d75..98b90f378 100644 --- a/jobs/migrator/job/git.go +++ b/jobs/post-install-job/job/git.go @@ -1,15 +1,14 @@ package job import ( - "os" -"encoding/json" + "encoding/json" // "strings" -git2 "github.com/opengovern/opengovernance/jobs/migrator/job/git" "github.com/opengovern/og-util/pkg/api" "github.com/opengovern/og-util/pkg/httpclient" - "github.com/opengovern/opengovernance/jobs/migrator/config" + "github.com/opengovern/opengovernance/jobs/post-install-job/config" + git2 "github.com/opengovern/opengovernance/jobs/post-install-job/job/git" "github.com/opengovern/opengovernance/services/metadata/client" "github.com/opengovern/opengovernance/services/metadata/models" "go.uber.org/zap" diff --git a/jobs/migrator/job/git/diff.go b/jobs/post-install-job/job/git/diff.go similarity index 100% rename from jobs/migrator/job/git/diff.go rename to jobs/post-install-job/job/git/diff.go diff --git a/jobs/migrator/job/git/fetch.go b/jobs/post-install-job/job/git/fetch.go similarity index 100% rename from jobs/migrator/job/git/fetch.go rename to jobs/post-install-job/job/git/fetch.go diff --git a/jobs/post-install-job/job/migration_list.go b/jobs/post-install-job/job/migration_list.go new file mode 100644 index 000000000..d262a870f --- /dev/null +++ b/jobs/post-install-job/job/migration_list.go @@ -0,0 +1,30 @@ +package job + +import ( + "github.com/opengovern/opengovernance/jobs/post-install-job/job/migrations/auth" + "github.com/opengovern/opengovernance/jobs/post-install-job/job/migrations/compliance" + "github.com/opengovern/opengovernance/jobs/post-install-job/job/migrations/elasticsearch" + "github.com/opengovern/opengovernance/jobs/post-install-job/job/migrations/integration" + "github.com/opengovern/opengovernance/jobs/post-install-job/job/migrations/inventory" + "github.com/opengovern/opengovernance/jobs/post-install-job/job/migrations/metadata" + "github.com/opengovern/opengovernance/jobs/post-install-job/job/migrations/resource_collection" + "github.com/opengovern/opengovernance/jobs/post-install-job/job/migrations/resource_info" + "github.com/opengovern/opengovernance/jobs/post-install-job/job/types" +) + +var migrations = map[string]types.Migration{ + + "elasticsearch": elasticsearch.Migration{}, + +} + +var manualMigrations =map[string]types.Migration{ + "metadata": metadata.Migration{}, + "integration": integration.Migration{}, + "inventory": inventory.Migration{}, + "resource_collection": resource_collection.Migration{}, + "elasticsearch": elasticsearch.Migration{}, + "compliance": compliance.Migration{}, + "resource_info": resource_info.Migration{}, + "auth": auth.Migration{}, +} diff --git a/jobs/migrator/job/migrations/auth/create_user.go b/jobs/post-install-job/job/migrations/auth/create_user.go similarity index 97% rename from jobs/migrator/job/migrations/auth/create_user.go rename to jobs/post-install-job/job/migrations/auth/create_user.go index 5fc9a4c21..530e4048f 100644 --- a/jobs/migrator/job/migrations/auth/create_user.go +++ b/jobs/post-install-job/job/migrations/auth/create_user.go @@ -7,7 +7,7 @@ import ( dexApi "github.com/dexidp/dex/api/v2" "github.com/opengovern/og-util/pkg/api" "github.com/opengovern/og-util/pkg/postgres" - "github.com/opengovern/opengovernance/jobs/migrator/config" + "github.com/opengovern/opengovernance/jobs/post-install-job/config" "github.com/opengovern/opengovernance/services/auth/db" "go.uber.org/zap" "golang.org/x/crypto/bcrypt" diff --git a/jobs/migrator/job/migrations/compliance/benchmark_metadata.go b/jobs/post-install-job/job/migrations/compliance/benchmark_metadata.go similarity index 100% rename from jobs/migrator/job/migrations/compliance/benchmark_metadata.go rename to jobs/post-install-job/job/migrations/compliance/benchmark_metadata.go diff --git a/jobs/migrator/job/migrations/compliance/git_parser.go b/jobs/post-install-job/job/migrations/compliance/git_parser.go similarity index 99% rename from jobs/migrator/job/migrations/compliance/git_parser.go rename to jobs/post-install-job/job/migrations/compliance/git_parser.go index f1d0af2af..9ffeb9cf3 100644 --- a/jobs/migrator/job/migrations/compliance/git_parser.go +++ b/jobs/post-install-job/job/migrations/compliance/git_parser.go @@ -12,7 +12,7 @@ import ( "github.com/goccy/go-yaml" "github.com/jackc/pgtype" "github.com/opengovern/og-util/pkg/model" - "github.com/opengovern/opengovernance/jobs/migrator/job/git" + "github.com/opengovern/opengovernance/jobs/post-install-job/job/git" "github.com/opengovern/opengovernance/pkg/types" "github.com/opengovern/opengovernance/services/compliance/db" "github.com/opengovern/opengovernance/services/metadata/models" diff --git a/jobs/migrator/job/migrations/compliance/populate.go b/jobs/post-install-job/job/migrations/compliance/populate.go similarity index 98% rename from jobs/migrator/job/migrations/compliance/populate.go rename to jobs/post-install-job/job/migrations/compliance/populate.go index e3cb39a45..1932428f4 100644 --- a/jobs/migrator/job/migrations/compliance/populate.go +++ b/jobs/post-install-job/job/migrations/compliance/populate.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/opengovern/og-util/pkg/postgres" - "github.com/opengovern/opengovernance/jobs/migrator/config" + "github.com/opengovern/opengovernance/jobs/post-install-job/config" "github.com/opengovern/opengovernance/services/compliance/db" "github.com/opengovern/opengovernance/services/metadata/models" "go.uber.org/zap" diff --git a/jobs/migrator/job/migrations/compliance/translator_model.go b/jobs/post-install-job/job/migrations/compliance/translator_model.go similarity index 95% rename from jobs/migrator/job/migrations/compliance/translator_model.go rename to jobs/post-install-job/job/migrations/compliance/translator_model.go index 5b69149a9..5adc3f215 100644 --- a/jobs/migrator/job/migrations/compliance/translator_model.go +++ b/jobs/post-install-job/job/migrations/compliance/translator_model.go @@ -1,7 +1,7 @@ package compliance import ( - "github.com/opengovern/opengovernance/jobs/migrator/job/migrations/shared" + "github.com/opengovern/opengovernance/jobs/post-install-job/job/migrations/shared" ) type Benchmark struct { diff --git a/jobs/migrator/job/migrations/elasticsearch/migrator.go b/jobs/post-install-job/job/migrations/elasticsearch/migrator.go similarity index 98% rename from jobs/migrator/job/migrations/elasticsearch/migrator.go rename to jobs/post-install-job/job/migrations/elasticsearch/migrator.go index cd9397878..37c6cb06b 100644 --- a/jobs/migrator/job/migrations/elasticsearch/migrator.go +++ b/jobs/post-install-job/job/migrations/elasticsearch/migrator.go @@ -10,7 +10,7 @@ import ( "time" "github.com/opengovern/og-util/pkg/opengovernance-es-sdk" - "github.com/opengovern/opengovernance/jobs/migrator/config" + "github.com/opengovern/opengovernance/jobs/post-install-job/config" "go.uber.org/zap" ) diff --git a/jobs/migrator/job/migrations/integration/defaults.go b/jobs/post-install-job/job/migrations/integration/defaults.go similarity index 100% rename from jobs/migrator/job/migrations/integration/defaults.go rename to jobs/post-install-job/job/migrations/integration/defaults.go diff --git a/jobs/migrator/job/migrations/integration/git_parser.go b/jobs/post-install-job/job/migrations/integration/git_parser.go similarity index 100% rename from jobs/migrator/job/migrations/integration/git_parser.go rename to jobs/post-install-job/job/migrations/integration/git_parser.go diff --git a/jobs/migrator/job/migrations/integration/migrator.go b/jobs/post-install-job/job/migrations/integration/migrator.go similarity index 97% rename from jobs/migrator/job/migrations/integration/migrator.go rename to jobs/post-install-job/job/migrations/integration/migrator.go index 854cb820b..3925495ab 100644 --- a/jobs/migrator/job/migrations/integration/migrator.go +++ b/jobs/post-install-job/job/migrations/integration/migrator.go @@ -7,8 +7,8 @@ import ( "os" "github.com/jackc/pgtype" - "github.com/opengovern/opengovernance/jobs/migrator/config" - "github.com/opengovern/opengovernance/jobs/migrator/db" + "github.com/opengovern/opengovernance/jobs/post-install-job/config" + "github.com/opengovern/opengovernance/jobs/post-install-job/db" integration_type "github.com/opengovern/opengovernance/services/integration/integration-type" integrationModels "github.com/opengovern/opengovernance/services/integration/models" "gorm.io/gorm/clause" diff --git a/jobs/migrator/job/migrations/inventory/migrator.go b/jobs/post-install-job/job/migrations/inventory/migrator.go similarity index 97% rename from jobs/migrator/job/migrations/inventory/migrator.go rename to jobs/post-install-job/job/migrations/inventory/migrator.go index 73f9fc6eb..9b07821ad 100644 --- a/jobs/migrator/job/migrations/inventory/migrator.go +++ b/jobs/post-install-job/job/migrations/inventory/migrator.go @@ -10,8 +10,8 @@ import ( "github.com/opengovern/og-util/pkg/model" "github.com/opengovern/og-util/pkg/postgres" - "github.com/opengovern/opengovernance/jobs/migrator/config" - "github.com/opengovern/opengovernance/jobs/migrator/db" + "github.com/opengovern/opengovernance/jobs/post-install-job/config" + "github.com/opengovern/opengovernance/jobs/post-install-job/db" integration_type "github.com/opengovern/opengovernance/services/integration/integration-type" "github.com/opengovern/opengovernance/services/inventory" "go.uber.org/zap" diff --git a/jobs/migrator/job/migrations/metadata/migrator.go b/jobs/post-install-job/job/migrations/metadata/migrator.go similarity index 94% rename from jobs/migrator/job/migrations/metadata/migrator.go rename to jobs/post-install-job/job/migrations/metadata/migrator.go index 5ee5e34ae..11f8078b2 100644 --- a/jobs/migrator/job/migrations/metadata/migrator.go +++ b/jobs/post-install-job/job/migrations/metadata/migrator.go @@ -7,8 +7,8 @@ import ( "os" "github.com/opengovern/og-util/pkg/postgres" - "github.com/opengovern/opengovernance/jobs/migrator/config" - "github.com/opengovern/opengovernance/jobs/migrator/db" + "github.com/opengovern/opengovernance/jobs/post-install-job/config" + "github.com/opengovern/opengovernance/jobs/post-install-job/db" "github.com/opengovern/opengovernance/services/metadata/models" "go.uber.org/zap" "gorm.io/gorm/clause" diff --git a/jobs/migrator/job/migrations/resource_collection/git_parser.go b/jobs/post-install-job/job/migrations/resource_collection/git_parser.go similarity index 100% rename from jobs/migrator/job/migrations/resource_collection/git_parser.go rename to jobs/post-install-job/job/migrations/resource_collection/git_parser.go diff --git a/jobs/migrator/job/migrations/resource_collection/migration.go b/jobs/post-install-job/job/migrations/resource_collection/migration.go similarity index 96% rename from jobs/migrator/job/migrations/resource_collection/migration.go rename to jobs/post-install-job/job/migrations/resource_collection/migration.go index 915460711..452b244ac 100644 --- a/jobs/migrator/job/migrations/resource_collection/migration.go +++ b/jobs/post-install-job/job/migrations/resource_collection/migration.go @@ -10,8 +10,8 @@ import ( "github.com/opengovern/og-util/pkg/model" "github.com/opengovern/og-util/pkg/opengovernance-es-sdk" "github.com/opengovern/og-util/pkg/postgres" - "github.com/opengovern/opengovernance/jobs/migrator/config" - "github.com/opengovern/opengovernance/jobs/migrator/db" + "github.com/opengovern/opengovernance/jobs/post-install-job/config" + "github.com/opengovern/opengovernance/jobs/post-install-job/db" "github.com/opengovern/opengovernance/services/inventory" "go.uber.org/zap" "gorm.io/gorm" diff --git a/jobs/migrator/job/migrations/resource_info/migrator.go b/jobs/post-install-job/job/migrations/resource_info/migrator.go similarity index 94% rename from jobs/migrator/job/migrations/resource_info/migrator.go rename to jobs/post-install-job/job/migrations/resource_info/migrator.go index 12b9d6146..078a1360f 100644 --- a/jobs/migrator/job/migrations/resource_info/migrator.go +++ b/jobs/post-install-job/job/migrations/resource_info/migrator.go @@ -8,8 +8,8 @@ import ( "path" "github.com/opengovern/og-util/pkg/postgres" - "github.com/opengovern/opengovernance/jobs/migrator/config" - "github.com/opengovern/opengovernance/jobs/migrator/db" + "github.com/opengovern/opengovernance/jobs/post-install-job/config" + "github.com/opengovern/opengovernance/jobs/post-install-job/db" integration_type "github.com/opengovern/opengovernance/services/integration/integration-type" "github.com/opengovern/opengovernance/services/inventory" "go.uber.org/zap" diff --git a/jobs/migrator/job/migrations/shared/query.go b/jobs/post-install-job/job/migrations/shared/query.go similarity index 100% rename from jobs/migrator/job/migrations/shared/query.go rename to jobs/post-install-job/job/migrations/shared/query.go diff --git a/jobs/migrator/job/types/file_hash.go b/jobs/post-install-job/job/types/file_hash.go similarity index 100% rename from jobs/migrator/job/types/file_hash.go rename to jobs/post-install-job/job/types/file_hash.go diff --git a/jobs/migrator/job/types/migration.go b/jobs/post-install-job/job/types/migration.go similarity index 75% rename from jobs/migrator/job/types/migration.go rename to jobs/post-install-job/job/types/migration.go index 574f67ff5..74007f3a7 100644 --- a/jobs/migrator/job/types/migration.go +++ b/jobs/post-install-job/job/types/migration.go @@ -3,7 +3,7 @@ package types import ( "context" - "github.com/opengovern/opengovernance/jobs/migrator/config" + "github.com/opengovern/opengovernance/jobs/post-install-job/config" "go.uber.org/zap" ) diff --git a/jobs/migrator/job/updated.go b/jobs/post-install-job/job/updated.go similarity index 92% rename from jobs/migrator/job/updated.go rename to jobs/post-install-job/job/updated.go index 39bc8c5c8..e6cde3de2 100644 --- a/jobs/migrator/job/updated.go +++ b/jobs/post-install-job/job/updated.go @@ -9,8 +9,8 @@ import ( "strings" "time" - "github.com/opengovern/opengovernance/jobs/migrator/db/model" - "github.com/opengovern/opengovernance/jobs/migrator/job/types" + "github.com/opengovern/opengovernance/jobs/post-install-job/db/model" + "github.com/opengovern/opengovernance/jobs/post-install-job/job/types" "go.uber.org/zap" ) diff --git a/jobs/migrator/job/worker.go b/jobs/post-install-job/job/worker.go similarity index 95% rename from jobs/migrator/job/worker.go rename to jobs/post-install-job/job/worker.go index 382245e54..6d547811b 100644 --- a/jobs/migrator/job/worker.go +++ b/jobs/post-install-job/job/worker.go @@ -8,10 +8,10 @@ import ( "github.com/jackc/pgtype" "github.com/opengovern/og-util/pkg/postgres" - "github.com/opengovern/opengovernance/jobs/migrator/config" - "github.com/opengovern/opengovernance/jobs/migrator/db" - "github.com/opengovern/opengovernance/jobs/migrator/db/model" - "github.com/opengovern/opengovernance/jobs/migrator/job/types" + "github.com/opengovern/opengovernance/jobs/post-install-job/config" + "github.com/opengovern/opengovernance/jobs/post-install-job/db" + "github.com/opengovern/opengovernance/jobs/post-install-job/db/model" + "github.com/opengovern/opengovernance/jobs/post-install-job/job/types" "go.uber.org/zap" ) diff --git a/jobs/query-runner/command.go b/jobs/query-runner-job/command.go similarity index 100% rename from jobs/query-runner/command.go rename to jobs/query-runner-job/command.go diff --git a/jobs/query-runner/const.go b/jobs/query-runner-job/const.go similarity index 100% rename from jobs/query-runner/const.go rename to jobs/query-runner-job/const.go diff --git a/jobs/query-runner/job.go b/jobs/query-runner-job/job.go similarity index 100% rename from jobs/query-runner/job.go rename to jobs/query-runner-job/job.go diff --git a/jobs/query-runner/job_result.go b/jobs/query-runner-job/job_result.go similarity index 100% rename from jobs/query-runner/job_result.go rename to jobs/query-runner-job/job_result.go diff --git a/jobs/query-runner/service.go b/jobs/query-runner-job/service.go similarity index 100% rename from jobs/query-runner/service.go rename to jobs/query-runner-job/service.go diff --git a/jobs/query-runner/sql_runner.go b/jobs/query-runner-job/sql_runner.go similarity index 100% rename from jobs/query-runner/sql_runner.go rename to jobs/query-runner-job/sql_runner.go diff --git a/jobs/query-runner/types.go b/jobs/query-runner-job/types.go similarity index 100% rename from jobs/query-runner/types.go rename to jobs/query-runner-job/types.go diff --git a/jobs/query-validator/command.go b/jobs/query-validator-job/command.go similarity index 100% rename from jobs/query-validator/command.go rename to jobs/query-validator-job/command.go diff --git a/jobs/query-validator/const.go b/jobs/query-validator-job/const.go similarity index 100% rename from jobs/query-validator/const.go rename to jobs/query-validator-job/const.go diff --git a/jobs/query-validator/job.go b/jobs/query-validator-job/job.go similarity index 100% rename from jobs/query-validator/job.go rename to jobs/query-validator-job/job.go diff --git a/jobs/query-validator/job_result.go b/jobs/query-validator-job/job_result.go similarity index 100% rename from jobs/query-validator/job_result.go rename to jobs/query-validator-job/job_result.go diff --git a/jobs/query-validator/service.go b/jobs/query-validator-job/service.go similarity index 100% rename from jobs/query-validator/service.go rename to jobs/query-validator-job/service.go diff --git a/jobs/query-validator/sql_runner.go b/jobs/query-validator-job/sql_runner.go similarity index 100% rename from jobs/query-validator/sql_runner.go rename to jobs/query-validator-job/sql_runner.go diff --git a/jobs/query-validator/types.go b/jobs/query-validator-job/types.go similarity index 100% rename from jobs/query-validator/types.go rename to jobs/query-validator-job/types.go diff --git a/services/compliance/es/benchmark_summary.go b/services/compliance/es/benchmark_summary.go index 43509cdc1..244606afb 100644 --- a/services/compliance/es/benchmark_summary.go +++ b/services/compliance/es/benchmark_summary.go @@ -9,7 +9,7 @@ import ( "strings" "time" - types2 "github.com/opengovern/opengovernance/jobs/compliance-summarizer/types" + types2 "github.com/opengovern/opengovernance/jobs/compliance-summarizer-job/types" "github.com/opengovern/opengovernance/pkg/types" "github.com/opengovern/og-util/pkg/opengovernance-es-sdk" diff --git a/services/compliance/http_handler.go b/services/compliance/http_handler.go index df9ea1606..2910be82f 100644 --- a/services/compliance/http_handler.go +++ b/services/compliance/http_handler.go @@ -5,7 +5,7 @@ import ( "fmt" helmv2 "github.com/fluxcd/helm-controller/api/v2beta1" - "github.com/opengovern/opengovernance/jobs/migrator/db/model" + "github.com/opengovern/opengovernance/jobs/post-install-job/db/model" integrationClient "github.com/opengovern/opengovernance/services/integration/client" metadataClient "github.com/opengovern/opengovernance/services/metadata/client" "github.com/sashabaranov/go-openai" diff --git a/services/compliance/http_routes.go b/services/compliance/http_routes.go index e6f5a492a..61f8d020f 100644 --- a/services/compliance/http_routes.go +++ b/services/compliance/http_routes.go @@ -25,9 +25,9 @@ import ( httpserver2 "github.com/opengovern/og-util/pkg/httpserver" "github.com/opengovern/og-util/pkg/integration" "github.com/opengovern/og-util/pkg/model" - runner "github.com/opengovern/opengovernance/jobs/compliance-runner" - "github.com/opengovern/opengovernance/jobs/compliance-summarizer/types" - model2 "github.com/opengovern/opengovernance/jobs/migrator/db/model" + runner "github.com/opengovern/opengovernance/jobs/compliance-runner-job" + "github.com/opengovern/opengovernance/jobs/compliance-summarizer-job/types" + model2 "github.com/opengovern/opengovernance/jobs/post-install-job/db/model" opengovernanceTypes "github.com/opengovern/opengovernance/pkg/types" types2 "github.com/opengovern/opengovernance/pkg/types" "github.com/opengovern/opengovernance/pkg/utils" diff --git a/services/describe/api/jobs.go b/services/describe/api/jobs.go index db4e9bddb..945caa213 100644 --- a/services/describe/api/jobs.go +++ b/services/describe/api/jobs.go @@ -3,7 +3,7 @@ package api import ( "time" - queryrunner "github.com/opengovern/opengovernance/jobs/query-runner" + queryrunner "github.com/opengovern/opengovernance/jobs/query-runner-job" ) type JobType string diff --git a/services/describe/db/checkup.go b/services/describe/db/checkup.go index 1568158b4..daaa5a031 100644 --- a/services/describe/db/checkup.go +++ b/services/describe/db/checkup.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - checkupapi "github.com/opengovern/opengovernance/jobs/checkup/api" + checkupapi "github.com/opengovern/opengovernance/jobs/checkup-job/api" "github.com/opengovern/opengovernance/services/describe/db/model" "gorm.io/gorm" ) diff --git a/services/describe/db/compliance_runner.go b/services/describe/db/compliance_runner.go index 94d2789b9..6785c5f38 100644 --- a/services/describe/db/compliance_runner.go +++ b/services/describe/db/compliance_runner.go @@ -4,7 +4,7 @@ import ( "errors" "time" - runner "github.com/opengovern/opengovernance/jobs/compliance-runner" + runner "github.com/opengovern/opengovernance/jobs/compliance-runner-job" "github.com/opengovern/opengovernance/services/describe/db/model" "gorm.io/gorm" ) diff --git a/services/describe/db/compliance_summarizer.go b/services/describe/db/compliance_summarizer.go index 5e7295767..4cb68853d 100644 --- a/services/describe/db/compliance_summarizer.go +++ b/services/describe/db/compliance_summarizer.go @@ -4,7 +4,7 @@ import ( "errors" "time" - summarizer "github.com/opengovern/opengovernance/jobs/compliance-summarizer" + summarizer "github.com/opengovern/opengovernance/jobs/compliance-summarizer-job" "github.com/opengovern/opengovernance/services/describe/db/model" "gorm.io/gorm" ) diff --git a/services/describe/db/model/checkup.go b/services/describe/db/model/checkup.go index 4350b6400..9e8f32c85 100644 --- a/services/describe/db/model/checkup.go +++ b/services/describe/db/model/checkup.go @@ -1,7 +1,7 @@ package model import ( - checkupapi "github.com/opengovern/opengovernance/jobs/checkup/api" + checkupapi "github.com/opengovern/opengovernance/jobs/checkup-job/api" "gorm.io/gorm" ) diff --git a/services/describe/db/model/compliance_job.go b/services/describe/db/model/compliance_job.go index a3b76a5dd..3b320d83c 100644 --- a/services/describe/db/model/compliance_job.go +++ b/services/describe/db/model/compliance_job.go @@ -6,8 +6,8 @@ import ( "time" "github.com/lib/pq" - runner "github.com/opengovern/opengovernance/jobs/compliance-runner" - summarizer "github.com/opengovern/opengovernance/jobs/compliance-summarizer" + runner "github.com/opengovern/opengovernance/jobs/compliance-runner-job" + summarizer "github.com/opengovern/opengovernance/jobs/compliance-summarizer-job" "github.com/opengovern/opengovernance/services/describe/api" "gorm.io/gorm" ) diff --git a/services/describe/db/model/query_runner.go b/services/describe/db/model/query_runner.go index 2bbe62662..31d8844d9 100644 --- a/services/describe/db/model/query_runner.go +++ b/services/describe/db/model/query_runner.go @@ -1,7 +1,7 @@ package model import ( - queryrunner "github.com/opengovern/opengovernance/jobs/query-runner" + queryrunner "github.com/opengovern/opengovernance/jobs/query-runner-job" "gorm.io/gorm" ) diff --git a/services/describe/db/model/query_validator.go b/services/describe/db/model/query_validator.go index b21ac753a..56989e983 100644 --- a/services/describe/db/model/query_validator.go +++ b/services/describe/db/model/query_validator.go @@ -1,7 +1,7 @@ package model import ( - queryvalidator "github.com/opengovern/opengovernance/jobs/query-validator" + queryvalidator "github.com/opengovern/opengovernance/jobs/query-validator-job" "gorm.io/gorm" ) diff --git a/services/describe/db/query_runner.go b/services/describe/db/query_runner.go index 8c500c52d..7a3562031 100644 --- a/services/describe/db/query_runner.go +++ b/services/describe/db/query_runner.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - queryrunner "github.com/opengovern/opengovernance/jobs/query-runner" + queryrunner "github.com/opengovern/opengovernance/jobs/query-runner-job" "github.com/opengovern/opengovernance/services/describe/db/model" "gorm.io/gorm" ) diff --git a/services/describe/db/query_validator.go b/services/describe/db/query_validator.go index f9955641b..a64f0f1ee 100644 --- a/services/describe/db/query_validator.go +++ b/services/describe/db/query_validator.go @@ -4,9 +4,9 @@ import ( "errors" "fmt" - queryrunner "github.com/opengovern/opengovernance/jobs/query-runner" + queryrunner "github.com/opengovern/opengovernance/jobs/query-runner-job" - queryvalidator "github.com/opengovern/opengovernance/jobs/query-validator" + queryvalidator "github.com/opengovern/opengovernance/jobs/query-validator-job" "github.com/opengovern/opengovernance/services/describe/db/model" "gorm.io/gorm" ) diff --git a/services/describe/scheduler.go b/services/describe/scheduler.go index 33b3c6dd3..d2f9caadd 100644 --- a/services/describe/scheduler.go +++ b/services/describe/scheduler.go @@ -12,10 +12,10 @@ import ( "sync" "time" - queryvalidator "github.com/opengovern/opengovernance/jobs/query-validator" + queryvalidator "github.com/opengovern/opengovernance/jobs/query-validator-job" "github.com/opengovern/og-util/pkg/opengovernance-es-sdk" - queryrunner "github.com/opengovern/opengovernance/jobs/query-runner" + queryrunner "github.com/opengovern/opengovernance/jobs/query-runner-job" queryrunnerscheduler "github.com/opengovern/opengovernance/services/describe/schedulers/query-runner" queryrvalidatorscheduler "github.com/opengovern/opengovernance/services/describe/schedulers/query-validator" integration_type "github.com/opengovern/opengovernance/services/integration/integration-type" @@ -30,10 +30,10 @@ import ( "github.com/opengovern/og-util/pkg/postgres" "github.com/opengovern/og-util/pkg/ticker" "github.com/opengovern/og-util/proto/src/golang" - "github.com/opengovern/opengovernance/jobs/checkup" - checkupAPI "github.com/opengovern/opengovernance/jobs/checkup/api" - runner "github.com/opengovern/opengovernance/jobs/compliance-runner" - summarizer "github.com/opengovern/opengovernance/jobs/compliance-summarizer" + "github.com/opengovern/opengovernance/jobs/checkup-job" + checkupAPI "github.com/opengovern/opengovernance/jobs/checkup-job/api" + runner "github.com/opengovern/opengovernance/jobs/compliance-runner-job" + summarizer "github.com/opengovern/opengovernance/jobs/compliance-summarizer-job" "github.com/opengovern/opengovernance/pkg/utils" "github.com/opengovern/opengovernance/services/compliance/client" "github.com/opengovern/opengovernance/services/describe/api" diff --git a/services/describe/scheduler_job_sequencer.go b/services/describe/scheduler_job_sequencer.go index 80c69cc8e..f475954a9 100644 --- a/services/describe/scheduler_job_sequencer.go +++ b/services/describe/scheduler_job_sequencer.go @@ -8,7 +8,7 @@ import ( authApi "github.com/opengovern/og-util/pkg/api" "github.com/opengovern/og-util/pkg/httpclient" - runner "github.com/opengovern/opengovernance/jobs/compliance-runner" + runner "github.com/opengovern/opengovernance/jobs/compliance-runner-job" "github.com/opengovern/opengovernance/services/compliance/api" "github.com/opengovern/og-util/pkg/ticker" diff --git a/services/describe/schedulers/compliance/consumer.go b/services/describe/schedulers/compliance/consumer.go index 8474936f5..93aab10df 100644 --- a/services/describe/schedulers/compliance/consumer.go +++ b/services/describe/schedulers/compliance/consumer.go @@ -6,8 +6,8 @@ import ( "time" "github.com/nats-io/nats.go/jetstream" - runner "github.com/opengovern/opengovernance/jobs/compliance-runner" - summarizer "github.com/opengovern/opengovernance/jobs/compliance-summarizer" + runner "github.com/opengovern/opengovernance/jobs/compliance-runner-job" + summarizer "github.com/opengovern/opengovernance/jobs/compliance-summarizer-job" "go.uber.org/zap" ) diff --git a/services/describe/schedulers/compliance/publisher.go b/services/describe/schedulers/compliance/publisher.go index 4dff3f655..6081f6b04 100644 --- a/services/describe/schedulers/compliance/publisher.go +++ b/services/describe/schedulers/compliance/publisher.go @@ -10,7 +10,7 @@ import ( integrationapi "github.com/opengovern/opengovernance/services/integration/api/models" "golang.org/x/net/context" - runner "github.com/opengovern/opengovernance/jobs/compliance-runner" + runner "github.com/opengovern/opengovernance/jobs/compliance-runner-job" complianceApi "github.com/opengovern/opengovernance/services/compliance/api" "go.uber.org/zap" ) diff --git a/services/describe/schedulers/compliance/summarizer.go b/services/describe/schedulers/compliance/summarizer.go index 773989391..a03ab50a2 100644 --- a/services/describe/schedulers/compliance/summarizer.go +++ b/services/describe/schedulers/compliance/summarizer.go @@ -7,8 +7,8 @@ import ( "strings" "time" - summarizer "github.com/opengovern/opengovernance/jobs/compliance-summarizer" - types2 "github.com/opengovern/opengovernance/jobs/compliance-summarizer/types" + summarizer "github.com/opengovern/opengovernance/jobs/compliance-summarizer-job" + types2 "github.com/opengovern/opengovernance/jobs/compliance-summarizer-job/types" "github.com/opengovern/opengovernance/pkg/types" "github.com/opengovern/opengovernance/services/describe/db/model" "go.uber.org/zap" diff --git a/services/describe/schedulers/compliance/trigger.go b/services/describe/schedulers/compliance/trigger.go index d22cb57af..6c4c9ea1d 100644 --- a/services/describe/schedulers/compliance/trigger.go +++ b/services/describe/schedulers/compliance/trigger.go @@ -9,7 +9,7 @@ import ( complianceApi "github.com/opengovern/opengovernance/services/compliance/api" integrationapi "github.com/opengovern/opengovernance/services/integration/api/models" - runner "github.com/opengovern/opengovernance/jobs/compliance-runner" + runner "github.com/opengovern/opengovernance/jobs/compliance-runner-job" "github.com/opengovern/opengovernance/services/describe/db/model" "go.uber.org/zap" ) diff --git a/services/describe/schedulers/query-runner/consumer.go b/services/describe/schedulers/query-runner/consumer.go index 22dc3dddc..ba4046f25 100644 --- a/services/describe/schedulers/query-runner/consumer.go +++ b/services/describe/schedulers/query-runner/consumer.go @@ -5,7 +5,7 @@ import ( "encoding/json" "github.com/nats-io/nats.go/jetstream" - queryrunner "github.com/opengovern/opengovernance/jobs/query-runner" + queryrunner "github.com/opengovern/opengovernance/jobs/query-runner-job" "go.uber.org/zap" ) diff --git a/services/describe/schedulers/query-runner/publisher.go b/services/describe/schedulers/query-runner/publisher.go index 7f3721252..7e2b656fd 100644 --- a/services/describe/schedulers/query-runner/publisher.go +++ b/services/describe/schedulers/query-runner/publisher.go @@ -9,7 +9,7 @@ import ( "github.com/opengovern/og-util/pkg/api" "github.com/opengovern/og-util/pkg/httpclient" - queryrunner "github.com/opengovern/opengovernance/jobs/query-runner" + queryrunner "github.com/opengovern/opengovernance/jobs/query-runner-job" inventoryApi "github.com/opengovern/opengovernance/services/inventory/api" "go.uber.org/zap" ) diff --git a/services/describe/schedulers/query-validator/consumer.go b/services/describe/schedulers/query-validator/consumer.go index bfe2ce800..4343f16e3 100644 --- a/services/describe/schedulers/query-validator/consumer.go +++ b/services/describe/schedulers/query-validator/consumer.go @@ -5,7 +5,7 @@ import ( "encoding/json" "github.com/nats-io/nats.go/jetstream" - queryvalidator "github.com/opengovern/opengovernance/jobs/query-validator" + queryvalidator "github.com/opengovern/opengovernance/jobs/query-validator-job" "go.uber.org/zap" ) diff --git a/services/describe/schedulers/query-validator/publisher.go b/services/describe/schedulers/query-validator/publisher.go index 3fa0dae59..9df7d00e2 100644 --- a/services/describe/schedulers/query-validator/publisher.go +++ b/services/describe/schedulers/query-validator/publisher.go @@ -9,7 +9,7 @@ import ( "github.com/opengovern/og-util/pkg/api" "github.com/opengovern/og-util/pkg/httpclient" - queryvalidator "github.com/opengovern/opengovernance/jobs/query-validator" + queryvalidator "github.com/opengovern/opengovernance/jobs/query-validator-job" inventoryApi "github.com/opengovern/opengovernance/services/inventory/api" "go.uber.org/zap" ) diff --git a/services/describe/schedulers/query-validator/scheduler.go b/services/describe/schedulers/query-validator/scheduler.go index 759fd92a0..a5d4e9786 100644 --- a/services/describe/schedulers/query-validator/scheduler.go +++ b/services/describe/schedulers/query-validator/scheduler.go @@ -5,7 +5,7 @@ import ( "github.com/opengovern/og-util/pkg/api" "github.com/opengovern/og-util/pkg/httpclient" - queryvalidator "github.com/opengovern/opengovernance/jobs/query-validator" + queryvalidator "github.com/opengovern/opengovernance/jobs/query-validator-job" "github.com/opengovern/opengovernance/services/describe/db/model" "go.uber.org/zap" ) diff --git a/services/describe/server.go b/services/describe/server.go index e1c5e06e7..670c3d816 100644 --- a/services/describe/server.go +++ b/services/describe/server.go @@ -15,12 +15,12 @@ import ( "github.com/jackc/pgtype" "github.com/labstack/echo/v4" apiAuth "github.com/opengovern/og-util/pkg/api" + "github.com/opengovern/og-util/pkg/describe/enums" "github.com/opengovern/og-util/pkg/httpclient" "github.com/opengovern/og-util/pkg/httpserver" "github.com/opengovern/og-util/pkg/opengovernance-es-sdk" - "github.com/opengovern/og-util/pkg/describe/enums" - runner2 "github.com/opengovern/opengovernance/jobs/compliance-runner" - queryrunner "github.com/opengovern/opengovernance/jobs/query-runner" + runner2 "github.com/opengovern/opengovernance/jobs/compliance-runner-job" + queryrunner "github.com/opengovern/opengovernance/jobs/query-runner-job" "github.com/opengovern/opengovernance/pkg/utils" integrationapi "github.com/opengovern/opengovernance/services/integration/api/models" integration_type "github.com/opengovern/opengovernance/services/integration/integration-type" diff --git a/services/inventory/http_routes.go b/services/inventory/http_routes.go index 34645514d..3487ace70 100644 --- a/services/inventory/http_routes.go +++ b/services/inventory/http_routes.go @@ -17,7 +17,7 @@ import ( "github.com/opengovern/og-util/pkg/httpclient" "github.com/opengovern/og-util/pkg/httpserver" "github.com/opengovern/og-util/pkg/integration" - queryrunner "github.com/opengovern/opengovernance/jobs/query-runner" + queryrunner "github.com/opengovern/opengovernance/jobs/query-runner-job" "github.com/opengovern/opengovernance/pkg/types" integration_type "github.com/opengovern/opengovernance/services/integration/integration-type" "github.com/opengovern/opengovernance/services/inventory/rego_runner" diff --git a/services/metadata/api/metadata.go b/services/metadata/api/metadata.go index 224f79101..dae2aee00 100644 --- a/services/metadata/api/metadata.go +++ b/services/metadata/api/metadata.go @@ -3,7 +3,7 @@ package api import ( "time" - "github.com/opengovern/opengovernance/jobs/migrator/db/model" + "github.com/opengovern/opengovernance/jobs/post-install-job/db/model" authApi "github.com/opengovern/opengovernance/services/auth/api" api "github.com/opengovern/opengovernance/services/integration/api/models" ) diff --git a/services/metadata/http_handler.go b/services/metadata/http_handler.go index 76aee4d40..22e70e162 100644 --- a/services/metadata/http_handler.go +++ b/services/metadata/http_handler.go @@ -14,8 +14,8 @@ import ( api6 "github.com/hashicorp/vault/api" "github.com/opengovern/og-util/pkg/postgres" "github.com/opengovern/og-util/pkg/vault" - db2 "github.com/opengovern/opengovernance/jobs/migrator/db" - "github.com/opengovern/opengovernance/jobs/migrator/db/model" + db2 "github.com/opengovern/opengovernance/jobs/post-install-job/db" + "github.com/opengovern/opengovernance/jobs/post-install-job/db/model" "github.com/opengovern/opengovernance/services/metadata/config" "github.com/opengovern/opengovernance/services/metadata/internal/database" "github.com/opengovern/opengovernance/services/metadata/models" diff --git a/services/metadata/http_routes.go b/services/metadata/http_routes.go index ed71fad0f..34eb8bb7e 100644 --- a/services/metadata/http_routes.go +++ b/services/metadata/http_routes.go @@ -17,8 +17,8 @@ import ( api3 "github.com/opengovern/og-util/pkg/api" "github.com/opengovern/og-util/pkg/httpclient" "github.com/opengovern/og-util/pkg/httpserver" - model2 "github.com/opengovern/opengovernance/jobs/demo-importer/db/model" - "github.com/opengovern/opengovernance/jobs/migrator/db/model" + model2 "github.com/opengovern/opengovernance/jobs/demo-importer-job/db/model" + "github.com/opengovern/opengovernance/jobs/post-install-job/db/model" client4 "github.com/opengovern/opengovernance/services/compliance/client" client3 "github.com/opengovern/opengovernance/services/describe/client" integrationApi "github.com/opengovern/opengovernance/services/integration/api/models"