Skip to content

Commit

Permalink
New versioning strategy (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
JorritSalverda authored Nov 11, 2019
1 parent 3d808dc commit a38c583
Show file tree
Hide file tree
Showing 12 changed files with 57 additions and 50 deletions.
55 changes: 24 additions & 31 deletions .estafette.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,29 @@ version:
semver:
major: 1
minor: 2
patch: 1
labelTemplate: '{{branch}}-{{auto}}'
releaseBranch: 1.2.1

stages:
build:
image: golang:1.13.4-alpine3.10
env:
CGO_ENABLED: 0
GOOS: linux
commands:
- go test ./...
- go build -a -installsuffix cgo -ldflags "-X main.appgroup=${ESTAFETTE_LABEL_APP_GROUP} -X main.app=${ESTAFETTE_GIT_NAME} -X main.version=${ESTAFETTE_BUILD_VERSION} -X main.revision=${ESTAFETTE_GIT_REVISION} -X main.branch=${ESTAFETTE_GIT_BRANCH} -X main.buildDate=${ESTAFETTE_BUILD_DATETIME}" -o ./publish/${ESTAFETTE_GIT_NAME} .
build-lint-and-package:
parallelStages:
build:
image: golang:1.13.4-alpine3.10
env:
CGO_ENABLED: 0
GOOS: linux
commands:
- go test ./...
- go build -a -installsuffix cgo -ldflags "-X main.appgroup=${ESTAFETTE_LABEL_APP_GROUP} -X main.app=${ESTAFETTE_GIT_NAME} -X main.version=${ESTAFETTE_BUILD_VERSION} -X main.revision=${ESTAFETTE_GIT_REVISION} -X main.branch=${ESTAFETTE_GIT_BRANCH} -X main.buildDate=${ESTAFETTE_BUILD_DATETIME}" -o ./publish/${ESTAFETTE_GIT_NAME} .

lint-helm-chart:
image: extensions/helm:dev
action: lint

package-helm-chart:
image: extensions/helm:dev
action: package

bake:
image: extensions/docker:dev
Expand All @@ -36,16 +49,6 @@ stages:
repositories:
- estafette

lint-helm-chart:
image: extensions/helm:dev
action: lint
prerelease: true

package-helm-chart:
image: extensions/helm:dev
action: package
prerelease: true

test-helm-chart:
services:
- name: kubernetes
Expand All @@ -58,7 +61,6 @@ stages:
timeoutSeconds: 180
image: extensions/helm:dev
action: test
prerelease: true

clone-charts-repo:
image: extensions/git-clone:dev
Expand All @@ -68,7 +70,6 @@ stages:
publish-helm-chart:
image: extensions/helm:dev
action: publish
prerelease: true

slack-notify:
image: extensions/slack-build-status:dev
Expand All @@ -80,23 +81,15 @@ stages:

releases:
release:
clone: true
stages:
package-helm-chart:
image: extensions/helm:dev
action: package

clone-charts-repo:
image: extensions/git-clone:dev
repo: helm-charts
branch: master

publish-helm-chart:
purge-prerelease-helm-charts:
image: extensions/helm:dev
action: publish
purgePrerelease: true
action: purge

create-github-release:
image: extensions/github-release:dev
version: ${ESTAFETTE_BUILD_VERSION_MAJOR}.${ESTAFETTE_BUILD_VERSION_MINOR}.0
closeMilestone: true
image: extensions/github-release:dev
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@

# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
.glide/

# ignore build and helm artifacts
/estafette-gke-node-pool-shifter
/estafette-gke-node-pool-shifter-*.tgz
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ appVersion: "1.0"
description: Kubernetes controller that can shift nodes from one node pool to another, to favour for example preemptibles over regular vms
name: estafette-gke-node-pool-shifter
version: 0.1.0
home: https://helm.estafette.io
icon: https://helm.estafette.io/icon.png
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,33 @@
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

#
# APPLICATION SETTINGS
#

# the interval in seconds at which a nodes get shifted
interval: 300

# the node pool to reduce in size
nodePoolFrom: node-pool-a

# the node pool to scale up
nodePoolTo: node-pool-b

# the number of nodes to keep in the node pool that's getting drained
nodePoolFromMinNode: 0

secret:
# when using estafette-gcp-service account controller to fetch key files, set this to true and leave googleServiceAccountKeyfileJson empty
useGcpServiceAccountAnnotation: false

# sets a json keyfile for a gcp service account
googleServiceAccountKeyfileJson: '{"type": "service_account"}'

#
# GENERIC SETTINGS
#

replicaCount: 1

image:
Expand Down Expand Up @@ -70,22 +97,3 @@ extraLabels: {}

# use to add extra labels to podspec for getting their values in prometheus
extraPodLabels: {}

secret:
# when using estafette-gcp-service account controller to fetch key files, set this to true and leave googleServiceAccountKeyfileJson empty
useGcpServiceAccountAnnotation: false

# sets a json keyfile for a gcp service account
googleServiceAccountKeyfileJson: '{"type": "service_account"}'

# the interval in seconds at which a nodes get shifted
interval: 300

# the node pool to reduce in size
nodePoolFrom: node-pool-a

# the node pool to scale up
nodePoolTo: node-pool-b

# the number of nodes to keep in the node pool that's getting drained
nodePoolFromMinNode: 0

0 comments on commit a38c583

Please sign in to comment.