mirror of
https://github.com/Adam-Ant/drone-trigger
synced 2024-12-20 07:24:34 +00:00
Add checking to see if task sent sucessfully
This prevents a new current value being written if it did not succeed, allowing it to be retried after the wait period.
This commit is contained in:
parent
bde153cfdc
commit
bb0721b645
9
main.py
9
main.py
@ -139,10 +139,11 @@ if __name__ == '__main__':
|
|||||||
branch = 'master'
|
branch = 'master'
|
||||||
else:
|
else:
|
||||||
branch = config[service]['branch']
|
branch = config[service]['branch']
|
||||||
runbuild(config[service].get('drone_repo'), branch)
|
if (runbuild(config[service].get('drone_repo'), branch)):
|
||||||
config[service]['current_value'] = new_value
|
config[service]['current_value'] = new_value
|
||||||
with open(filepath + '/dronetrigger.cfg', 'w') as configfile:
|
with open(filepath + '/dronetrigger.cfg', 'w') as configfile:
|
||||||
config.write(configfile)
|
config.write(configfile)
|
||||||
|
print("Successfully build new version for " + service)
|
||||||
|
|
||||||
except:
|
except:
|
||||||
raise
|
raise
|
||||||
|
Loading…
Reference in New Issue
Block a user