Skip to content

Commit

Permalink
Update Jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
michelu89 committed Feb 5, 2024
1 parent 9e25686 commit e8ed71c
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,56 @@ pipeline {
}
}
}

pipeline {
agent any

environment {
GH_TOKEN = credentials('github-bot')
}

stages {
stage('Download') {
steps {
script {
sh 'curl -L "https://github.com/eclipse-esmf/esmf-aspect-model-editor-backend/releases/download/v5.1.1/ame-backend-5.1.1-win.exe" -o unsigned.exe'
}
}
}

stage('Sign') {
steps {
script {
sh 'curl -o signed.exe -F [email protected] https://cbi.eclipse.org/authenticode/sign'
}
}
}

stage('Install GH CLI') {
steps {
script {
sh 'if ! command -v gh &> /dev/null; then echo "gh could not be found, installing..."; sudo apt update && sudo apt install gh -y; else echo "gh is already installed"; fi'
}
}
}

stage('Verify GH CLI Installation') {
steps {
script {
sh 'gh --version'
}
}
}

stage('Upload Signed File') {
steps {
script {
sh 'echo $GH_TOKEN | gh auth login --with-token'

sh 'gh release upload v5.2.1 signed.exe --clobber --repo eclipse-esmf/esmf-aspect-model-editor-backend'
}
}
}
}
}

0 comments on commit e8ed71c

Please sign in to comment.