What was Joseph Stalin's highest rank in the military?

Stalin was never in the military. he pretended he was a generalissimo after the second world war.