kubernetes_helper 1.13.1 → 1.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +4 -3
- data/lib/kubernetes_helper/version.rb +1 -1
- data/lib/templates/cd.sh +5 -4
- data/lib/templates/settings.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9257b84ef107ed3b39ce537325de4357b348023becbf0f14fcf761bdf652d3f0
|
|
4
|
+
data.tar.gz: 77abef0bae873a41b1ed2fce90d49c55f07b43acbef6b578ae9b0e7f45716893
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f2798fb189f4e2ab77507dd8095d0f2741ef70d163a03d98f734f6d4772395b7521c77aed051a97a9d5241fca3ef0d8cdc0d19c4ea430ea81ed0af7e4d9f89ca
|
|
7
|
+
data.tar.gz: 4446e493e3cb37ec030d99e1ede09738bce1e8cd17f16f35c95ded98c1a18213cb7997d03d7b3e6c6c59d273fcf5468a09cd709aaaca6f87859bfa5f44d419f5
|
data/README.md
CHANGED
|
@@ -59,10 +59,11 @@ Below settings are used when running Continuous Deployment
|
|
|
59
59
|
- `continuous_deployment.project_name`: Cloud project name. Sample: `my-project-name`
|
|
60
60
|
- `continuous_deployment.cluster_name`: Cluster cluster name. Sample: `my-cluster-name`
|
|
61
61
|
- `continuous_deployment.cluster_region`: Cluster region name. Sample: `europe-west4-a`
|
|
62
|
-
- `continuous_deployment.docker_build_cmd
|
|
62
|
+
- `continuous_deployment.docker_build_cmd` (deprecated): Docker command to build the corresponding image. Sample: `build --target production -f Dockerfile `
|
|
63
|
+
- `continuous_deployment.docker_cmd` (String): Docker command to build the corresponding image.
|
|
64
|
+
Simple docker image: `docker build -f Dockerfile -t $DEPLOY_NAME .`
|
|
65
|
+
Docker image with target: `docker build --target production -f Dockerfile -t $DEPLOY_NAME .`
|
|
63
66
|
- `continuous_deployment.update_deployment` (Boolean, default: false): If true permits to re-generate and update the k8s deployment(s) before applying the new version (new docker image)
|
|
64
|
-
- `continuous_deployment.before_building_image` (String, default: empty): Add the ability to enter commands before building docker image
|
|
65
|
-
- `continuous_deployment.after_building_image` (String, default: empty): Add the ability to enter commands after building docker image
|
|
66
67
|
|
|
67
68
|
Below settings are used when configuring the application in the k8s environment
|
|
68
69
|
- `deployment.name` (String): Web deployment name (Note: Underscores are not accepted). Sample: `my-app`
|
data/lib/templates/cd.sh
CHANGED
|
@@ -10,7 +10,6 @@ IMAGE_NAME="<%=continuous_deployment.image_name%>"
|
|
|
10
10
|
CLUSTER_NAME="<%=continuous_deployment.cluster_name%>"
|
|
11
11
|
PROJECT_NAME="<%=continuous_deployment.project_name%>"
|
|
12
12
|
CLUSTER_REGION="<%=continuous_deployment.cluster_region%>"
|
|
13
|
-
DOCKER_BUILD_CMD="<%=continuous_deployment.docker_build_cmd || 'build -f Dockerfile'%>"
|
|
14
13
|
|
|
15
14
|
CI_COMMIT_SHA=$(git rev-parse --verify HEAD || :)
|
|
16
15
|
CI_COMMIT_SHA=${CI_COMMIT_SHA:-$(date +%s) }
|
|
@@ -42,9 +41,11 @@ if [ -z $ALREADY_DEPLOYED ]
|
|
|
42
41
|
then
|
|
43
42
|
## Build and push containers
|
|
44
43
|
echo "****** image not created yet, building image..."
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
<% if continuous_deployment.docker_cmd %>
|
|
45
|
+
<%= continuous_deployment.docker_cmd %>
|
|
46
|
+
<% else %>
|
|
47
|
+
docker <%=continuous_deployment.docker_build_cmd || 'build -f Dockerfile'%> -t $DEPLOY_NAME .
|
|
48
|
+
<% end %>
|
|
48
49
|
docker push $DEPLOY_NAME
|
|
49
50
|
else
|
|
50
51
|
echo "****** image was already created: $ALREADY_DEPLOYED"
|
data/lib/templates/settings.rb
CHANGED
|
@@ -35,7 +35,7 @@ settings = {
|
|
|
35
35
|
project_name: 'my-project-name',
|
|
36
36
|
cluster_name: 'my-cluster-name',
|
|
37
37
|
cluster_region: 'europe-west4-a',
|
|
38
|
-
|
|
38
|
+
docker_cmd: 'docker build -f Dockerfile -t $DEPLOY_NAME .', # using target: 'docker build --target production -f Dockerfile -t $DEPLOY_NAME .'
|
|
39
39
|
update_deployment: false # permits to reload secrets and re-generate/update deployment yaml
|
|
40
40
|
},
|
|
41
41
|
}
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kubernetes_helper
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.13.
|
|
4
|
+
version: 1.13.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- owen2345
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-03-
|
|
11
|
+
date: 2022-03-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: erb
|