Skip to content

Commit 3c76b54

Browse files
authored
Merge pull request #25 from stefanprodan/v2
Prepare v2 release
2 parents 6c8a85a + fc5a979 commit 3c76b54

File tree

1,260 files changed

+426
-363791
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,260 files changed

+426
-363791
lines changed

.circleci/config.yml

Lines changed: 39 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,51 @@
1-
version: 2
1+
version: 2.1
22
jobs:
3-
4-
build:
3+
push-helm-charts:
54
docker:
6-
- image: errordeveloper/skaffold:66cc263ef18f107adce245b8fc622a8ea46385f2
5+
- image: circleci/golang:1.12
76
steps:
87
- checkout
9-
- setup_remote_docker: {docker_layer_caching: true}
108
- run:
11-
name: Run unit tests and build the image with Skaffold
12-
command: skaffold build --profile=test
13-
14-
deploy:
15-
docker:
16-
- image: errordeveloper/skaffold:66cc263ef18f107adce245b8fc622a8ea46385f2
17-
steps:
18-
- checkout
19-
- setup_remote_docker: {docker_layer_caching: true}
9+
name: Install kubectl
10+
command: sudo curl -L https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl -o /usr/local/bin/kubectl && sudo chmod +x /usr/local/bin/kubectl
11+
- run:
12+
name: Install helm
13+
command: sudo curl -L https://storage.googleapis.com/kubernetes-helm/helm-v2.14.2-linux-amd64.tar.gz | tar xz && sudo mv linux-amd64/helm /bin/helm && sudo rm -rf linux-amd64
14+
- run:
15+
name: Initialize helm
16+
command: helm init --client-only --kubeconfig=$HOME/.kube/kubeconfig
17+
- run:
18+
name: Lint charts
19+
command: |
20+
helm lint ./charts/*
21+
- run:
22+
name: Package charts
23+
command: |
24+
mkdir $HOME/charts
25+
helm package ./charts/* --destination $HOME/charts
2026
- run:
21-
name: Build and push the image to the registry with Skaffold
27+
name: Publish charts
2228
command: |
23-
if [[ -z "${CIRCLE_PULL_REQUEST}" ]] && [[ "${CIRCLE_PROJECT_USERNAME}" = "stefanprodan" ]] ; then
24-
echo $REGISTRY_PASSWORD | docker login --username $REGISTRY_USERNAME --password-stdin
25-
skaffold build --profile=production
29+
if echo "${CIRCLE_TAG}" | grep -Eq "[0-9]+(\.[0-9]+)*(-[a-z]+)?$"; then
30+
REPOSITORY="https://stefanprodan:${GITHUB_TOKEN}@github.com/stefanprodan/podinfo.git"
31+
git config user.email [email protected]
32+
git config user.name stefanprodan
33+
git remote set-url origin ${REPOSITORY}
34+
git checkout gh-pages
35+
mv -f $HOME/charts/*.tgz .
36+
helm repo index . --url https://stefanprodan.github.io/podinfo
37+
git add .
38+
git commit -m "Publish Helm charts v${CIRCLE_TAG}"
39+
git push origin gh-pages
2640
else
27-
echo "Do not push image"
41+
echo "Not a release! Skip charts publish"
2842
fi
2943
30-
workflows:
31-
version: 2
32-
main:
44+
release:
3345
jobs:
34-
- build
35-
- deploy:
36-
requires: [build]
46+
- push-helm-charts:
3747
filters:
38-
branches: {only: [master]}
48+
branches:
49+
ignore: /.*/
50+
tags:
51+
ignore: /^chart.*/

.dockerignore

Lines changed: 0 additions & 9 deletions
This file was deleted.

.drone.yml

Lines changed: 0 additions & 104 deletions
This file was deleted.

.github/actions/docker/Dockerfile

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/actions/docker/entrypoint.sh

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/actions/golang/Dockerfile

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/actions/golang/entrypoint.sh

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/main.workflow

Lines changed: 0 additions & 35 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ release/
1919
build/
2020
gcloud/
2121
dist/
22+
bin/

.goreleaser.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
builds:
22
- main: ./cmd/podcli
33
binary: podcli
4-
ldflags: -s -w -X github.com/stefanprodan/k8s-podinfo/pkg/version.REVISION={{.Commit}}
4+
ldflags: -s -w -X github.com/stefanprodan/podinfo/pkg/version.REVISION={{.Commit}}
55
goos:
66
- windows
77
- darwin

0 commit comments

Comments
 (0)