Last active
February 16, 2023 09:57
-
-
Save snormore/36eb05b675f399af6b18e960488440e4 to your computer and use it in GitHub Desktop.
Revisions
-
snormore revised this gist
Mar 1, 2019 . 2 changed files with 28 additions and 57 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,57 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,28 @@ version: 2 jobs: build: machine: true steps: - checkout - run: name: Install KinD command: | curl -Lo kind https://github.com/kubernetes-sigs/kind/releases/download/0.0.1/kind-linux-amd64 chmod +x kind sudo mv kind /usr/local/bin/ - run: name: Create Kubernetes Cluster command: | kind create cluster - run: name: Install kubectl command: | curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.12.0/bin/linux/amd64/kubectl chmod +x kubectl sudo mv kubectl /usr/local/bin/ - run: name: Run Tests command: | export KUBECONFIG="$(kind get kubeconfig-path)" kubectl cluster-info kubectl get pods --all-namespaces -
snormore revised this gist
Jan 4, 2019 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,18 +22,18 @@ jobs: - restore_cache: key: gopkg-{{ .Branch }}-{{ checksum "Gopkg.lock" }} paths: - /go/src/github.com/your_company/your_project/vendor - run: name: Install Golang Packages command: | if [ ! -d /go/src/github.com/your_company/your_project/vendor ]; then curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh /go/bin/dep ensure fi - save_cache: key: gopkg-{{ .Branch }}-{{ checksum "Gopkg.lock" }} paths: - /go/src/github.com/your_company/your_project/vendor - restore_cache: keys: - build-cache-{{ .Branch }}-{{ .Environment.CIRCLE_PREVIOUS_BUILD_NUM }} -
snormore revised this gist
Jan 4, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ version: 2 jobs: build: working_directory: /go/src/github.com/your_company/your_project docker: - image: golang:1.11 environment: -
snormore created this gist
Jan 4, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,57 @@ version: 2 jobs: build: working_directory: /go/src/github.com/your_comany/your_project docker: - image: golang:1.11 environment: - GOCACHE: "/tmp/go/cache" - DEP_VERSION: 0.4.1 steps: - checkout - setup_remote_docker: docker_layer_caching: true - run: name: Install Docker Client command: | set -x VER="17.03.0-ce" curl -L -o /tmp/docker-$VER.tgz https://download.docker.com/linux/static/stable/x86_64/docker-$VER.tgz tar -xz -C /tmp -f /tmp/docker-$VER.tgz mv /tmp/docker/* /usr/bin - restore_cache: key: gopkg-{{ .Branch }}-{{ checksum "Gopkg.lock" }} paths: - /go/src/github.com/your_comany/your_projecte/vendor - run: name: Install Golang Packages command: | if [ ! -d /go/src/github.com/your_comany/your_projecte/vendor ]; then curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh /go/bin/dep ensure fi - save_cache: key: gopkg-{{ .Branch }}-{{ checksum "Gopkg.lock" }} paths: - /go/src/github.com/your_comany/your_projecte/vendor - restore_cache: keys: - build-cache-{{ .Branch }}-{{ .Environment.CIRCLE_PREVIOUS_BUILD_NUM }} paths: - /tmp/go/cache - run: name: Setup Kubernetes Cluster (kind) command: | go get github.com/kubernetes-sigs/kind kind create cluster --name="1" export KUBECONFIG="$(kind get kubeconfig-path --name="1")" - run: name: Run Tests command: make test - run: name: Build command: make build - save_cache: key: build-cache-{{ .Branch }}-{{ .Environment.CIRCLE_BUILD_NUM }} paths: - /tmp/go/cache