Skip to content

Instantly share code, notes, and snippets.

View timja's full-sized avatar

Tim Jacomb timja

View GitHub Profile
@timja
timja / remove-parent-team-from-all-children.bash
Created March 29, 2023 09:13
Removes a specified parent team from all children
#!/bin/bash
# Name of the parent team to remove
org="$1"
PARENT_TEAM_ID="$2"
# Iterate over all teams in the organization
items=$(gh api "/orgs/$org/teams" --paginate | jq -c -r '.[]')
IFS=$'\n'
@timja
timja / allowed_labels.txt
Last active June 20, 2022 20:08
Jira to GitHub migration
JEP-200
accessibility
agent
bug
core
documentation
help-wanted
imported-jira-issue
java11-compatibility
java11-devtools-compatibility
@timja
timja / pushevents.txt
Created May 23, 2022 09:23
pushevents
2022-05-23 09:18:39.142+0000 [id=1078310] INFO o.j.p.g.w.s.DefaultPushGHEventSubscriber#onEvent: Received PushEvent for https://github.com/****/***** from 140.82.115.93 → 10.10.72.35 → 140.82.115.93 ⇒ https://jenkins/github-webhook/
2022-05-23 09:18:39.324+0000 [id=1035877] INFO o.j.p.g.w.s.DefaultPushGHEventSubscriber#onEvent: Received PushEvent for https://github.com/****/***** from 140.82.115.96 → 10.10.72.4 → 140.82.115.96 ⇒ https://jenkins/github-webhook/
2022-05-23 09:18:43.296+0000 [id=1078310] INFO o.j.p.g.w.s.DefaultPushGHEventSubscriber#onEvent: Received PushEvent for https://github.com/****/***** from 140.82.115.117 → 10.10.72.124 → 140.82.115.117 ⇒ https://jenkins/github-webhook/
2022-05-23 09:18:43.396+0000 [id=973326] INFO o.j.p.g.w.s.DefaultPushGHEventSubscriber#onEvent: Received PushEvent for https://github.com/****/***** from 140.82.115.111 → 10.10.72.4 → 140.82.115.111 ⇒ https://jenkins/github-webhook/
2022-05-23 09:18:43.399+0000 [id=1078311] INFO o.j.p.g.w.s.DefaultPushGHEventSubscriber#on
@timja
timja / init.sh
Last active May 20, 2022 06:44
Init Gitpod Jenkins plugin
#!/usr/bin/env bash
GIT_POD_URL=$(gp url 8080)
mkdir -p work/
cat <<EOF > work/jenkins.model.JenkinsLocationConfiguration.xml
<?xml version='1.1' encoding='UTF-8'?>
<jenkins.model.JenkinsLocationConfiguration>
<adminAddress>address not configured yet &lt;nobody@nowhere&gt;</adminAddress>
@timja
timja / Main.java
Created May 7, 2022 22:16
UTF-8 / ISO-8859-1 spelunking
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.charset.CharacterCodingException;
import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CodingErrorAction;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
name: "acceptance-test-harness"
github: "jenkinsci/acceptance-test-harness"
paths:
- "org/jenkins-ci/acceptance-test-harness"
maintainers: # intentionally renamed from developers to possibly make it easier to adapt between old and new format, may not be needed
- jenkins_id: "jglick"
github: "jglick"
- jenkins_id: "olivergondza"
github: "ogondza"
- group: cloudbees-developers # or team maybe
@timja
timja / keybase.md
Created April 28, 2021 10:27
keybase.md

Keybase proof

I hereby claim:

  • I am timja on github.
  • I am timja (https://keybase.io/timja) on keybase.
  • I have a public key ASC_dBlmJc4cPHyWO7moXk1YKaO52MPXBlBOvfdOhWf-dwo

To claim this, I am signing this object:

@timja
timja / junit-pluggable-pipeline.groovy
Created August 16, 2020 14:03
junit-pluggable-pipeline.groovy
node('master') {
writeFile file: 'x.xml', text: '''<testsuite name='sweet'><testcase classname='Klazz' name='test1'><error message='failure'/></testcase><testcase classname='Klazz' name='test2'/><testcase classname='other.Klazz' name='test3'><skipped message='Not actually run.'/></testcase></testsuite>'''
def s = junit 'x.xml'
echo(/summary: fail=$s.failCount skip=$s.skipCount pass=$s.passCount total=$s.totalCount/)
writeFile file: 'x.xml', text: '''<testsuite name='supersweet'><testcase classname='another.Klazz' name='test1'><error message='another failure'/></testcase></testsuite>'''
s = junit 'x.xml'
echo(/next summary: fail=$s.failCount skip=$s.skipCount pass=$s.passCount total=$s.totalCount/)
}
@timja
timja / postgres class not found.txt
Created August 16, 2020 14:01
postgres class not found
com.thoughtworks.xstream.mapper.CannotResolveClassException: org.jenkinsci.plugins.database.postgresql.PostgreSQLDatabase
at com.thoughtworks.xstream.mapper.DefaultMapper.realClass(DefaultMapper.java:79)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
at com.thoughtworks.xstream.mapper.DynamicProxyMapper.realClass(DynamicProxyMapper.java:55)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
at com.thoughtworks.xstream.mapper.PackageAliasingMapper.realClass(PackageAliasingMapper.java:88)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
at com.thoughtworks.xstream.mapper.ClassAliasingMapper.realClass(ClassAliasingMapper.java:79)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
@timja
timja / jenkins-core-variables.txt
Created August 8, 2020 07:46
Jenkins core variables
var(--add-item-btn-decorator-bg-color)
var(--add-item-btn-decorator-border-color)
var(--alert-danger-bg-color)
var(--alert-danger-border-color)
var(--alert-danger-text-color)
var(--alert-default-bg-color)
var(--alert-default-border-color)
var(--alert-default-color)
var(--alert-default-icon-color)
var(--alert-info-bg-color)