diff --git a/pkg/controller/projects_test.go b/pkg/controller/projects_test.go index 73046a65..52522ac4 100644 --- a/pkg/controller/projects_test.go +++ b/pkg/controller/projects_test.go @@ -17,7 +17,7 @@ func TestPullProjectsFromWildcard(t *testing.T) { mux.HandleFunc("/api/v4/projects", func(w http.ResponseWriter, r *http.Request) { - fmt.Fprint(w, `[{"id":1,"path_with_namespace":"foo","jobs_enabled":false},{"id":2,"path_with_namespace":"bar","jobs_enabled":true}]`) + fmt.Fprint(w, `[{"id":2,"path_with_namespace":"bar","jobs_enabled":true}]`) }) w := config.NewWildcard() diff --git a/pkg/gitlab/environments.go b/pkg/gitlab/environments.go index d36aace0..3bd098de 100644 --- a/pkg/gitlab/environments.go +++ b/pkg/gitlab/environments.go @@ -127,7 +127,7 @@ func (c *Client) GetEnvironment( "project-name": project, "environment-name": e.Name, }). - Warn("no deployments found for the environment") + Debug("no deployments found for the environment") return } diff --git a/pkg/gitlab/projects.go b/pkg/gitlab/projects.go index b658dda5..ff59deda 100644 --- a/pkg/gitlab/projects.go +++ b/pkg/gitlab/projects.go @@ -134,15 +134,6 @@ func (c *Client) ListProjects(ctx context.Context, w config.Wildcard) ([]schemas continue } - if !gp.JobsEnabled { - log.WithFields(logFields).WithFields(log.Fields{ - "project-id": gp.ID, - "project-name": gp.PathWithNamespace, - }).Debug("jobs/pipelines not enabled on project, skipping") - - continue - } - p := schemas.NewProject(gp.PathWithNamespace) p.ProjectParameters = w.ProjectParameters projects = append(projects, p) diff --git a/pkg/gitlab/projects_test.go b/pkg/gitlab/projects_test.go index bb8ffe2f..4959c888 100644 --- a/pkg/gitlab/projects_test.go +++ b/pkg/gitlab/projects_test.go @@ -44,7 +44,7 @@ func TestListUserProjects(t *testing.T) { mux.HandleFunc(fmt.Sprintf("/api/v4/users/%s/projects", w.Owner.Name), func(w http.ResponseWriter, r *http.Request) { assert.Equal(t, r.Method, "GET") - fmt.Fprint(w, `[{"id":1,"path_with_namespace":"foo/bar","jobs_enabled":true},{"id":2,"path_with_namespace":"bar/baz","jobs_enabled":true}]`) + fmt.Fprint(w, `[{"id":1,"path_with_namespace":"foo/bar"},{"id":2,"path_with_namespace":"bar/baz"}]`) }) projects, err := c.ListProjects(ctx, w) @@ -70,7 +70,7 @@ func TestListGroupProjects(t *testing.T) { mux.HandleFunc(fmt.Sprintf("/api/v4/groups/%s/projects", w.Owner.Name), func(w http.ResponseWriter, r *http.Request) { assert.Equal(t, r.Method, "GET") - fmt.Fprint(w, `[{"id":1,"path_with_namespace":"foo/bar","jobs_enabled":true},{"id":2,"path_with_namespace":"bar/baz","jobs_enabled":true}]`) + fmt.Fprint(w, `[{"id":1,"path_with_namespace":"foo/bar"},{"id":2,"path_with_namespace":"bar/baz"}]`) }) projects, err := c.ListProjects(ctx, w) @@ -96,7 +96,7 @@ func TestListProjects(t *testing.T) { mux.HandleFunc("/api/v4/projects", func(w http.ResponseWriter, r *http.Request) { assert.Equal(t, r.Method, "GET") - fmt.Fprint(w, `[{"id":1,"path_with_namespace":"foo","jobs_enabled":false},{"id":2,"path_with_namespace":"bar","jobs_enabled":true}]`) + fmt.Fprint(w, `[{"id":2,"path_with_namespace":"bar"}]`) }) projects, err := c.ListProjects(ctx, w)