by Goodacre Liam
declarations in a where clause are bound inside a given case an alternative way to do what you've written is:
nonempty = go where
go input
| isEmpty input = Nothing
| otherwise = Just input
| //Example: run_groovy_script.sh ../wendy.ini add_global_pipeline_library.groovy <owner> <repo> [<branch> <ssh credentials id> <scan credentials id>] | |
| import jenkins.model.* | |
| import org.jenkinsci.plugins.workflow.libs.* | |
| import org.jenkinsci.plugins.github_branch_source.* | |
| import jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy | |
| String owner = args[0] | |
| String repo = args[1] | |
| String branch = args.size() > 2 ? args[2] : 'master' | |
| String sshCredentialsId = args.size() > 3 ? args[3] : 'jenkinsgithub' |
| #!groovy | |
| // https://github.com/feedhenry/fh-pipeline-library | |
| @Library('fh-pipeline-library') _ | |
| node('jenkins-tools') { | |
| stage('Checkout') { | |
| checkout scm | |
| } |
| #!/usr/bin/env python | |
| import os | |
| import yaml | |
| import argparse | |
| class literal(str): pass | |
| def literal_presenter(dumper, data): | |
| return dumper.represent_scalar('tag:yaml.org,2002:str', data, style='|') | |
| yaml.add_representer(literal, literal_presenter) |
| FROM python:2 | |
| ENV BRANCH master | |
| WORKDIR / | |
| RUN git clone -b allow_self_signed_certs https://github.com/mikenairn/python-jenkins.git | |
| WORKDIR python-jenkins | |
| RUN pip install -U -r requirements.txt && python setup.py install | |
| WORKDIR / |
| getDependents :: PackageName -> Handler [PackageName] | |
| getDependents pkgdep = do | |
| allPkgs <- getAllPackages | |
| return $ D.packageName <$> (filter (\pkg -> isJust $ find isPackageDep $ getDepList pkg) allPkgs) | |
| where isPackageDep = (== (runPackageName pkgdep)) | |
| getDepList p = map (runPackageName . fst) $ bowerDependencies $ D.pkgMeta $ p |
| //https://github.com/jenkinsci/jenkins-scripts/blob/master/scriptler/buildJobsMatchingPattern.groovy | |
| import jenkins.model.* | |
| import hudson.model.* | |
| def jobPattern = args[0] | |
| // Pattern to search for. Regular expression. | |
| //def jobPattern = "test_.*" | |
| def matchedJobs = Jenkins.instance.items.findAll { job -> |
| client_get_services_test.go:51: actual = | |
| +------+--------------+------------+ | |
| | NAME | INTEGRATIONS | PARAMETERS | | |
| +------+--------------+------------+ | |
| +------+--------------+------------+ | |
| , expected = | |
| +---------------------+------------------+--------------------------------+ | |
| | NAME | INTEGRATIONS | PARAMETERS | | |
| +---------------------+------------------+--------------------------------+ | |
| | ups | | MYSQL_DATABASE, | |
by Goodacre Liam
declarations in a where clause are bound inside a given case an alternative way to do what you've written is:
nonempty = go where
go input
| isEmpty input = Nothing
| otherwise = Just input
| module Main where | |
| import Prelude | |
| import Control.Monad.Eff.Console (log, logShow) | |
| import TryPureScript (render, withConsole) | |
| import Data.Maybe (Maybe(..), isNothing, fromJust) | |
| import Data.Record (get, insert) | |
| import Data.Tuple (Tuple(..)) | |
| import Global.Unsafe (unsafeStringify) |