v1.0.0 User Manual - AutolabJS/autolabcli GitHub Wiki

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

  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. Please note that the version of nodejs must be 8.0 or above
  3. Install autolabcli software using the command,
    $ npm install -g @autolabjs/autolabcli
  4. Please make sure the main server and the gitlab host and port are updated according to the current installation of the AutolabJS (defaults to autolab.bits-goa.ac.in:9000 and autolab.bits-goa.ac.in respectively) by using the following command:
    $ autolabjs prefs changeserver --type ms 
    $ autolabjs prefs changeserver --type gitlab
  5. 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.'
  6. 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.
  7. 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
  8. Enter into the directory.
    $ cd lab1
  9. Login to the autolabcli using your Gitlab username and password.
    $ autolabjs init
    You 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.
  10. 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 the proper directory structure for code submissions.
  11. 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
  12. 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.
  13. 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
⚠️ **GitHub.com Fallback** ⚠️