Skip to content

Commit

Permalink
Merge pull request #5 from zmailloux/gcr
Browse files Browse the repository at this point in the history
Gcr
  • Loading branch information
zmailloux authored Feb 19, 2019
2 parents 973d6f0 + 9de23e8 commit 953a472
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
7 changes: 5 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ pipeline {
label "jenkins-gradle"
}
environment {
ORG = 'zebra'
DOCKER_REGISTRY = "gcr.io"
ORG = 'es-devops-d'
APP_NAME = 'meta-project'
CHARTMUSEUM_CREDS = credentials('jenkins-x-chartmuseum')
}
Expand All @@ -13,7 +14,7 @@ pipeline {
branch 'PR-*'
}
environment {
DOCKER_REGISTRY = "gcr.io/es-devops-d"
DOCKER_REGISTRY = "gcr.io"
PREVIEW_VERSION = "0.0.0-SNAPSHOT-$BRANCH_NAME-$BUILD_NUMBER"
PREVIEW_NAMESPACE = "$APP_NAME-$BRANCH_NAME".toLowerCase()
HELM_RELEASE = "$PREVIEW_NAMESPACE".toLowerCase()
Expand Down Expand Up @@ -48,6 +49,8 @@ pipeline {
sh "gradle clean build"
sh "export VERSION=`cat VERSION` && skaffold build -f skaffold.yaml"
sh "jx step post build --image $DOCKER_REGISTRY/$ORG/$APP_NAME:\$(cat VERSION)"
// Also deloy it again as latest.
sh "jx step post build --image $DOCKER_REGISTRY/$ORG/$APP_NAME:latest"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion charts/meta-project/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ ifeq ($(OS),Darwin)
sed -i "" -e "s/tag:.*/tag: $(RELEASE_VERSION)/" values.yaml
else ifeq ($(OS),Linux)
sed -i -e "s/version:.*/version: $(RELEASE_VERSION)/" Chart.yaml
sed -i -e "s|repository:.*|repository: $(DOCKER_REGISTRY)\/zebra\/meta-project|" values.yaml
sed -i -e "s|repository:.*|repository: $(DOCKER_REGISTRY)\/es-devops-d\/meta-project|" values.yaml
sed -i -e "s/tag:.*/tag: $(RELEASE_VERSION)/" values.yaml
else
echo "platfrom $(OS) not supported to release from"
Expand Down
4 changes: 2 additions & 2 deletions charts/meta-project/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
replicaCount: 1

image:
repository: gcr.io/es-devops-d/zebra/meta-project
repository: gcr.io/es-devops-d/meta-project
tag: latest
pullPolicy: IfNotPresent

Expand All @@ -16,7 +16,7 @@ ingress:
# kubernetes.io/tls-acme: "true"
path: /
hosts:
- meta-project.dev.zebra.engineering
- meta-project.zach.zebra.engineering
tls: []
# - secretName: chart-example-tls
# hosts:
Expand Down
2 changes: 1 addition & 1 deletion charts/preview/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ifeq ($(OS),Darwin)
else ifeq ($(OS),Linux)
sed -i -e "s/version:.*/version: $(PREVIEW_VERSION)/" Chart.yaml
sed -i -e "s/version:.*/version: $(PREVIEW_VERSION)/" ../*/Chart.yaml
sed -i -e "s|repository:.*|repository: $(DOCKER_REGISTRY)\/zebra\/meta-project|" values.yaml
sed -i -e "s|repository:.*|repository: $(DOCKER_REGISTRY)\/es-devops-d\/meta-project|" values.yaml
sed -i -e "s/tag:.*/tag: $(PREVIEW_VERSION)/" values.yaml
else
echo "platfrom $(OS) not supported to release from"
Expand Down
6 changes: 3 additions & 3 deletions skaffold.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build:
docker: {}
tagPolicy:
envTemplate:
template: '{{.DOCKER_REGISTRY}}/zebra/meta-project:{{.VERSION}}'
template: '{{.DOCKER_REGISTRY}}/es-devops-d/meta-project:{{.VERSION}}'
local: {}
deploy:
kubectl: {}
Expand All @@ -18,13 +18,13 @@ profiles:
- docker: {}
tagPolicy:
envTemplate:
template: '{{.DOCKER_REGISTRY}}/zebra/meta-project:{{.DIGEST_HEX}}'
template: '{{.DOCKER_REGISTRY}}/es-devops-d/meta-project:{{.DIGEST_HEX}}'
local: {}
deploy:
helm:
releases:
- name: meta-project
chartPath: charts/meta-project
setValueTemplates:
image.repository: '{{.DOCKER_REGISTRY}}/zebra/meta-project'
image.repository: '{{.DOCKER_REGISTRY}}/es-devops-d/meta-project'
image.tag: '{{.DIGEST_HEX}}'

0 comments on commit 953a472

Please sign in to comment.