
On Thu, 2020-03-26 at 14:33 +0100, Erik Skultety wrote:
+++ b/guests/lcitool + def get_gitlab_runner_token_file(self): + gitlab_runner_token_file = self._get_config_file("gitlab-runner-token") + + try: + with open(gitlab_runner_token_file, "r") as infile: + if not infile.readline().strip(): + raise ValueError + except Exception as ex: + raise Exception( + "Missing or invalid gitlab runner token file ({}): {}".format( + gitlab_runner_token_file, ex + ) + ) + + return gitlab_runner_token_file
As per my comments to patch 3/5, we want the token to be stored in the vault instead that on the disk, which will make most of this commit not necessary. -- Andrea Bolognani / Red Hat / Virtualization