File tree 3 files changed +13
-10
lines changed
3 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -27,19 +27,22 @@ function template_drone_config() {
27
27
local target_path=" $ENV_DIR /.drone.yml"
28
28
local image_tag=" $( otomi_image_tag) "
29
29
local cluster=" $( yqr cluster.name) "
30
+ local pullPolicy=" always"
31
+ [ " ${image_tag: 0: 1} " = " v" ] && pullPolicy=' if-not-exists'
30
32
31
33
printf " ${COLOR_LIGHT_PURPLE} Creating $target_path ${COLOR_NC} \n"
32
34
33
35
local target=$target_path
34
36
[ " ${DRY_RUN-' false' } " = ' false' ] && target=" /dev/stdout"
35
37
36
38
cat $template_path | sed \
37
- -e " s/__CLUSTER/${cluster} /g" \
38
- -e " s/__IMAGE_TAG/${image_tag} /g" \
39
- -e " s|__WEBHOOK|${webhook} |g" \
40
- -e " s/__CUSTOMER/${customer_name} /g" \
41
- -e " s/__BRANCH/${branch} /g" \
42
- -e " s/__CHANNEL/${channel} /g" \
39
+ -e " s/__CLUSTER/$cluster /g" \
40
+ -e " s/__IMAGE_TAG/$image_tag /g" \
41
+ -e " s|__WEBHOOK|$webhook |g" \
42
+ -e " s/__CUSTOMER/$customer_name /g" \
43
+ -e " s/__BRANCH/$branch /g" \
44
+ -e " s/__CHANNEL/$channel /g" \
45
+ -e " s/__PULL_POLICY/$pullPolicy /g" \
43
46
> $target
44
47
}
45
48
Original file line number Diff line number Diff line change @@ -34,15 +34,15 @@ steps:
34
34
35
35
- name : test
36
36
image : otomi/core:__IMAGE_TAG
37
- pull : always
37
+ pull : __PULL_POLICY
38
38
depends_on :
39
39
- prepare-env
40
40
commands :
41
41
- cd .. && bin/otomi test
42
42
43
43
- name : apply
44
44
image : otomi/core:__IMAGE_TAG
45
- pull : always
45
+ pull : __PULL_POLICY
46
46
commands :
47
47
- cd .. && bin/otomi apply
48
48
depends_on :
Original file line number Diff line number Diff line change @@ -36,15 +36,15 @@ steps:
36
36
37
37
- name : test
38
38
image : otomi/core:__IMAGE_TAG
39
- pull : always
39
+ pull : __PULL_POLICY
40
40
depends_on :
41
41
- prepare-env
42
42
commands :
43
43
- cd .. && bin/otomi test
44
44
45
45
- name : apply
46
46
image : otomi/core:__IMAGE_TAG
47
- pull : always
47
+ pull : __PULL_POLICY
48
48
commands :
49
49
- cd .. && bin/otomi apply
50
50
depends_on :
You can’t perform that action at this time.
0 commit comments