Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Image CI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
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
linuxsupport
Testing
Image CI
Merge requests
!4
Fix query that finds latest images
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Fix query that finds latest images
debug
into
master
Overview
0
Commits
4
Pipelines
1
Changes
1
Merged
Alex Iribarren
requested to merge
debug
into
master
4 years ago
Overview
0
Commits
4
Pipelines
1
Changes
1
Expand
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
2fce841c
4 commits,
4 years ago
1 file
+
15
−
4
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
ci/common.yml
+
15
−
4
Options
@@ -18,12 +18,23 @@
.get_latest_image
:
&get_latest_image
-
|
if [[ -z "${IMAGE}" ]]; then
if [[ "${OS: -1}" -eq "s" ]]; then
SEARCH="--property os_distro="CS" --property os_distro_major=\"${OS:0:-1}\""
if [[ "${OS: -1}" == "s" ]]; then
OS_DISTRO="CS"
OS_MAJOR="${OS:0:-1}"
else
SEARCH="--property os_distro_major=\"${OS}\""
OS_MAJOR="${OS}"
if [[ "${OS}" -eq 7 ]]; then
OS_DISTRO="CC"
else
OS_DISTRO="C"
fi
fi
IMAGE=$(openstack image list --property os_distro="${OS_DISTRO}" --property os_distro_major="${OS_MAJOR}" --property os_edition="Base" --public --sort created_at -c ID -f value | tail -n1)
if [[ -z "${IMAGE}" ]]; then
echo "No image found matching:"
echo openstack image list --property os_distro="${OS_DISTRO}" --property os_distro_major="${OS_MAJOR}" --property os_edition="Base" --public --sort created_at
exit 1
fi
IMAGE=$(openstack image list $SEARCH --property os_edition="Base" --public --sort created_at -c ID -f value | tail -n1)
fi
.test_unmanaged_physical
:
Loading