Skip to content

Commit

Permalink
Merge pull request #442 from codacy/add_argo_cd_provider
Browse files Browse the repository at this point in the history
Add Argo CD provider integration TS-140
  • Loading branch information
stefanvacareanu7 authored Jan 10, 2023
2 parents 31c9926 + 4785e91 commit 5d63025
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ object CommitUUIDProvider extends LogSupport {

private val providers = List(
AppveyorProvider,
AzurePipelinesProvider,
ArgoCDProvider,
AWSCodeBuildProvider,
AzurePipelinesProvider,
BitriseCIProvider,
BuildkiteCIProvider,
CircleCIProvider,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.codacy.rules.commituuid.providers

import com.codacy.model.configuration.CommitUUID
import com.codacy.rules.commituuid.CommitUUIDProvider

/* Argo CD Provider */
object ArgoCDProvider extends CommitUUIDProvider {
val name: String = "Argo CD"

override def validateEnvironment(environment: Map[String, String]): Boolean = {
environment.contains("ARGOCD_APP_SOURCE_REPO_URL")
}

override def getValidCommitUUID(environment: Map[String, String]): Either[String, CommitUUID] =
parseEnvironmentVariable(environment.get("ARGOCD_APP_REVISION"))
}

0 comments on commit 5d63025

Please sign in to comment.