Skip to content

Instantly share code, notes, and snippets.

@jdolitsky
jdolitsky / codefresh-helm-operations.txt
Created May 8, 2018 06:01
codefresh helm operations
$ helm push mychart/ codefresh
Pushing mychart-0.1.0.tgz to codefresh...
Done.
$ helm repo update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "codefresh" chart repository
Update Complete. ⎈ Happy Helming!⎈
$ helm install --dry-run --name=demo codefresh/mychart
NAME: demo
@jdolitsky
jdolitsky / add-codefresh-managed-helm-repo.txt
Last active May 8, 2018 05:05
add codefresh managed helm repo
$ export HELM_REPO_ACCESS_TOKEN="4ae15d8045cg0b61084e42bc.af098218f3973b522213ga73aad6e211"
$ helm repo add codefresh cm://h.cfcr.io/myaccount/default
"codefresh" has been added to your repositories
@jdolitsky
jdolitsky / install-helm-push.txt
Last active May 8, 2018 05:06
install helm-push
$ helm plugin install https://github.com/chartmuseum/helm-push
Downloading and installing helm-push v0.4.0 ...
https://github.com/chartmuseum/helm-push/releases/download/v0.4.0/helm-push_0.4.0_darwin_amd64.tar.gz
Installed plugin: push
@jdolitsky
jdolitsky / update-golang.md
Created April 10, 2018 17:57 — forked from nikhita/update-golang.md
How to update the Go version

How to update the Go version

System: Ubuntu 14.04 (Trusty Tahr)

1. Uninstall the exisiting version

As mentioned here, to update a go version you will first need to uninstall the original version.

To uninstall, delete the /usr/local/go directory by:

@jdolitsky
jdolitsky / asymmetric.go
Last active April 9, 2018 03:48 — forked from cryptix/LICENSE
example of using JWT for http authentication in go
package main
// using asymmetric crypto/RSA keys
import (
"crypto/rsa"
"fmt"
"io/ioutil"
"log"
"net/http"
kubectl config use-context $KUBE_CONTEXT
kubectl -n $NAMESPACE create secret docker-registry codefresh \
--docker-server=r.cfcr.io \
--docker-username=$CODEFRESH_USERNAME \
--docker-password=$DOCKER_ACCESS_TOKEN \
--docker-email=$CODEFRESH_EMAIL
kubectl -n $NAMESPACE patch serviceaccount default \
-p '{"imagePullSecrets":[{"name":"codefresh"}]}'
version: '1.0'
steps:
unit_test:
image: golang:1.8
description: grab dependencies, run unit tests
commands:
- mkdir -p /go/src/github.com/kubernetes-helm
- >-
ln -s /codefresh/volume/${{CF_REPO_NAME}}
version: '1.0'
steps:
create_chart_package:
image: codefresh/plugin-helm:2.7.2
commands:
# Repo name may not necessarily match the chart name, but the "helm package"
# command requires the current directory and the chart name to match. So we
# extract the chart name from Chart.yaml, then create a working directory for
@jdolitsky
jdolitsky / README.md
Created November 11, 2015 15:20 — forked from dnozay/_Jenkins+Script+Console.md
jenkins groovy scripts collection.
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);