Skip to content

v2.0.0 Assignment Submission using autolab CLI

Sribalaji M edited this page Apr 30, 2018 · 3 revisions

Please follow the instructions given below to submit labs to Autolab.

  1. Open a bash shell terminal in your linux operating system.
  2. Install node.js and npm packages using the tutorial to install node v8.x. The node installation also installs a matching npm tool.
  3. Install autolabcli software using the command,
    $npm install -g @autolabjs/autolabcli
  4. Configure git with user details.
    $ git config --global user.name "John Doe"
    $ git config --global user.email [email protected]
    You only have to enter the user information once per system.'
  5. Create the lab repository in gitlab. The name of the repository must be the same as the lab name of submission. For example, if you are doing lab1, then create a repository named lab1.
  6. Clone the repository into your local machine.
    export GIT_SSL_NO_VERIFY=1
    git clone https://autolab.bits-goa.ac.in/<your_username>/lab1.git
  7. Enter into the directory.
    $cd lab1
  8. Login to the autolabcli using your Gitlab username and password.
    $autolabjs init
    You can can also give your username and password as options as follows -
    $autolabjs init -u <username> -p <password>
    These credentials will be securely stored in the local computer and will be valid for 120 minutes.
  9. Create another directory inside lab1 with the name of the language in which you want to make the submission. For example, if you want to make your submission in java, create lab1/java directory. All the java code must go into this directory. Please follow proper directory structure for code submissions.
  10. Once your code is ready for submission, move into the lab1 directory and execute the following commands to push your code into Gitlab.
    $git add .
    $git commit -m "<Any appropriate message>"
    $git push
  11. Now you can submit the code for evaluation using -
    $autolabjs eval
    you will be prompted to enter the lab name, submission language and the commit hash. You can leave the commit hash field blank in order to evaluate your latest commit.
    OR
    You can also provide these fields as options as follows -
    $autolabjs eval -l <lab_name> --lang <language>

You will get the result of your submission after you have been evaluated.

  1. You can go ahead and make further submissions using the steps as described above, or if you are satisfied with your submission, logout of the autolabcli using -
    $autolabjs exit