Commit 1337de3a authored by David Diederich's avatar David Diederich
Browse files

Merge branch 'add-jit-git-pull' into 'main'

Add a Git Pull just prior to pushing to the repo store

See merge request !1
parents ad7b1d94 bfdb368e
Pipeline #92292 passed with stages
in 21 minutes and 30 seconds
......@@ -50,6 +50,12 @@ Feature: Store Utilizes Git-based Backend Database
And the store repo is pushed to the server
And logs include "Pushing Logfiles to Store Repo"
Scenario: Instance Root is Updated Just Prior to Changing
Given store is built
When The status is set to "success"
Then the store repo is pulled from the server
And the store repo is pushed to the server
Scenario: Setting the Run Status Copies Logs to Configured Output Directory
Given the configuration's fossaOutputDir is "/path/to/output"
And store is built
......
......@@ -318,6 +318,10 @@ def gitAddInstanceRoot(context):
def gitCommit(context, message):
context.storeObj.localRepo.index.commit.assert_called_with(message)
@then('the store repo is pulled from the server')
def gitPull(context):
context.storeObj.localRepo.remote().pull.assert_called()
@then('the store repo is pushed to the server')
def gitPush(context):
context.storeObj.localRepo.remote().push.assert_called()
......
......@@ -130,6 +130,7 @@ class Store:
log.debug("New Instance Root = %s", self.instanceRoot.path)
self.changeLogHandler()
self.localRepo.remote().pull()
index = self.localRepo.index
index.add([ self.instanceRoot.path ])
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment