Skip to content

Commit

Permalink
[RHTAP-3262] Adds GITOPS_CREDENTIALS to Jenkins job configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
jsmid1 committed Nov 28, 2024
1 parent 9f30ebe commit 3062c24
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/apis/ci/jenkins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export class JenkinsCI extends Utils {
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
<url>https://${gitProvider}/${organization}/${jobName}</url>
<credentialsId>GITOPS_CREDENTIALS</credentialsId>
</hudson.plugins.git.UserRemoteConfig>
</userRemoteConfigs>
<branches>
Expand Down Expand Up @@ -194,10 +195,10 @@ export class JenkinsCI extends Utils {

public async deleteJenkinsJob(jobName: string) {
const url = `${this.jenkinsUrl}/job/${jobName}/doDelete`;

try {
const response = await this.axiosInstance.post(url);

if (response.status === 200) {
console.log(`Job '${jobName}' deleted successfully.`);
} else {
Expand Down

0 comments on commit 3062c24

Please sign in to comment.