CIDuty:TaskClusterCli

From MozillaWiki
Jump to: navigation, search

Taskcluster Binary

  1. Download the taskcluster binary from : https://index.taskcluster.net/v1/task/project.taskcluster.taskcluster-cli.latest/artifacts/public/linux-amd64/taskcluster
  2. Make it executable by running : chmod u+x taskcluster
  3. Create a 'bin' directory : mkdir ~/bin
  4. Put the taskcluster binary in your $PATH, usually ~/bin.
  5. Do a check to see if the file shows up in your $PATH by running : ls -al ~/bin. You should see the file called taskcluster there (double check that it can be executed by you)
  6. Because this file is now in your $PATH you can run it anytime, from within any directory.

Running Taskcluster CLI

  1. Run 'taskcluster' to see the help text. If you will see the help text, that confirms the binary executes successfully.
  2. Run 'taskcluster signin'. You will be redirected to a URL. Make sure you are authenticated with LDAP. The clientID, description and expiry should be already filed out. Scroll all the way down and click the 'Create client' button.
  3. You should get a new page saying that you can now close the URL. Your terminal should now have 3 new messages. 2 of them starting with 'export' and a 3rd line saying : "Credentials output as environment variables"
  4. Copy both lines, export TASKCLUSTER_CLIENT_ID='**********' and export TASKCLUSTER_ACCESS_TOKEN='*******************', into ~/.bashrc. Also run them in the currently opened terminal.
  5. You will not need to do the signin process again until the token expires. New terminals will also be able to run taskcluster commands thanks to the .bashrc file you've previously updated.