diff --git a/Jenkinsfile b/Jenkinsfile index d0f16ca..9cf4991 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -32,5 +32,21 @@ node('built-in') { } } + // generate Swift/Kotlin API clients and provide artifact for download + stage('Generate API Clients') { + if (env.BRANCH_NAME == "deploy") { + sh 'mkdir -p app' + + sh ''' + chmod +x generateStuds.sh + ./generateStuds.sh + ''' + + archiveArtifacts artifacts: 'app/**', allowEmptyArchive: false + } else { + echo "Skipping API client generation for non-deploy branch." + } + } + }