Skip to content

Commit c1040ce

Browse files
author
Alexander Rogalskiy
committed
Updates on files
1 parent 5855b25 commit c1040ce

File tree

10 files changed

+123
-2
lines changed

10 files changed

+123
-2
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ tilt-stop:
325325
# Run skaffold deploy command.
326326
.PHONY: skaffold-start
327327
skaffold-start:
328-
$(AT)$(SKAFFOLD_CMD) dev --filename='skaffold.docker.yaml' --no-prune=false --cache-artifacts=false --tail
328+
$(AT)$(SKAFFOLD_CMD) dev --filename='skaffold.docker.yaml' --no-prune=true --cache-artifacts=true
329329

330330
# Run skaffold destroy command.
331331
.PHONY: skaffold-stop

docs/_config.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
title: Main
21
collapse_single_pages: true
32
nav:
43
- Info: README.md

k8s/overlays/dev/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
3+
nameSuffix: -dev
34
resources:
45
- ../../backend
56
- namespace.yaml

k8s/overlays/prod/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
3+
nameSuffix: -prod
34
resources:
45
- ../../backend
56
- namespace.yaml

k8s/overlays/staging/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
3+
nameSuffix: -staging
34
resources:
45
- ../../backend
56
- namespace.yaml

scripts/git_changes.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/usr/bin/env bash
2+
# Copyright (C) 2022 SensibleMetrics, Inc. (http://sensiblemetrics.io/)
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
# Usage example: /bin/sh ./scripts/git_changes.sh
17+
18+
set -o errexit
19+
set -o nounset
20+
set -o pipefail
21+
22+
dirty=$(git ls-files --modified)
23+
24+
if [[ $dirty ]]; then
25+
echo "================================="
26+
echo "Files were not formatted properly"
27+
echo "$dirty"
28+
echo "================================="
29+
exit 1
30+
fi

skaffold.docker.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ profiles:
1111
useDockerCLI: false
1212
useBuildkit: true
1313
concurrency: 0
14+
tagPolicy:
15+
sha256: {}
1416
artifacts:
1517
- image: styled-java-patterns
1618
context: ./

skaffold.helm.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ profiles:
1111
useDockerCLI: false
1212
useBuildkit: true
1313
concurrency: 0
14+
tagPolicy:
15+
sha256: {}
1416
artifacts:
1517
- image: styled-java-patterns
1618
context: ./
@@ -54,6 +56,8 @@ profiles:
5456
releases:
5557
- name: java-patterns-charts
5658
chartPath: charts
59+
skipBuildDependencies: true
60+
recreatePods: true
5761
# setValueTemplates:
5862
# image.repository: "{{.DOCKER_REGISTRY}}/gitcoinco/web"
5963
# image.tag: "{{.DIGEST_HEX}}"

skaffold.kubectl.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ profiles:
1111
useDockerCLI: false
1212
useBuildkit: true
1313
concurrency: 0
14+
tagPolicy:
15+
sha256: {}
1416
artifacts:
1517
- image: styled-java-patterns
1618
context: ./

skaffold.kustomize.yaml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
apiVersion: skaffold/v2beta28
2+
kind: Config
3+
build:
4+
local:
5+
push: false
6+
tryImportMissing: false
7+
useDockerCLI: false
8+
useBuildkit: true
9+
concurrency: 0
10+
tagPolicy:
11+
sha256: {}
12+
artifacts:
13+
- image: styled-java-patterns
14+
context: ./
15+
platforms: ["linux/amd64", "linux/arm64"]
16+
hooks:
17+
before:
18+
- command: ["sh", "-c", "./scripts/hook.sh"]
19+
os: [darwin, linux]
20+
dir: .
21+
- command: ["cmd.exe", "/C", "scripts/hook.bat"]
22+
os: [windows]
23+
dir: .
24+
after:
25+
- command: ["sh", "-c", "docker images $SKAFFOLD_IMAGE --digests"]
26+
os: [darwin, linux]
27+
- command: ["cmd.exe", "/C", "docker images %SKAFFOLD_IMAGE% --digests"]
28+
os: [windows]
29+
sync:
30+
manual:
31+
- src: 'docs/*'
32+
dest: /usr/src/app/docs
33+
hooks:
34+
before:
35+
- host:
36+
command: ["sh", "-c", "echo file changes detected: $SKAFFOLD_FILES_ADDED_OR_MODIFIED"]
37+
os: [darwin, linux]
38+
- host:
39+
command: ["cmd.exe", "/C", "echo file changes detected: %SKAFFOLD_FILES_ADDED_OR_MODIFIED%"]
40+
os: [windows]
41+
after:
42+
- container:
43+
command: ["sh", "-c", "set -x; kill -HUP 1"]
44+
docker:
45+
dockerfile: ./distribution/docker-images/dev.Dockerfile
46+
pullParent: false
47+
noCache: false
48+
squash: false
49+
50+
deploy:
51+
statusCheckDeadlineSeconds: 300
52+
kustomize:
53+
paths:
54+
- k8s/overlays/dev
55+
hooks:
56+
before:
57+
- host:
58+
command: ["sh", "-c", "echo pre-deploy host hook running on $(hostname)!"]
59+
os: [darwin, linux]
60+
after:
61+
- host:
62+
command: ["sh", "-c", "echo post-deploy host hook running on $(hostname)!"]
63+
64+
portForward:
65+
- resourceType: service
66+
resourceName: styled-java-patterns
67+
port: 8000
68+
address: 127.0.0.1
69+
localPort: 8000
70+
71+
profiles:
72+
- name: prod
73+
deploy:
74+
kustomize:
75+
paths:
76+
- k8s/overlays/prod
77+
- name: staging
78+
deploy:
79+
kustomize:
80+
paths:
81+
- k8s/overlays/staging

0 commit comments

Comments
 (0)