Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hpc-factory
Manage
Activity
Members
Labels
Plan
Issues
75
Issue boards
Milestones
Wiki
Code
Merge requests
13
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
rc
hpc-factory
Merge requests
!74
The source project of this merge request has been removed.
Move build pipeline out to integration project
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Move build pipeline out to integration project
louistw/packer-openstack-hpc-image:move-integration-pipeline
into
main
Overview
0
Commits
7
Pipelines
7
Changes
1
Merged
Bo-Chun Chen
requested to merge
louistw/packer-openstack-hpc-image:move-integration-pipeline
into
main
1 year ago
Overview
0
Commits
7
Pipelines
7
Changes
1
Expand
Closes
#106 (closed)
Edited
1 year ago
by
Bo-Chun Chen
👍
0
👎
0
Merge request reports
Viewing commit
25c2907a
Prev
Next
Show latest version
1 file
+
58
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
25c2907a
Add test ood iamge job for mr
· 25c2907a
Bo-Chun Chen
authored
1 year ago
.gitlab-ci.yml
+
58
−
0
Options
@@ -315,6 +315,64 @@ test_ood_image:
artifacts
:
reports
:
dotenv
:
instance.env
rules
:
-
if
:
$CI_PIPELINE_SOURCE == "schedule"
when
:
always
test_ood_image_mr
:
stage
:
test
needs
:
[
build_ood_image
]
tags
:
-
build
script
:
-
openstack image set --accept $BUILT_OOD_IMAGE_ID
-
FAILED=false
-
|
eval $(ssh-agent -s)
chmod 400 "$SSH_PRIV_KEY"
ssh-add "$SSH_PRIV_KEY"
mkdir ~/.ssh
chmod 700 ~/.ssh
-
|
cat > user_data.txt << OEOF
#!/bin/bash
cat > /etc/resolv.conf << EOF
search openstack.internal cm.cluster rc.uab.edu ib.cluster drac.cluster eth.cluster ib-hdr.cluster
nameserver 172.20.0.25
EOF
echo "$DEV_KEY" >> /root/.ssh/authorized_keys
mkdir -p /run/shibboleth
chown shibd:shibd /run/shibboleth
OEOF
-
>
export NEW_INSTANCE_ID=$(openstack server create
-c id -f value --image $BUILT_OOD_IMAGE_ID
--network $OOD_INSTANCE_NETWORK
--security-group ood-https-ports
--security-group allow-ssh
--user-data user_data.txt
--flavor $INSTANCE_FLAVOR
--wait
$OOD_INSTANCE_NAME)
-
echo NEW_INSTANCE_ID=$NEW_INSTANCE_ID | tee -a instance.env
-
openstack server add floating ip $NEW_INSTANCE_ID $FLOATING_IP
-
>
curl --retry 10 --retry-delay 20 --retry-connrefused https://knightly.rc.uab.edu/Shibboleth.sso/Metadata --resolve knightly.rc.uab.edu:443:$FLOATING_IP -kf
|| FAILED=true
-
ssh -o StrictHostKeyChecking=no acctsvc@$FLOATING_IP '[ $(mount | grep "etc/auto" | wc -l) -eq 6 ]' || FAILED=true
-
|
if [ "$FAILED" = true ]; then
if [ "${DELETE_WHEN_FAILED-true}" = true ]; then
openstack server delete $NEW_INSTANCE_ID
openstack image delete $BUILT_OOD_IMAGE_ID
fi
false
fi
artifacts
:
reports
:
dotenv
:
instance.env
rules
:
-
if
:
$CI_MERGE_REQUEST_ID
deploy_review
:
stage
:
deploy
Loading