zrhoffman commented on a change in pull request #5706:
URL: https://github.com/apache/trafficcontrol/pull/5706#discussion_r609949112



##########
File path: .github/actions/to-ort-integration-tests/main.js
##########
@@ -0,0 +1,35 @@
+/*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+"use strict";
+const child_process = require("child_process");
+const spawnOptions = {
+       stdio: "inherit",
+       stderr: "inherit",
+};
+
+const dockerCompose = ["docker-compose", "-f", 
`${process.env.GITHUB_WORKSPACE}/traffic_ops_ort/testing/docker/docker-compose.yml`];
+
+function runProcess(...commandArguments) {
+       console.info(...commandArguments);
+       const status = child_process.spawnSync(commandArguments[0], 
commandArguments.slice(1), spawnOptions).status;
+       if (status === 0) {
+               return;
+       }
+       console.error("Child process \"", ...commandArguments, "\" exited with 
status code", status, "!");
+       process.exit(status ? status : 1);
+}
+
+runProcess(...dockerCompose, "build");

Review comment:
       If this is changed from `docker-compose build` to `docker-compose build 
--parallel`, the images will build way faster.

##########
File path: .github/actions/to-ort-integration-tests/main.js
##########
@@ -0,0 +1,35 @@
+/*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+"use strict";
+const child_process = require("child_process");
+const spawnOptions = {
+       stdio: "inherit",
+       stderr: "inherit",
+};
+
+const dockerCompose = ["docker-compose", "-f", 
`${process.env.GITHUB_WORKSPACE}/traffic_ops_ort/testing/docker/docker-compose.yml`];
+
+function runProcess(...commandArguments) {
+       console.info(...commandArguments);
+       const status = child_process.spawnSync(commandArguments[0], 
commandArguments.slice(1), spawnOptions).status;
+       if (status === 0) {
+               return;
+       }
+       console.error("Child process \"", ...commandArguments, "\" exited with 
status code", status, "!");
+       process.exit(status ? status : 1);
+}
+
+runProcess(...dockerCompose, "build");

Review comment:
       If the Docker images build in a step separate from the step that runs 
the ORT integration tests, it would be much easier to see the output for the 
tests themselves.
   
   The build step could be pretty small, just
   
   ```yaml
       - run: docker-compose -f 
traffic_ops_ort/testing/docker/docker-compose.yml build
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to