UNCLASSIFIED - NO CUI
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bigbang
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
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
Big Bang
bigbang
Commits
ec302cbf
Commit
ec302cbf
authored
3 years ago
by
Brendon Lloyd
Committed by
Micah Nagel
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Wait for custom resources by running <package>/tests/wait.sh
parent
d494da88
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!862
Wait for custom resources by running <package>/tests/wait.sh
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/deploy/02_wait_for_helmreleases.sh
+29
-0
29 additions, 0 deletions
tests/deploy/02_wait_for_helmreleases.sh
with
29 additions
and
0 deletions
tests/deploy/02_wait_for_helmreleases.sh
+
29
−
0
View file @
ec302cbf
...
...
@@ -117,6 +117,33 @@ function wait_daemonset(){
done
}
# Check for and run the wait_project function within <repo>/tests/wait.sh to wait for custom resources
function
wait_crd
(){
set
+e
yq e
'. | keys | .[] | ... comments=""'
"chart/values.yaml"
|
while
IFS
=
read
-r
package
;
do
if
[[
"
$(
yq e
".
${
package
}
.enabled"
"chart/values.yaml"
)
"
==
"true"
]]
;
then
gitrepo
=
$(
yq e
".
${
package
}
.git.repo"
"chart/values.yaml"
)
version
=
$(
yq e
".
${
package
}
.git.tag"
"chart/values.yaml"
)
if
[[
-z
"
$version
"
]]
;
then
version
=
$(
yq e
".
${
package
}
.git.branch"
"chart/values.yaml"
)
fi
if
[[
-z
"
$version
"
||
"
$version
"
==
"null"
]]
;
then
continue
fi
printf
"Checking for tests/wait.sh in %s:%s... "
${
package
}
${
version
}
if
curl
-f
"
${
gitrepo
%.git
}
/-/raw/
${
version
}
/tests/wait.sh?inline=false"
1>
${
package
}
.wait.sh 2>/dev/null
;
then
printf
"found, running
\n
"
.
./
${
package
}
.wait.sh
wait_project
else
printf
"not found
\n
"
fi
fi
done
set
-e
}
## Append all add-ons to hr list if "all-packages" or default branch/tag. Else, add specific ci labels to hr list.
HELMRELEASES
=(
${
CORE_HELMRELEASES
[@]
}
)
if
[[
"
${
CI_COMMIT_BRANCH
}
"
==
"
${
CI_DEFAULT_BRANCH
}
"
]]
||
[[
!
-z
"
$CI_COMMIT_TAG
"
]]
||
[[
$CI_MERGE_REQUEST_LABELS
=
~
"all-packages"
]]
;
then
...
...
@@ -150,6 +177,8 @@ done
echo
"Waiting on helm releases..."
wait_all_hr
echo
"Waiting for custom resources..."
wait_crd
kubectl get helmreleases,kustomizations,gitrepositories
-A
...
...
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