Skip to content

Instantly share code, notes, and snippets.

@marcosanchotene
marcosanchotene / responseAndStatus.groovy
Created August 2, 2022 19:53
Extract status code and response from curl request on Jenkins with Groovy
node {
stage('Get response and status code') {
curlCommand = "curl -s -w '%{response_code}' www.example.com"
response = sh(script: curlCommand, returnStdout: true).trim()
responseCode = response.tokenize('\n').last()
}
}
@marcosanchotene
marcosanchotene / pytest_docset.md
Created September 24, 2022 13:58
Generate Dash docset for pytest

Essential

  1. Clone https://github.com/pytest-dev/pytest.
  2. Checkout the version you want to build the docs for.
  3. Install the following dependencies (I suggest Poetry for this step):
    • pytest
    • sphinx
    • doc2dash
  4. In pytest/doc/en run make html.
  5. Generate the docs with doc2dash -n pytest _build/html/.