From e351f30d4a351a24dea492e42d4967f632a31dd0 Mon Sep 17 00:00:00 2001 From: zontreck Date: Fri, 31 Jan 2025 03:34:22 -0700 Subject: [PATCH] ci: Add jenkinsfile --- Jenkinsfile | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..139b5b8 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,46 @@ +pipeline { + agent any + + options { + buildDiscarder( + logRotator( + numToKeepStr: '5' + ) + ) + } + + stages { + stage("Build and Publish") { + agent { + label "flutter" + } + + steps { + script { + sh ''' + #!/bin/bash + + unset WORKSPACE + unset WORKSPACE_TMP + rm -rf doc || true + + flutter pub get + flutter pub publish -f --skip-validation || true + + dart doc + cd doc/api + tar -cvf ../../docs.tgz . + ''' + } + } + + post { + always { + archiveArtifacts artifacts: "docs.tgz" + + cleanWs() + } + } + } + } +} \ No newline at end of file