This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import subprocess | |
import sys | |
from contextlib import ExitStack | |
if __name__ == '__main__': | |
# For each process, there is a table of file descriptors (pfd). | |
# Each entry contains an ID number, and a reference to an ID in the | |
# system open file table (soft) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is intended to demonstrate a proof-of-concept | |
# for users/callers of Conan to easily override | |
# conan-generated paths for dependencies. | |
# The purpose was to show how users could manually | |
# implement "editable" packages. | |
# It works, however, sadly, not the way intended. | |
# Environment variables from profiles are not | |
# made available in generators. os.getenv() returns | |
# only environment variables set in the outer shell. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM jenkins/jenkins:2.263.1-lts-centos | |
USER root | |
RUN rm -f /etc/yum.repos.d/github_git-lfs.repo | |
RUN yum-config-manager \ | |
--add-repo \ | |
https://download.docker.com/linux/centos/docker-ce.repo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jobs: | |
- script: > | |
organizationFolder('gitbucket') { | |
description("All repos with Jenkinsfiles discovered on gitbucket") | |
displayName("gitbucket") | |
organizations { | |
github { | |
apiUri("http://gitbucket/api/v3") | |
credentialsId('DEMO_GIT_CREDS') | |
repoOwner('root') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package demo.ci.arg | |
import com.lesfurets.jenkins.unit.declarative.DeclarativePipelineTest | |
import org.junit.Before | |
import org.junit.jupiter.api.Test | |
import static com.lesfurets.jenkins.unit.global.lib.LibraryConfiguration.library | |
import static com.lesfurets.jenkins.unit.global.lib.ProjectSource.projectSource | |
class ConanArgsJPUSpec extends DeclarativePipelineTest { | |
@Override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Run this in a Jenkins step | |
String jsonStr = "['zero', 'one', 'two']" | |
JSONArray jsonArray = new JsonSlurper().parseText(jsonStr) as JSONArray | |
jsonArray.withIndex().each{Object str, Integer idx -> currentBuild.echo("${idx.toString()} : ${str}")} | |
// OUTPUT from jenkins | |
// [Pipeline] echo | |
// null : [zero, 0] | |
// [Pipeline] echo | |
// null : [one, 1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jobs: | |
- script: > | |
multibranchPipelineJob('libA') { | |
branchSources { | |
git { | |
id = 'libA' | |
credentialsId = 'GIT_CREDS' | |
remote('http://172.17.0.3:8080/git/root/libA.git') | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ranch indexing | |
> /usr/local/bin/git rev-parse --is-inside-work-tree # timeout=10 | |
ERROR: Workspace has a .git repository, but it appears to be corrupt. | |
hudson.plugins.git.GitException: Error performing git command: /usr/local/bin/git rev-parse --is-inside-work-tree | |
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2437) | |
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2360) | |
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2356) | |
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1916) | |
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1928) | |
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.hasGitRepo(CliGitAPIImpl.java:343) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Fails to compile with: | |
// CpsScriptMock.java:15: error: unreported exception IOException; must be caught or declared to be thrown | |
// But i'm throwing it right? | |
package demo.ci | |
import org.jenkinsci.plugins.workflow.cps.CpsScript | |
class CpsScriptMock extends CpsScript { | |
CpsScriptMock() throws IOException { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"definitions": { | |
"default": { | |
"type": "object", | |
"properties": { | |
"taskName": { | |
"type": "string" | |
}, | |
"taskLabel": { |
NewerOlder