kubernetes_helper 1.13.1 → 1.13.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 071cbd7243cf091dddbb90ae098afb3af88e8469c0b5db41a22f631907f1e529
4
- data.tar.gz: c3d0a6f4bf022441862921cfca4fd3d8be219309a23312c15f693c15ce88f1b7
3
+ metadata.gz: 9257b84ef107ed3b39ce537325de4357b348023becbf0f14fcf761bdf652d3f0
4
+ data.tar.gz: 77abef0bae873a41b1ed2fce90d49c55f07b43acbef6b578ae9b0e7f45716893
5
5
  SHA512:
6
- metadata.gz: cc4adcdfc85d9b12cbfaf7d4b523a9585a12e9f6da55c140429e818aa05ab70380c1c45fd6209fb5a25c7ff59b28e73e45178a051031a4268321382a9f6afc03
7
- data.tar.gz: 639e58559bb0768a78fd21e5d568db6c40747d225975679d6cd6873da52d388bd086bb53d0212b8828dd76ed4e562a600277004a41a3a121126db1b79d51a5d7
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`: Docker command to build the corresponding image. Sample: `build --target production -f Dockerfile `
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`
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module KubernetesHelper
4
- VERSION = '1.13.1'
4
+ VERSION = '1.13.2'
5
5
  end
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
- <%=continuous_deployment.before_building_image || ''%>
46
- docker $DOCKER_BUILD_CMD -t $DEPLOY_NAME .
47
- <%=continuous_deployment.after_building_image || ''%>
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"
@@ -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
- docker_build_cmd: 'build -f Dockerfile', # using target: 'build --target production -f Dockerfile '
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.1
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-17 00:00:00.000000000 Z
11
+ date: 2022-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: erb