Skip to content

Commit

Permalink
Merge pull request #27 from cloud-native-toolkit/fix/oc-apply-syntax
Browse files Browse the repository at this point in the history
fix: Fixed bad syntax on the OC apply command.
  • Loading branch information
nathanagood authored Feb 7, 2024
2 parents f66319a + da1322f commit 33a643d
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/commontasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const DefaultCatalogSourceNamespace: string = 'openshift-marketplace';
*/
export function ApplyObjectTask(scope: Construct, id: string, input: any): TaskBuilder {
return openshift_client(scope, id).withStringParam(new ParameterBuilder('SCRIPT').withValue(
['oc apply -f <<EOF', Yaml.stringify(input), 'EOF'].join('\n')),
['cat <<EOF | oc apply -f -', Yaml.stringify(input), 'EOF', ''].join('\n')),
);
}

Expand Down
20 changes: 12 additions & 8 deletions test/__snapshots__/commonTasks.test.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 12 additions & 8 deletions test/__snapshots__/commonpipelines.test.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 33a643d

Please sign in to comment.