Skip to content

Instantly share code, notes, and snippets.

@reportingsjr
Created September 4, 2016 20:56
Show Gist options
  • Save reportingsjr/72a72731eb7570999a552a6e2e973551 to your computer and use it in GitHub Desktop.
Save reportingsjr/72a72731eb7570999a552a6e2e973551 to your computer and use it in GitHub Desktop.
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<project>
<actions/>
<description>
This job is running the checklib.py magic from <a href="https://github.com/KiCad/kicad-library-utils">https://github.com/KiCad/kicad-library-utils</a>.
<br>
Checklib.py is a script that checks compliance of symbols in relation to the KiCad Library Convention (KLC).
</description>
<keepDependencies>false</keepDependencies>
<properties>
<com.coravy.hudson.plugins.github.GithubProjectProperty plugin="github@1.21.1">
<projectUrl>http://github.com/kicad/kicad-library/</projectUrl>
<displayName/>
</com.coravy.hudson.plugins.github.GithubProjectProperty>
</properties>
<scm class="hudson.plugins.git.GitSCM" plugin="git@2.5.3">
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
<refspec>+refs/pull/*:refs/remotes/origin/pr/*</refspec>
<url>http://github.com/kicad/kicad-library/</url>
</hudson.plugins.git.UserRemoteConfig>
</userRemoteConfigs>
<branches>
<hudson.plugins.git.BranchSpec>
<name>${sha1}</name>
</hudson.plugins.git.BranchSpec>
</branches>
<doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
<submoduleCfg class="list"/>
<extensions/>
</scm>
<canRoam>true</canRoam>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<triggers>
<org.jenkinsci.plugins.ghprb.GhprbTrigger plugin="ghprb@1.33.1">
<spec>H/5 * * * *</spec>
<latestVersion>3</latestVersion>
<configVersion>3</configVersion>
<adminlist>reportingsjr</adminlist>
<allowMembersOfWhitelistedOrgsAsAdmin>false</allowMembersOfWhitelistedOrgsAsAdmin>
<orgslist/>
<cron>H/5 * * * *</cron>
<buildDescTemplate/>
<onlyTriggerPhrase>false</onlyTriggerPhrase>
<useGitHubHooks>true</useGitHubHooks>
<permitAll>true</permitAll>
<whitelist/>
<autoCloseFailedPullRequests>false</autoCloseFailedPullRequests>
<displayBuildErrorsOnDownstreamBuilds>false</displayBuildErrorsOnDownstreamBuilds>
<whiteListTargetBranches>
<org.jenkinsci.plugins.ghprb.GhprbBranch>
<branch/>
</org.jenkinsci.plugins.ghprb.GhprbBranch>
</whiteListTargetBranches>
<blackListTargetBranches>
<org.jenkinsci.plugins.ghprb.GhprbBranch>
<branch/>
</org.jenkinsci.plugins.ghprb.GhprbBranch>
</blackListTargetBranches>
<gitHubAuthId>*censored</gitHubAuthId>
<triggerPhrase/>
<skipBuildPhrase>.*\[skip\W+ci\].*</skipBuildPhrase>
<extensions>
<org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
<commitStatusContext/>
<triggeredStatus/>
<startedStatus/>
<statusUrl/>
<addTestResults>false</addTestResults>
</org.jenkinsci.plugins.ghprb.extensions.status.GhprbSimpleStatus>
</extensions>
</org.jenkinsci.plugins.ghprb.GhprbTrigger>
</triggers>
<concurrentBuild>false</concurrentBuild>
<builders>
<hudson.tasks.Shell>
<command>
git --version git config --global user.email "jenkins@kicad-jenkins.com" git config --global user.name "Jenkins Script" # pull in/update the comparison script if [ ! -d "kicad-library-utils" ]; then git clone https://github.com/reportingsjr/kicad-library-utils.git cd kicad-library-utils git checkout -f fixCompareLib cd .. else cd kicad-library-utils git pull cd .. fi # pull in/up the master library if [ ! -d "kicad-library-master" ]; then git clone https://github.com/kicad/kicad-library.git kicad-library-master else cd kicad-library-master git pull cd .. fi # run the comparison and store the return code cd kicad-library-utils/schlib python3 comparelibs.py --check --nocolor --new ../../library/\*.lib --original ../../kicad-library-master/library/\*.lib >../../result.txt || rc=$? cd ../../ # Do appropriate action after comparison is done if [ rc != 0 ] then curl -i -H "Authorization: token *censored*" \ -H "Content-Type: application/json" \ -d "{\"body\":`python3 -c 'import json,sys; print(json.dumps(\"\`\`\`\nPlease fix these issues:\n\" + open(sys.argv[1]).read() + \"\`\`\`\"))' result.txt`}" \ https://api.github.com/repos/kicad/kicad-library/issues/$ghprbPullId/comments cat result.txt exit 1 else exit 0 fi
</command>
</hudson.tasks.Shell>
</builders>
<publishers>
<hudson.tasks.ArtifactArchiver>
<artifacts>result.txt</artifacts>
<allowEmptyArchive>false</allowEmptyArchive>
<onlyIfSuccessful>false</onlyIfSuccessful>
<fingerprint>false</fingerprint>
<defaultExcludes>true</defaultExcludes>
</hudson.tasks.ArtifactArchiver>
</publishers>
<buildWrappers>
<org.jenkinsci.plugins.ghprb.upstream.GhprbUpstreamStatus plugin="ghprb@1.33.1">
<showMatrixStatus>false</showMatrixStatus>
<commitStatusContext>jenkins</commitStatusContext>
<triggeredStatus>pending</triggeredStatus>
<startedStatus>library checker started</startedStatus>
<statusUrl/>
<addTestResults>false</addTestResults>
<completedStatus>
<org.jenkinsci.plugins.ghprb.extensions.comments.GhprbBuildResultMessage>
<message>Pull request passed.</message>
<result>SUCCESS</result>
</org.jenkinsci.plugins.ghprb.extensions.comments.GhprbBuildResultMessage>
<org.jenkinsci.plugins.ghprb.extensions.comments.GhprbBuildResultMessage>
<message>
Pull request failed, please check log for KLC issues.
</message>
<result>FAILURE</result>
</org.jenkinsci.plugins.ghprb.extensions.comments.GhprbBuildResultMessage>
</completedStatus>
</org.jenkinsci.plugins.ghprb.upstream.GhprbUpstreamStatus>
</buildWrappers>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment