Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hpc-factory
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Krish Moodbidri
hpc-factory
Commits
d568a476
Commit
d568a476
authored
5 months ago
by
Bo-Chun Chen
Browse files
Options
Downloads
Patches
Plain Diff
feat: remove base compute and gpu build from pipeline
parent
2818a776
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+0
-92
0 additions, 92 deletions
.gitlab-ci.yml
with
0 additions
and
92 deletions
.gitlab-ci.yml
+
0
−
92
View file @
d568a476
...
...
@@ -104,98 +104,6 @@ build_docker_image:
-
Dockerfile
allow_failure
:
true
build_base_image
:
stage
:
build
tags
:
-
build
script
:
-
|
if [ -n "${BUILT_BASE_IMAGE_ID}" ]; then
exit 0
fi
-
*update_ansible_repo
-
*get_ansible_files
-
export REPO_HEAD=$(git rev-parse --short HEAD)
-
export PKR_VAR_flavor="${BASE_BUILD_FLAVOR:-$PKR_VAR_flavor}"
-
export PKR_VAR_build_instance_name="base-${REPO_HEAD}"
-
export PKR_VAR_image_date_suffix=false
-
|
if [ $CI_PIPELINE_SOURCE == 'merge_request_event' ]; then
export PKR_VAR_image_name="base-PR-${CI_MERGE_REQUEST_IID}"
elif [ $CI_PIPELINE_SOURCE == 'schedule' ]; then
export PKR_VAR_image_name="base-${BUILD_DATE}"
fi
-
packer init openstack
-
packer validate openstack
-
packer build -machine-readable openstack | tee base_build.log
-
export BUILT_BASE_IMAGE_ID=$(grep 'Image:' base_build.log | awk '{print $4}')
-
echo BUILT_BASE_IMAGE_ID=${BUILT_BASE_IMAGE_ID} | tee -a $CI_PROJECT_DIR/image.env
-
openstack image unset --property signature_verified $BUILT_BASE_IMAGE_ID
artifacts
:
reports
:
dotenv
:
image.env
expire_in
:
30 days
build_compute_image
:
stage
:
build
needs
:
[
build_base_image
]
tags
:
-
build
script
:
-
*update_ansible_repo
-
*get_ansible_files
-
export PKR_VAR_source_image=${BUILT_BASE_IMAGE_ID}
-
export REPO_HEAD=$(git rev-parse --short HEAD)
-
export PKR_VAR_flavor="${COMPUTE_BUILD_FLAVOR:-$PKR_VAR_flavor}"
-
export PKR_VAR_build_instance_name="compute-${REPO_HEAD}"
-
export PKR_VAR_image_date_suffix=false
-
|
if [ $CI_PIPELINE_SOURCE == 'merge_request_event' ]; then
export PKR_VAR_image_name="compute-PR-${CI_MERGE_REQUEST_IID}"
elif [ $CI_PIPELINE_SOURCE == 'schedule' ]; then
export PKR_VAR_image_name="compute-${BUILD_DATE}"
fi
-
packer init openstack-compute
-
packer validate openstack-compute
-
packer build -machine-readable openstack-compute | tee compute_build.log
build_gpu_image
:
stage
:
build
needs
:
[
build_base_image
]
tags
:
-
build
script
:
-
*update_ansible_repo
-
*get_ansible_files
-
FAILED=false
-
export GPU_PLACEHOLDER_NAME="gpu1-placeholder"
-
export GPU_PLACEHOLDER_FLAVOR="gpu1.medium"
-
export GPU_PLACEHOLDER_IMAGE="CentOS-7-x86_64-GenericCloud-2009"
-
export PKR_VAR_source_image=${BUILT_BASE_IMAGE_ID}
-
export REPO_HEAD=$(git rev-parse --short HEAD)
-
export PKR_VAR_flavor="${GPU_BUILD_FLAVOR:-gpu1.medium}"
-
export PKR_VAR_build_instance_name="gpu-${REPO_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 init openstack-gpu
-
packer validate openstack-gpu
-
openstack server delete --wait $GPU_PLACEHOLDER_NAME
-
packer build -machine-readable openstack-gpu | tee gpu_build.log || FAILED=true
-
openstack server create --image $GPU_PLACEHOLDER_IMAGE --network cicd-net --flavor $GPU_PLACEHOLDER_FLAVOR $GPU_PLACEHOLDER_NAME
-
|
if [ "$FAILED" = true ]; then
exit 1
fi
rules
:
-
if
:
$SKIP_GPU_BUILD == "true"
when
:
never
-
when
:
always
build_ood_image
:
stage
:
build
tags
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment