Skip to content

Instantly share code, notes, and snippets.

View sunnoy's full-sized avatar
🎯
Focusing

Hui Liu sunnoy

🎯
Focusing
View GitHub Profile
@sunnoy
sunnoy / build-kube-e2e.sh
Created August 12, 2019 08:37 — forked from ethernetdan/build-kube-e2e.sh
Build Docker image of Kubernetes E2E tests
#!/bin/bash -x
set -euo pipefail
echo "Building conformance image..."
echo
APT_PACKAGES="rsync"
# build docker image of repository
docker build -t "${IMAGE_NAME}:${IMAGE_TAG}" - <<EOF
FROM golang:1.8
@sunnoy
sunnoy / Jenkinsfile
Created July 17, 2019 04:35 — forked from abayer/Jenkinsfile
New Declarative Pipeline features in 1.1
pipeline {
agent {
// "node" is a new agent type that works the same as "label" but allows
// additional parameters, such as "customWorkspace" below.
node {
label "some-label"
// This is equivalent to the "ws(...)" step - sets the workspace on the
// agent to a hard-coded path. If it's not an absolute path, it'll be
// relative to the agent's workspace root.
customWorkspace "/use/this/path/instead"
@sunnoy
sunnoy / Jenkinsfile
Created July 17, 2019 04:35 — forked from qzm/Jenkinsfile
Vue.js / Jenkinsfile /Pipelines
pipeline {
agent {
docker {
image 'node'
}
}
stages {
stage('Clone Sources') {
steps {
@sunnoy
sunnoy / 02-Jenkinsfile
Created July 17, 2019 04:34 — forked from abtris/02-Jenkinsfile
Jenkinsfile - imperative style vs declarative style
pipeline {
agent any
environment {
PACKAGE="github.com/abtris/bee"
GOPATH="/Users/abtris/go"
GOROOT="/usr/local/opt/go/libexec"
}
stages {
stage('Preparation') {
steps {
pipeline {
// run on jenkins nodes tha has java 8 label
agent { label 'java8' }
// global env variables
environment {
EMAIL_RECIPIENTS = '[email protected]'
}
stages {
stage('Build with unit testing') {
@sunnoy
sunnoy / Jenkinsfile
Created July 17, 2019 04:33 — forked from bvis/Jenkinsfile
Jenkin pipeline definition example to be integrated with Docker Swarm cluster in our CI/CD environment
pipeline {
agent { node { label 'swarm-ci' } }
environment {
TEST_PREFIX = "test-IMAGE"
TEST_IMAGE = "${env.TEST_PREFIX}:${env.BUILD_NUMBER}"
TEST_CONTAINER = "${env.TEST_PREFIX}-${env.BUILD_NUMBER}"
REGISTRY_ADDRESS = "my.registry.address.com"
SLACK_CHANNEL = "#deployment-notifications"
@sunnoy
sunnoy / Jenkinsfile
Created July 17, 2019 04:32 — forked from abayer/Jenkinsfile
An example Declarative Pipeline Jenkinsfile for Feb 15 2017 demo
// A Declarative Pipeline is defined within a 'pipeline' block.
pipeline {
// agent defines where the pipeline will run.
agent {
// This also could have been 'agent any' - that has the same meaning.
label ""
// Other possible built-in agent types are 'agent none', for not running the
// top-level on any agent (which results in you needing to specify agents on
// each stage and do explicit checkouts of scm in those stages), 'docker',
@sunnoy
sunnoy / Jenkinsfile
Created July 16, 2019 10:16 — forked from merikan/Jenkinsfile
Some Jenkinsfile examples
Some Jenkinsfile examples
@sunnoy
sunnoy / aria2.conf
Created July 14, 2019 13:15 — forked from WincerChan/aria2.conf
Aria2 配置文件
## 全局设置 ## ============================================================
# 日志
#log-level=warn
#log=/PATH/.aria2/aria2.log
# 下载位置,改成你自己的 默认: 当前启动位置
dir=/media/wincer/Deep/Videos
disk-cache=32M
# 文件预分配方式, 能有效降低磁盘碎片, 默认:prealloc
@sunnoy
sunnoy / generate_iterm2_dynamic_profiles.pl
Created June 7, 2019 13:20 — forked from rsperl/generate_iterm2_dynamic_profiles.pl
Reads in ~/.ssh/config and generates iterm2 dynamic profiles #tags: lang-perl
#!/usr/bin/env perl
#
# licensed under GPL v2, same as iTerm2 https://www.iterm2.com/license.txt
#
use strict;
use JSON;
my $output = $ENV{HOME} . "/Library/Application\ Support/iTerm2/DynamicProfiles/profiles.json";