aboutsummaryrefslogtreecommitdiffstats
path: root/.jenkins
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2017-05-28 14:01:47 -0500
committerAlex Gaynor <alex.gaynor@gmail.com>2017-05-28 15:01:47 -0400
commite4318ea34e34241e7bcda489325ba1a51054ada5 (patch)
tree501bbd5314dd4ced48dc2eea84d5f092d4ca53ad /.jenkins
parent9bf8174367bc27b64efc64b6bdd02795d34fe89d (diff)
downloadcryptography-e4318ea34e34241e7bcda489325ba1a51054ada5.tar.gz
cryptography-e4318ea34e34241e7bcda489325ba1a51054ada5.tar.bz2
cryptography-e4318ea34e34241e7bcda489325ba1a51054ada5.zip
add windows OpenSSL 1.1 jenkinsfile builder (#3624)
* add windows OpenSSL 1.1 jenkinsfile builder I tested this before submitting. You can see the output here: https://ci.cryptography.io/blue/organizations/jenkins/openssl-release-1.1/detail/openssl-release-1.1/8/pipeline Once this merges we can switch the jenkins job to pull this directly from the repository. Unfortunately the job does not get created automatically in jenkins, so that's a new step in building our infra * add comments
Diffstat (limited to '.jenkins')
-rw-r--r--.jenkins/Jenkinsfile-OpenSSL-1.186
1 files changed, 86 insertions, 0 deletions
diff --git a/.jenkins/Jenkinsfile-OpenSSL-1.1 b/.jenkins/Jenkinsfile-OpenSSL-1.1
new file mode 100644
index 00000000..2ce1446d
--- /dev/null
+++ b/.jenkins/Jenkinsfile-OpenSSL-1.1
@@ -0,0 +1,86 @@
+def configs = [
+ [
+ label: "windows2012-openssl", arch: "x86", "vsversion": 2010
+ ],
+ [
+ label: "windows2012-openssl", arch: "x86_64", "vsversion": 2010
+ ],
+ [
+ label: "windows2012-openssl", arch: "x86", "vsversion": 2015
+ ],
+ [
+ label: "windows2012-openssl", arch: "x86_64", "vsversion": 2015
+ ],
+]
+
+script = """
+ wmic qfe
+ powershell "[Net.ServicePointManager]::SecurityProtocol = 'tls12'; wget 'https://www.openssl.org/source/openssl-1.1.0-latest.tar.gz' -OutFile 'openssl-latest.tar.gz'"
+ REM Next decompress the tarball using winrar. INUL disables error msgs, which are GUI prompts and therefore undesirable
+ "C:\\Program Files\\WinRAR\\WinRAR.exe" -INUL x openssl-latest.tar.gz
+ cd openssl-1*
+ REM The next line determines the name of the current directory. Batch is great.
+ FOR %%I IN (.) DO @SET CURRENTDIR=%%~nI%%~xI
+ if "%BUILDARCH%" == "x86" (
+ @SET BUILDARCHFLAG=x86
+ @SET OPENSSLARCHFLAG="VC-WIN32"
+ ) else (
+ @SET BUILDARCHFLAG=amd64
+ @SET OPENSSLARCHFLAG="VC-WIN64A"
+ )
+ if "%BUILDVSVERSION%" == "2010" (
+ call "C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\vcvarsall.bat" %BUILDARCHFLAG%
+ echo "Building with VS 2010"
+ ) else (
+ call "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat" %BUILDARCHFLAG%
+ echo "Building with VS 2015"
+ )
+ SET
+ perl Configure no-comp no-shared %OPENSSLARCHFLAG%
+ nmake
+ nmake test
+
+ if "%BUILDARCH%" == "x86" (
+ @SET FINALDIR="openssl-win32-%BUILDVSVERSION%"
+ ) else (
+ @SET FINALDIR="openssl-win64-%BUILDVSVERSION%"
+ )
+ mkdir %FINALDIR%
+ mkdir %FINALDIR%\\lib
+ move include %FINALDIR%\\include
+ move libcrypto.lib %FINALDIR%\\lib\\
+ move libssl.lib %FINALDIR%\\lib\\
+ "C:\\Program Files\\WinRAR\\WinRAR.exe" -INUL a %CURRENTDIR%-%BUILDVSVERSION%-%BUILDARCH%.zip %FINALDIR%\\include %FINALDIR%\\lib\\libcrypto.lib %FINALDIR%\\lib\\libssl.lib
+"""
+
+def build(label, vsversion, arch) {
+ node(label) {
+ try {
+ timeout(time: 30, unit: 'MINUTES') {
+ stage("Compile") {
+ withEnv(["BUILDARCH=$arch", "BUILDVSVERSION=$vsversion"]) {
+ bat script
+ }
+ }
+ stage("Archive") {
+ archiveArtifacts artifacts: "**/openssl-*.zip"
+ }
+ }
+ } finally {
+ deleteDir()
+ }
+ }
+}
+
+def builders = [:]
+
+for (config in configs) {
+ def vsversion = config["vsversion"]
+ def arch = config["arch"]
+ def label = config["label"]
+ builders["${vsversion}-${arch}"] = {
+ build(label, vsversion, arch)
+ }
+}
+
+parallel builders