ashwanthkumar / gocd-janitor

Attempt at a more intelligent GoCD purge policy
16 stars 11 forks source link

404 for /go/api/pipelines.xml #22

Open Deepak1100 opened 2 years ago

Deepak1100 commented 2 years ago

getting the following issue when trying to use it with 21.3.0 gocd version

bash-5.1$ /gocd-jre/bin/java -cp /tmp/gocd-janitor.jar in.ashwanthkumar.gocd.artifacts.Janitor --conf janitor.conf --dry-run --delete-artifacts
12:49:19.721 INFO  in.ashwanthkumar.gocd.artifacts.Janitor - Starting Janitor
12:49:19.723 INFO  in.ashwanthkumar.gocd.artifacts.Janitor - Go Server - https://gocd
12:49:19.723 INFO  in.ashwanthkumar.gocd.artifacts.Janitor - Artifact Dir - /godata/artifacts/pipelines/
12:49:19.723 INFO  in.ashwanthkumar.gocd.artifacts.Janitor - Working in Dry run mode, we will not delete anything in this run.
12:49:19.723 INFO  in.ashwanthkumar.gocd.artifacts.Janitor - Finding pipelines to process
12:49:19.729 DEBUG in.ashwanthkumar.gocd.client.http.HttpClient - Hitting https://gocd/go/api/pipelines.xml
Exception in thread "main" com.google.api.client.http.HttpResponseException: 404 Not Found
    at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1070)
    at in.ashwanthkumar.gocd.client.http.HttpClient.getXML(HttpClient.java:75)
    at in.ashwanthkumar.gocd.client.GoCD.allPipelineNames(GoCD.java:58)
    at in.ashwanthkumar.gocd.artifacts.Janitor.pipelinesNotInConfiguration(Janitor.java:109)
    at in.ashwanthkumar.gocd.artifacts.Janitor.getPipelines(Janitor.java:197)
    at in.ashwanthkumar.gocd.artifacts.Janitor.run(Janitor.java:89)
    at in.ashwanthkumar.gocd.artifacts.Janitor.main(Janitor.java:71)
bash-5.1$ /gocd-jre/bin/java -cp /tmp/gocd-janitor.jar in.ashwanthkumar.gocd.artifacts.Janitor --conf janitor.conf --dry-run --delete-artifacts%

is this project still active or work for latest gocd?

Deepak1100 commented 2 years ago

it seems api have changed to /go/api/feed/pipelines.xml