-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding the config file to spawn-agent, refactoring for common usage +…
… typo
- Loading branch information
Showing
7 changed files
with
54 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Publish server docker image | ||
name: Build and publish HPCS server image | ||
on: [push] | ||
|
||
env: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Parse configuration file | ||
from configparser import ConfigParser, NoSectionError, NoOptionError | ||
|
||
def parse_configuration(path : str): | ||
config = ConfigParser() | ||
config.read(path) | ||
|
||
if not 'spire-server' in config: | ||
raise NoSectionError("hpcs-server section missing in configuration file, aborting") | ||
|
||
if not 'hpcs-server' in config: | ||
raise NoSectionError("hpcs-server section missing in configuration file, aborting") | ||
|
||
if not 'vault' in config: | ||
raise NoSectionError("vault section missing in configuration file, aborting") | ||
|
||
if not 'address' in config['spire-server'] or not 'port' in config['spire-server'] or not 'trust-domain' in config['spire-server']: | ||
raise NoOptionError("'spire-server' section is incomplete in configuration file, aborting") | ||
|
||
if not 'url' in config['hpcs-server']: | ||
raise NoOptionError("'hpcs-server' section is incomplete in configuration file, aborting") | ||
|
||
if not 'url' in config['vault']: | ||
raise NoOptionError("'vault' section is incomplete in configuration file, aborting") | ||
|
||
return config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters