We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46c2e00 commit 699f974Copy full SHA for 699f974
src/main/scala/com/codacy/rules/commituuid/providers/DroneCIProvider.scala
@@ -0,0 +1,16 @@
1
+package com.codacy.rules.commituuid.providers
2
+
3
+import com.codacy.model.configuration.CommitUUID
4
+import com.codacy.rules.commituuid.CommitUUIDProvider
5
6
+/* Argo CD Provider */
7
+object DroneCIProvider extends CommitUUIDProvider {
8
+ val name: String = "Drone CI"
9
10
+ override def validateEnvironment(environment: Map[String, String]): Boolean = {
11
+ environment.get("CI").contains("true") && environment.get("DRONE").contains("true")
12
+ }
13
14
+ override def getValidCommitUUID(environment: Map[String, String]): Either[String, CommitUUID] =
15
+ parseEnvironmentVariable(environment.get("DRONE_COMMIT") orElse environment.get("DRONE_COMMIT_SHA"))
16
+}
0 commit comments