Move report files to S3 - KnoldusLabs/codesquad-support GitHub Wiki

Moving reports to S3

Please follow the below mentioned ways to move files to S3:

In your CodeShip Account for your project click on Project Settings and then click on Deployment.

If you do not have any Custom Script set then click on Custom Script otherwise you may edit the script.

For Multi Build Projects

Please note before executing the commands

  1. These commands have to be executed for all the modules of the project
  2. Where you find github_path replace it with the GitHub or BitBucket path which is generated on CodeShip and may look like /home/rof/src/github.com/KnoldusLabs/your_project_name
  3. Where you find project_name replace it with your project name as it appears
  4. Where you find module_name replace it with the respective module name
  5. Where you find scala-version replace it with your respective Scala version which may be scala-2.10 or scala-2.11

Add this command in the first line:

pip install awscli

ScalaStyle

Add the following commands:

AWS_ACCESS_KEY_ID='AKIAITJXGNMADSFXDRBA' AWS_SECRET_ACCESS_KEY='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' aws s3 cp github_path/target/scalastyle-result.xml s3://code-squad-reports/project_name/module_name/target/

Scapegoat

AWS_ACCESS_KEY_ID='AKIAITJXGNMADSFXDRBA' AWS_SECRET_ACCESS_KEY='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' aws s3 cp github_path/target/scala-version/scapegoat-report/scapegoat.xml s3://code-squad-reports/project_name/module_name/target/scala-2.11/scapegoat-report/

Scoverage

AWS_ACCESS_KEY_ID='AKIAITJXGNMADSFXDRBA' AWS_SECRET_ACCESS_KEY='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' aws s3 cp github_path/target/scala-version/scoverage-report/scoverage.xml s3://code-squad-reports/project_name/module_name/target/scala-2.11/scoverage-report/

CPD

AWS_ACCESS_KEY_ID='AKIAITJXGNMADSFXDRBA' AWS_SECRET_ACCESS_KEY='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' aws s3 cp github_path/target/scala-version/cpd/cpd.xml s3://code-squad-reports/project_name/module_name/target/scala-2.11/cpd/

For Single Build Projects

Please note before executing the commands

  1. Where you find github_path replace it with the GitHub or BitBucket path which is generated on CodeShip and may look like /home/rof/src/github.com/KnoldusLabs/your_project_name
  2. Where you find project_name replace it with your project name as it appears
  3. Where you find scala-version replace it with your respective Scala version which may be scala-2.10 or scala-2.11

Add this command in the first line:

pip install awscli

ScalaStyle

Add the following commands:

AWS_ACCESS_KEY_ID='AKIAITJXGNMADSFXDRBA' AWS_SECRET_ACCESS_KEY='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' aws s3 cp github_path/target/scalastyle-result.xml s3://code-squad-reports/project_name/main/target/

Scapegoat

AWS_ACCESS_KEY_ID='AKIAITJXGNMADSFXDRBA' AWS_SECRET_ACCESS_KEY='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' aws s3 cp github_path/target/scala-version/scapegoat-report/scapegoat.xml s3://code-squad-reports/project_name/main/target/scala-2.11/scapegoat-report/

Scoverage

AWS_ACCESS_KEY_ID='AKIAITJXGNMADSFXDRBA' AWS_SECRET_ACCESS_KEY='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' aws s3 cp github_path/target/scala-version/scoverage-report/scoverage.xml s3://code-squad-reports/project_name/main/target/scala-2.11/scoverage-report/

CPD

AWS_ACCESS_KEY_ID='AKIAITJXGNMADSFXDRBA' AWS_SECRET_ACCESS_KEY='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' aws s3 cp github_path/target/scala-version/cpd/cpd.xml s3://code-squad-reports/project_name/main/target/scala-2.11/cpd/