Skip to content

Instantly share code, notes, and snippets.

View nocode99's full-sized avatar

Byron Kim nocode99

  • New York, NY
View GitHub Profile

Keybase proof

I hereby claim:

  • I am nocode99 on github.
  • I am nocode (https://keybase.io/nocode) on keybase.
  • I have a public key ASCOQlATMgKLLnw1Es4BDRYs_Lb_QmVzjpfSEU3_kl2ROwo

To claim this, I am signing this object:

@nocode99
nocode99 / jenkins error
Last active June 11, 2020 20:12
Job-DSL 1.77 breaks ghprb
2020-06-11 20:08:00.481+0000 [id=33] SEVERE jenkins.InitReactorRunner$1#onTaskFailed: Failed ConfigurationAsCode.init
groovy.lang.MissingMethodException: No signature of method: javaposse.jobdsl.plugin.structs.DescribableListContext.githubPullRequest() is applicable for argument types: (script$_testPipelineJob_closure9$_closure85$_closure87$_closure88$_closure89) values: [script$_testPipelineJob_closure9$_closure85$_closure87$_closure88$_closure89@3aad01d8]
at sun.reflect.GeneratedConstructorAccessor48.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)
at org.codehaus.groovy.runtime.callsite.CallSiteA
@nocode99
nocode99 / jenkins.groovy
Created August 27, 2019 19:53
Jenkins Pipeline CPU
def generateStage(imageName, DOCKER_BUILD_ARG, args...) {
return {
stage("Building ${imageName}") {
lock(resource: "docker_build_${env.NODE_NAME}_${DOCKER_BUILD_ARG}", inversePrecedence: false) {
// [...]
}
}
}
}
@nocode99
nocode99 / sample.groovy
Last active November 4, 2020 20:49
Jenkins Job-DSL Folder for Shared Pipeline config
folder('My_folder') {
properties {
folderLibraries {
libraries {
libraryConfiguration {
name('shared-pipeline')
defaultVersion('master')
implicit(false)
allowVersionOverride(true)
includeInChangesets(true)
$ TF_LOG=1 terraform plan
2018/02/09 10:53:36 [WARN] Invalid log level: "1". Defaulting to level: TRACE. Valid levels are: [TRACE DEBUG INFO WARN ERROR]
2018/02/09 10:53:36 [INFO] Terraform version: 0.10.5 1f054df7525613cccbbc705d639024cb8ac2264a
2018/02/09 10:53:36 [INFO] Go runtime version: go1.9
2018/02/09 10:53:36 [INFO] CLI args: []string{"/usr/local/bin/terraform_0.10.5", "plan"}
2018/02/09 10:53:36 [DEBUG] Attempting to open CLI config file: /home/bkim/.terraformrc
2018/02/09 10:53:36 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2018/02/09 10:53:36 [INFO] CLI command args: []string{"plan"}
2018/02/09 10:53:36 [INFO] command: empty terraform config, returning nil
2018/02/09 10:53:36 [DEBUG] command: no data state file found for backend config
@nocode99
nocode99 / A-INSTALL.md
Last active February 6, 2018 19:19
Terraform setup

Scope

This document will cover how to install terraform and configure your terraform environment. I also outlined additional steps to give an overview of how terraform works and benefits. Ultimately, we can concatenate some of these steps because it's fairly repetitious.

Terraform Installation

  1. Go to https://www.terraform.io/downloads.html and download the suitable version of terraform.
  2. Unpack the file and move the terraform binary to somewhere in your $PATH (ie on Linux/Mac /usr/local/bin) If you are using Windows, you can follow these instructions https://stackoverflow.com/questions/1618280/where-can-i-set-path-to-make-exe-on-windows
  3. Confirm terraform is working:
@nocode99
nocode99 / agent.json
Last active July 21, 2017 15:53
Consul 0.9.0 Issue
{
"agent": {
"": {
"policy": "write"
}
},
"key": {
"": {
"policy": "write"
}
@nocode99
nocode99 / README.md
Created July 20, 2017 16:33 — forked from joelthompson/README.md
Vault Auth
@nocode99
nocode99 / datadog-nginx
Created August 31, 2016 21:45 — forked from technovangelist/datadog-nginx
Nginx log parsing with datadog
"""
Thanks to gane5h for the original script. this is a small kludgy tweak to that one.
Custom parser for nginx log suitable for use by Datadog 'dogstreams'.
To use, add to datadog.conf as follows:
dogstreams: [path to ngnix log (e.g: "/var/log/nginx/access.log"]:[path to this python script (e.g "/usr/share/datadog/agent/dogstream/nginx.py")]:[name of parsing method of this file ("parse")]
so, an example line would be:
dogstreams: /var/log/nginx/access.log:/usr/share/datadog/agent/dogstream/nginx.py:parse
Log of nginx should be defined like that:
log_format time_log '$time_local "$request" S=$status $bytes_sent T=$request_time R=$http_x_forwarded_for';
when starting dd-agent, you can find the collector.log and check if the dogstream initialized successfully