Skip to content
Snippets Groups Projects
Commit 30431303 authored by Bo-Chun Chen's avatar Bo-Chun Chen
Browse files

Build gpu image

parent 18cbd91e
No related branches found
No related tags found
No related merge requests found
...@@ -103,6 +103,26 @@ build_compute_image: ...@@ -103,6 +103,26 @@ build_compute_image:
- packer validate openstack-compute - packer validate openstack-compute
- packer build -machine-readable openstack-compute | tee compute_build.log - packer build -machine-readable openstack-compute | tee compute_build.log
build_gpu_image:
stage: build
needs: [build_base_image]
tags:
- build
script:
- export CRI_XCBC_HEAD=$(git rev-parse --short HEAD)
- export BUILD_DATE=$(TZ=America/Chicago date +%Y%m%d)
- export PKR_VAR_flavor="gpu1.medium"
- export PKR_VAR_build_instance_name="gpu-${CRI_XCBC_HEAD}"
- export PKR_VAR_image_date_suffix=false
- |
if [ $CI_PIPELINE_SOURCE == 'merge_request_event' ]; then
export PKR_VAR_image_name="gpu-PR-${CI_MERGE_REQUEST_IID}"
elif [ $CI_PIPELINE_SOURCE == 'schedule' ]; then
export PKR_VAR_image_name="gpu-${BUILD_DATE}"
fi
- packer validate openstack-gpu
- packer build -machine-readable openstack-gpu | tee gpu_build.log
build_image: build_image:
stage: build stage: build
environment: environment:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment