in aws_lambda_builders/workflows/custom_make/actions.py [0:0]
def execute(self):
"""
Runs the action.
:raises lambda_builders.actions.ActionFailedError: when Make Build fails.
"""
# Check for manifest file
try:
self.manifest_check()
except MakeFileNotFoundError as ex:
raise ActionFailedError(str(ex))
# Create the Artifacts Directory if it doesnt exist.
if not self.osutils.exists(self.artifacts_dir):
self.osutils.makedirs(self.artifacts_dir)
try:
current_env = self.osutils.environ()
LOG.info("%s: Current Artifacts Directory : %s", self.build_logical_id, self.artifact_dir_path)
current_env.update({"ARTIFACTS_DIR": self.artifact_dir_path})
# Export environmental variables that might be needed by other binaries used
# within the Makefile and also specify the makefile to be used as well.
self.subprocess_make.run(
[
"--makefile",
"{}".format(self.manifest_path),
"build-{logical_id}".format(logical_id=self.build_logical_id),
],
env=current_env,
cwd=self.working_directory,
)
except MakeExecutionError as ex:
raise ActionFailedError(str(ex))