Skip to content

Instantly share code, notes, and snippets.

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}}
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"}]}'
@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"
@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 / 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 / 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 / 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 / codefresh.yml
Last active October 3, 2018 02:09
codefresh-helm-azure-push-hackmd
version: '1.0'
steps:
fetch_community_chart:
title: Download latest HackMD chart
image: codefresh/cfstep-helm:latest
commands:
- helm fetch stable/hackmd --untar
push_to_helm_repo:
title: Push HackMD chart to Helm repo
image: codefresh/cfstep-helm:latest
@jdolitsky
jdolitsky / codefresh.yml
Last active October 3, 2018 02:10
codefresh-helm-azure-install-hackmd
version: '1.0'
steps:
get_tiller_version:
title: Determine Tiller version
image: codefresh/cfstep-helm:latest
commands:
- cf_export TILLER_VERSION=$(helm --kube-context "$KUBE_CONTEXT" version --template={{.Server.SemVer}} | cut -c2-)
install_chart:
title: Install HackMD chart into cluster
image: codefresh/cfstep-helm:${{TILLER_VERSION}}
@jdolitsky
jdolitsky / keybase.md
Created November 6, 2018 17:01
keybase verification

Keybase proof

I hereby claim:

  • I am jdolitsky on github.
  • I am jdolitsky (https://keybase.io/jdolitsky) on keybase.
  • I have a public key ASDVIWneRH413iwIQ0k1ZzhHTKXrJayrGmnlwcYaIH9MRwo

To claim this, I am signing this object: