feishuNotify.groovy 365 B

123456789101112131415
  1. #!/usr/bin/env groovy
  2. import com.example.FeishuNotifier
  3. def call(String webhookUrl, String status) {
  4. def duration = currentBuild.durationString.replace(' and counting', '')
  5. def notifier = new FeishuNotifier(this, webhookUrl)
  6. notifier.send(
  7. status,
  8. env.JOB_NAME,
  9. env.BUILD_NUMBER,
  10. env.BUILD_URL,
  11. duration
  12. )
  13. }