File tree Expand file tree Collapse file tree 3 files changed +8
-13
lines changed Expand file tree Collapse file tree 3 files changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -88,16 +88,15 @@ jobs:
88
88
cd packer/
89
89
packer init .
90
90
91
- SOURCE_IMAGE=${{ fromJSON(env.SOURCE_IMAGES_MAP)[matrix.os_version][matrix.build] }}
92
-
93
91
PACKER_LOG=1 packer build \
94
92
-on-error=${{ vars.PACKER_ON_ERROR }} \
95
93
-only=${{ matrix.build }} \
96
94
-var-file=$PKR_VAR_environment_root/${{ env.CI_CLOUD }}.pkrvars.hcl \
97
- -var "source_image_name=${SOURCE_IMAGE}" \
95
+ -var "source_image_name=${{ env. SOURCE_IMAGE } }" \
98
96
openstack.pkr.hcl
99
97
env :
100
98
PKR_VAR_os_version : ${{ matrix.os_version }}
99
+ SOURCE_IMAGE : ${{ fromJSON(env.SOURCE_IMAGES_MAP)[matrix.os_version][matrix.build] }}
101
100
102
101
- name : Get created image names from manifest
103
102
id : manifest
Original file line number Diff line number Diff line change @@ -85,17 +85,16 @@ jobs:
85
85
cd packer/
86
86
packer init .
87
87
88
- SOURCE_IMAGE=${{ fromJSON(env.SOURCE_IMAGES_MAP)[matrix.os_version] }}
89
-
90
88
PACKER_LOG=1 packer build \
91
89
-on-error=${{ vars.PACKER_ON_ERROR }} \
92
90
-only=${{ matrix.build }} \
93
91
-var-file=$PKR_VAR_environment_root/${{ env.CI_CLOUD }}.pkrvars.hcl \
94
- -var "source_image_name=${SOURCE_IMAGE}"
92
+ -var "source_image_name=${{ env. SOURCE_IMAGE } }"
95
93
openstack.pkr.hcl
96
94
97
95
env :
98
96
PKR_VAR_os_version : ${{ matrix.os_version }}
97
+ SOURCE_IMAGE : ${{ fromJSON(env.SOURCE_IMAGES_MAP)[matrix.os_version] }}
99
98
100
99
- name : Get created image names from manifest
101
100
id : manifest
Original file line number Diff line number Diff line change @@ -52,12 +52,9 @@ variable "source_image_name" {
52
52
}
53
53
54
54
variable "source_image" {
55
- type = map (string )
56
- default = {
57
- RL8: null
58
- RL9: null
59
- }
60
- description = " UUID of source image, keyed from var.os_version"
55
+ type = string
56
+ default = null
57
+ description = " UUID of source image"
61
58
}
62
59
63
60
variable "flavor" {
@@ -169,7 +166,7 @@ source "openstack" "openhpc" {
169
166
security_groups = var. security_groups
170
167
171
168
# Input image:
172
- source_image = " ${ var . source_image [ var . os_version ] } "
169
+ source_image = " ${ var . source_image } "
173
170
source_image_name = " ${ var . source_image_name } " # NB: must already exist in OpenStack
174
171
175
172
# SSH:
You can’t perform that action at this time.
0 commit comments