File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -103,8 +103,11 @@ jobs:
103
103
# If the commit message starts with [v1], it's an update for v1
104
104
if [[ "$COMMIT_MESSAGE" == \[v1\]* ]]; then
105
105
echo "Update is for v1. Not setting v2.image.tag."
106
- # Update the app without changing the v2 image
107
- helm upgrade --install app-release ./my-chart
106
+ # Fetch the current v2 image tag from the running pods - this is to ensure the v2.image.tag is not changed from the values.yaml file
107
+ CURRENT_V2_IMAGE_TAG=$(kubectl get pods -l app=spring-app -o jsonpath="{.items[0].spec.containers[0].image}" | cut -d ":" -f 2)
108
+ # Update the app without changing the v2 image but instead change the v1 image to inputs.image_tag ensure the v2.image.tag is not changed from the values.yaml file
109
+ helm upgrade --install app-release ./my-chart --set v1.image.tag=${{ inputs.image_tag }},v2.image.tag=$CURRENT_V2_IMAGE_TAG
110
+
108
111
else
109
112
# If the commit message does not start with [v1], it's an update for v2
110
113
echo "Update is for v2. Setting v2.image.tag to: ${{ inputs.image_tag }}."
Original file line number Diff line number Diff line change @@ -15,4 +15,4 @@ spring.redis.port=6379
15
15
# spring.data.jpa.repositories.enabled=false
16
16
# spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
17
17
spring.jpa.hibernate.ddl-auto =none
18
- enableSearchFeature =true
18
+ enableSearchFeature =false
Original file line number Diff line number Diff line change @@ -58,12 +58,12 @@ void testEnableSearchFeature() {
58
58
// print a comment about the value of enableSearchFeature
59
59
System .out .println ("\n \n " );
60
60
System .out .println ("--------------------------------------------------------------------------------" );
61
- System .out .println ("Expected value of enableSearchFeature: true " );
61
+ System .out .println ("Expected value of enableSearchFeature: false " );
62
62
System .out .println ("Actual value of enableSearchFeature: " + appController .getEnableSearchFeature ());
63
63
System .out .println ("--------------------------------------------------------------------------------" );
64
64
65
- // assert that the value of enableSearchFeature is true
66
- assertEquals (true , appController .getEnableSearchFeature ());
65
+ // assert that the value of enableSearchFeature is false
66
+ assertEquals (false , appController .getEnableSearchFeature ());
67
67
68
68
System .out .println ("\n \n Test11-2 Successful!\n \n " );
69
69
}
You can’t perform that action at this time.
0 commit comments