Commit 3c6e035a authored by Ari Trachtenberg's avatar Ari Trachtenberg
Browse files

added player registration

parent 7120ca51
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@ stages:
  - prebuild
  - compile
  - test
  - extra
  - compete

include:
  - local: 'ci_cd/problem3.yml'
+22 −0
Original line number Diff line number Diff line
@@ -84,3 +84,25 @@ test_opponents:
  parallel:
    matrix:
      - OPPO: ["Random", "Smarter", "Smartest"]

register_player:
  stage: compete
  needs:
    - job: test_opponents
      artifacts: true
  script:
    - cd hw8_ec
    - #
    - # copy to the student directory
    - mkdir -p Players/${GITLAB_USER_LOGIN}/include
    - mkdir -p Players/${GITLAB_USER_LOGIN}/impl
    - cp include/MyPlayer.h Players/${GITLAB_USER_LOGIN}/include
    - cp impl/MyPlayer.cpp Players/${GITLAB_USER_LOGIN}/impl/
    - #
    - # upload to git repo
    - git add Players/${GITLAB_USER_LOGIN}/include/MyPlayer.h
    - git add Players/${GITLAB_USER_LOGIN}/impl/MyPlayer.cpp
    - git commit -m "Adding player ${GITLAB_USER_LOGIN}"
    - git push
    - #
    - echo "Player registered for ${GITLAB_USER_LOGIN}"