installer/windows: add to private Jenkins build (#3206)

* Build Windows Installer stage

* Run the Windows Installer build on thw windows node

* Disable Build Images, Push Images and Upload steps

* checkout scm on windows agent

* Execute MSBuild

* Use bat instead of sh

* Test stash

* Copy artifacts between nodes

* Fix typo

* Sign Windows Installer

* Fix Makefile

* Enable binaries-upload

* Set Product Version to 0.0.0

* Build installer with Release configuration

* Enable back docker image stages and slack alerts

* Restore SNOboard shortcut after resolving conflicts

* Remove empty line from build.bat
This commit is contained in:
Kaloyan Raev 2019-10-08 05:51:22 -06:00 committed by littleskunk
parent d5b2e1ef89
commit 616b2f521a
4 changed files with 42 additions and 1 deletions

25
Jenkinsfile vendored
View File

@ -12,6 +12,30 @@ node('node') {
stage('Build Binaries') {
sh 'make binaries'
stash name: "storagenode-binaries", includes: "release/**/storagenode*.exe"
echo "Current build result: ${currentBuild.result}"
}
stage('Build Windows Installer') {
node('windows') {
checkout scm
unstash "storagenode-binaries"
bat 'installer\\windows\\build.bat'
stash name: "storagenode-installer", includes: "release/**/storagenode*.msi"
echo "Current build result: ${currentBuild.result}"
}
}
stage('Sign Windows Installer') {
unstash "storagenode-installer"
sh 'make sign-windows-installer'
echo "Current build result: ${currentBuild.result}"
}
@ -34,6 +58,7 @@ node('node') {
echo "Current build result: ${currentBuild.result}"
}
}
stage('Upload') {
sh 'make binaries-upload'
echo "Current build result: ${currentBuild.result}"

View File

@ -274,6 +274,10 @@ BINARIES := $(foreach C,$(COMPONENTLIST),$(foreach O,$(OSARCHLIST),$C_$O))
.PHONY: binaries
binaries: ${BINARIES} ## Build certificates, gateway, identity, inspector, linksharing, satellite, storagenode, uplink, and versioncontrol binaries (jenkins)
.PHONY: sign-windows-installer
sign-windows-installer:
storj-sign release/${TAG}/storagenode_windows_amd64.msi
.PHONY: libuplink
libuplink:
go build -ldflags="-s -w" -buildmode c-shared -o uplink.so storj.io/storj/lib/uplinkc

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:fire="http://schemas.microsoft.com/wix/FirewallExtension">
<Product Id="{E97D368F-CB18-45B5-8799-1EBB10728A99}" Name="Storj V3 Storage Node" Language="1033" Version="0.22.0.0" Manufacturer="Storj Labs Inc." UpgradeCode="{B32CF5FC-0665-4712-B88A-22D299565F9E}">
<Product Id="{E97D368F-CB18-45B5-8799-1EBB10728A99}" Name="Storj V3 Storage Node" Language="1033" Version="0.0.0" Manufacturer="Storj Labs Inc." UpgradeCode="{B32CF5FC-0665-4712-B88A-22D299565F9E}">
<Package Platform="x64" InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate EmbedCab="yes" />

View File

@ -0,0 +1,12 @@
rem set the TAG env var from the release dir
for /f %%i in ('dir /B release') do set TAG=%%i
rem copy the storagenode binaries to the installer project
copy release\%TAG%\storagenode_windows_amd64.exe installer\windows\storagenode.exe
copy release\%TAG%\storagenode-updater_windows_amd64.exe installer\windows\storagenode-updater.exe
rem build the installer
msbuild installer\windows\windows.sln /t:Build /p:Configuration=Release
rem copy the MSI to the release dir
copy installer\windows\bin\Release\storagenode.msi release\%TAG%\storagenode_windows_amd64.msi