public void execute()

in src/main/java/com/microsoft/jenkins/appservice/commands/DockerBuildCommand.java [26:50]


    public void execute(final IDockerBuildCommandData context) {
        final DockerBuildInfo dockerBuildInfo = context.getDockerBuildInfo();

        try {
            final String image = imageAndTag(dockerBuildInfo);
            context.logStatus(String.format("Building new docker image `%s`", image));

            final FilePath workspace = context.getWorkspace();
            if (workspace == null) {
                throw new AzureCloudException("workspace is not available at this time.");
            }

            final FilePath dockerfile = findDockerFile(workspace, dockerBuildInfo.getDockerfile());
            context.logStatus("Dockerfile found: " + dockerfile.getRemote());

            final String imageId = workspace.act(new DockerBuildCommandOnSlave(
                    context.getListener(), context.getDockerClientBuilder(), dockerBuildInfo, dockerfile, image));
            dockerBuildInfo.setImageId(imageId);

            context.setDeploymentState(DeploymentState.Success);
        } catch (AzureCloudException | InterruptedException | IOException e) {
            context.logStatus("Build failed for " + e.getMessage());
            context.setDeploymentState(DeploymentState.HasError);
        }
    }