New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to jenkinsfile #3525
Switch to jenkinsfile #3525
Conversation
Jenkins, retest this please |
Jenkinsfile
Outdated
|
||
|
||
def configs = [ | ||
/* [ */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These need to be uncommented :-)
label: 'docker', | ||
imageName: 'pyca/cryptography-runner-fedora', | ||
toxenvs: ['py27', 'py35'], | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need the docs-linkcheck buidl somewhere, somehow.
def script = "" | ||
if (env.BRANCH_NAME.startsWith('PR-')) { | ||
script = """ | ||
git clone --depth=1 https://github.com/pyca/cryptography.git cryptography |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it pratical to factor these first two lines of the script that are the same in both things out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do these need -xe
? Or the #!
?
Jenkinsfile
Outdated
) | ||
if %TOXENV% == py36 ( | ||
@set PYTHON="C:\\Python36\\python.exe" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we put these values in a map outside the bat
and just put $PYTHON
in as an env var?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This question applies to all the if
statements in here, doing the ifs
in groovy seems way better.
Jenkinsfile
Outdated
# Jenkins logs in as a non-interactive shell, so we don't even have /usr/local/bin in PATH | ||
export PATH=/usr/local/bin:\$PATH | ||
# pyenv is nothing but trouble with non-interactive shells | ||
#eval "\$(pyenv init -)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed or not?
Jenkinsfile
Outdated
export PATH="/Users/jenkins/.pyenv/shims:\${PATH}" | ||
export PYENV_SHELL=bash | ||
cd cryptography | ||
CRYPTOGRAPHY_OSX_NO_LINK_FLAGS=1 LDFLAGS="/usr/local/opt/openssl\\@1.1/lib/libcrypto.a /usr/local/opt/openssl\\@1.1/lib/libssl.a" CFLAGS="-I/usr/local/opt/openssl\\@1.1/include -Werror -Wno-error=deprecated-declarations -Wno-error=incompatible-pointer-types -Wno-error=unused-function -Wno-error=unused-command-line-argument" tox -r -- --color=yes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Split this across multiple lines so it's readable please
Jenkinsfile
Outdated
set -xe | ||
cd cryptography | ||
if [[ "\${IMAGE_NAME}" == *"libressl"* ]]; then | ||
LD_LIBRARY_PATH="/usr/local/libressl/lib:\$LD_LIBRARY_PATH" LDFLAGS="-L/usr/local/libressl/lib" CFLAGS="-I/usr/local/libressl/include" tox -r -- --color=yes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
multiple lines.
Jenkinsfile
Outdated
else | ||
CFLAGS="" tox -vv -r -- --color=yes | ||
fi | ||
# In a perfect world this would be a separate stage. This is not a perfect world. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make the comment explanatory or drop it please
Jenkinsfile
Outdated
py36: "C:\\Python36\\python.exe" | ||
] | ||
if (toxenv == "py35" || toxenv == "py36") { | ||
includeLib = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't a great name, how about opensslPaths
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, does it need a def
Jenkinsfile
Outdated
"windows": [ | ||
"include": '"C:\\OpenSSL-Win32-2015\\include"', | ||
"lib": '"C:\\OpenSSL-Win32-2015\\lib"' | ||
], "windows64": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Newline here.
Jenkinsfile
Outdated
if (toxenv == "py35" || toxenv == "py36") { | ||
includeLib = [ | ||
"windows": [ | ||
"include": '"C:\\OpenSSL-Win32-2015\\include"', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason to put quotes in all these strings, rather than push it down?
Jenkinsfile
Outdated
|
||
/* TODO */ | ||
/* expand macOS testing */ | ||
/* smoke tests */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These comments all need updating.
Jenkinsfile
Outdated
@@ -0,0 +1,328 @@ | |||
/* known issues */ | |||
/* Parallel tasks, when executed, show up as "part of <job name>" rather than a more descriptive name. See http://stackoverflow.com/questions/37812588/how-can-i-override-the-part-of-app-pipeline-buildname */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this and turn it into a follow up issue, or linewrap it with a link to a jenkins upstream issue.
Jenkinsfile
Outdated
/* Parallel tasks, when executed, show up as "part of <job name>" rather than a more descriptive name. See http://stackoverflow.com/questions/37812588/how-can-i-override-the-part-of-app-pipeline-buildname */ | ||
|
||
/* notes */ | ||
/* You must escape backslashes and $ because groovy. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can probably removed, it's just a fact of groovy.
* [WIP] add a jenkinsfile * various jenkinsfile fixes [ci skip] * experiments * escape the escaping * can't do that with /usr/bin/env bash * continue isolation * bleh * optimistically enable everything * things * add timeout, codecov * derp * sigh * add credentials for codecov upload * print the env * nonsense * checkout without jenkins because jenkins sucks * maybe we're not allowed to shadow * maybe if we actually pass the variable * scope * cd into a thing * also here * print the commit and run all the jobs again * son of a * add labels * ch-ch-ch-changes * damn it * add docs, pep8, py3pep8 * try some downstreams * make this maybe work * this is probably what we need * faster testing * run this in docker duh * delete me some dirs * wtf * god * more things * oh boy locales * re-enable everything, remove the locales now that they're embedded * refactor, this will probably break everything * small test * sigh * actually bind some variables. also rename things to be camelCase * oookay * this is not gonna work * test all the things * add docs-linkcheck, remove libre 2.5.3 because it is bad * syntax is for losers * append a thing * add yosemite, run this thing daily * oops * some finally cleanup * twisted is dead to us for a brief moment * add randomorder and setup.py test * whatever * re-enable twisted * delete everything. eat arby's * delete everything this time * all is emptiness
* Switch to jenkinsfile (#3525) * [WIP] add a jenkinsfile * various jenkinsfile fixes [ci skip] * experiments * escape the escaping * can't do that with /usr/bin/env bash * continue isolation * bleh * optimistically enable everything * things * add timeout, codecov * derp * sigh * add credentials for codecov upload * print the env * nonsense * checkout without jenkins because jenkins sucks * maybe we're not allowed to shadow * maybe if we actually pass the variable * scope * cd into a thing * also here * print the commit and run all the jobs again * son of a * add labels * ch-ch-ch-changes * damn it * add docs, pep8, py3pep8 * try some downstreams * make this maybe work * this is probably what we need * faster testing * run this in docker duh * delete me some dirs * wtf * god * more things * oh boy locales * re-enable everything, remove the locales now that they're embedded * refactor, this will probably break everything * small test * sigh * actually bind some variables. also rename things to be camelCase * oookay * this is not gonna work * test all the things * add docs-linkcheck, remove libre 2.5.3 because it is bad * syntax is for losers * append a thing * add yosemite, run this thing daily * oops * some finally cleanup * twisted is dead to us for a brief moment * add randomorder and setup.py test * whatever * re-enable twisted * delete everything. eat arby's * delete everything this time * all is emptiness * master builds should use the commit at the time it was merged (#3577) * Fixes #3573 -- archive the built docs in that builder (#3580) * Fixes #3573 -- archive the built docs in that builder * syntax * try it without this * I am an idiot * this is unused * uhh, let's try this * maybe this? * eh, html is the only thing * ffffuuuu * Ignore doctree * broader exclude * This works now * pin sphinx version to avoid test breakage (#3544) * fix compilation on 1.1.0f (#3603)
This is very WIP and not ready for review at this time.
Outstanding tasks (in addition to "it needs to work"):