====== Jenkins Build Server ====== **September 2024:** A new build server has been created on our TransIP AMS2 Project to replace to existing Jenkins WinServer 2012 server ===== Server: ===== Hosted : TransIP (formerly CloudVPS) Openstack AMS2 Project\\ OS : WinServer2022\\ Memory : 24GB\\ Storage : 480GB\\ Cores : 6 ---- ===== Configuration ===== ==== SSL - Caddy ==== SSL for server domain is managed through Caddy running as a windows server Caddyfile.txt configuration: 'C:\Caddy' ==== Jenkins ==== Jenkins 64Bit .exe installed in 'C:\Program Files\Jenkins' Jenkins war & .Jenkins folders in 'C:\Users\Administrator\AppData\Local\Jenkins' ==== Job configs ==== config files for each job folder copied from previous server (need to organise backup of these config files) ==== Codesigning ==== Information for our Windows codesigning setup and instructions can be found [[procedures:apps:jenkins_config#code_signing|here]] Additionally - for windows 2012, the usbccid driver failed to run. By default, the driver loaded is UMDF2. On the older server (windows 2008) this was WUDF. To resolve, open device manager. Change the view to 'Devices by connection' {{:misc:jenkins:screenshot_2024-09-11_at_10.17.23 am.png?400|}} You can then double click on the 'Microsoft Usbccid Smartcard Reader (UMDF2)'. Change tab to 'Driver' and click 'Update driver'. Then 'Browse my computer for drivers' and 'Let me pick from a list of available drivers on my computer'. You can then choose the WUDF driver: {{:misc:jenkins:screenshot_2024-09-11_at_9.52.08 am.png?400|}} ==== Credentials ==== * Navigate to manage > credentials > System > Global credentials (unrestricted) (i.e. [jenkins url]/manage/credentials/store/system/domain/_/) * Add a credential with * ID: d0079555-9161-4225-a4d5-4856cd9795e8 * Username: jenkinsSussol * Password: [ see bitwarden ] Follow the steps in https://wiki.sussol.net/doku.php/procedures:apps:jenkins_config?s[]=jenkins#adding_personal_access_token ==== Git ==== Install the windows git client, using the default settings Add webhooks in git for the repos msupply, open-msupply, ??? * navigate to https://github.com/msupply-foundation/[repo]/settings/hooks * create a new webhook * Payload URL: https://jenkins-test.msupply.org/github-webhook/ * Content Type: application/json * Secret: [BW: Jenkins GitHub] * Enable SSL * Let me select individual events * Branch or tag creation * Pushes (this one is on by default) * Create a credential for github * Manage Jenkins > Credentials > System : add a domain for api.github.com * Add credential * Kind: Secret text * Scope: Global * Secret: [BW: jenkins GitHub] * ID: 23e95bb2-9f87-4998-8f1a-621fa95d5a78 * Description: Jenkins Sussol Access Token * Navigate to Manage Jenkins > System, scroll down to GitHub * Add GitHub Server * Name: GitHub * API URL: https://api.github.com * Credentials: Jenkins Sussol Access Token * Manage hooks: true * Enable long paths git config --system core.longpaths true ===== Open mSupply ===== A few additional installs are needed for open mSupply. Copy the c:\openssl folder and add the environment variable 'OPENSSL_DIR=C:\openssl' Install strawberry perl (https://strawberryperl.com/) to allow openssl to compile ===== Setup Factory ===== Install the full version. To do so, login to the indigo rose site using credentials in BW and download the current version. Note: using the trial version will cause the installer builds to hang, waiting for someone to click this: {{:misc:jenkins:screenshot_2024-09-11_at_9.49.33 pm.png?400|}} Copy the custom themes from C:\ProgramData\IndigoRose\Setup Factory\9.0\Themes (windows 2022) or C:\Documents and Settings\All Users\Application Data\IndigoRose\Setup Factory\9.0\Themes (windows 2008)