Example #1
0
    def __init__(self, artifact_info, remote):
        """Build the jar for a EMR, it is stored on s3

            Args:
                artifact_info (dict): Contains information about the package to execute inside the plugin
                remote (bool): Define if the plugin will be execute in remote or not
        """

        if artifact_info["mode"] == "master":
            s3cmd = "{} aws s3 cp ./target/ s3://{}/jars/prod/{}/ --recursive --exclude '*' --include '*.jar'".format(
                artifact_info["build_info"].get("prefix_command", ""),
                artifact_info["build_info"]["bucket_name"],
                artifact_info["artifact_name"]
            )
        else:
            s3cmd = "{} aws s3 cp ./target/ s3://{}/jars/dev/{}/{}/ --recursive --exclude '*' --include '*.jar'".format(
                artifact_info["build_info"].get("prefix_command", ""),
                artifact_info["build_info"]["bucket_name"],
                artifact_info["artifact_name"],
                artifact_info["mode"]
            )

        SimplePlugin.__init__(self, artifact_info,
                              {
                                  "command": {
                                      "run": s3cmd.strip(),
                                      "clean": artifact_info.get("clean_method", "make clean")
                                  }
                              },
                              remote=remote)
Example #2
0
        def __init__(self, package_info, remote):
            """Plugin for launching test from a make file with make ci & make clean

                Args:
                    package_info (dict): Contains information about the package to execute inside the plugin
                    remote (bool): Define if the plugin will be execute in remote or not

            """
            SimplePlugin.__init__(self, package_info,
                                  {
                                      "command": {
                                          "run": "make ci",
                                          "clean": "make clean"
                                      }
                                  },
                                  remote=remote)