fix(pikaoa): 避免 Tekton 替换占位符检测正则
This commit is contained in:
@@ -99,6 +99,8 @@ describe("PikaOA test PaC renderer", () => {
|
||||
expect(manifest).toContain("pikaoa.unidesk.io/source-commit: __PIKAOA_SOURCE_COMMIT__");
|
||||
expect(script).toContain('s|__PIKAOA_SOURCE_COMMIT__|$SOURCE_COMMIT|g');
|
||||
expect(script).toContain("GitOps manifest contains unresolved provenance or image placeholders");
|
||||
expect(script).not.toContain("grep -Eq '$(params.revision)");
|
||||
expect(script).toContain("grep -Eq '__PIKAOA_SOURCE_COMMIT__|__PIKAOA_(API|WORKER|WEB)_IMAGE__'");
|
||||
expect(script).toContain("git ls-remote --exit-code --heads");
|
||||
expect(script).toContain("git -C /workspace/gitops checkout --orphan");
|
||||
} finally {
|
||||
|
||||
@@ -270,7 +270,7 @@ sed -i \\
|
||||
-e "s|__PIKAOA_WORKER_IMAGE__|$(params.worker-image)|g" \\
|
||||
-e "s|__PIKAOA_WEB_IMAGE__|$(params.web-image)|g" \\
|
||||
"$manifest"
|
||||
if grep -Eq '\$\(params\.revision\)|__PIKAOA_SOURCE_COMMIT__|__PIKAOA_(API|WORKER|WEB)_IMAGE__' "$manifest"; then
|
||||
if grep -Eq '__PIKAOA_SOURCE_COMMIT__|__PIKAOA_(API|WORKER|WEB)_IMAGE__' "$manifest"; then
|
||||
echo 'GitOps manifest contains unresolved provenance or image placeholders' >&2
|
||||
exit 6
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user