git config before push #41

Closed
dachary wants to merge 1 commits from dachary:wip-config into master
There is no content yet.
dachary added 1 commit 2022-07-08 12:28:41 +00:00
ci/woodpecker/pr/woodpecker Pipeline failed Details
abec96eec3
git config before push

These commands are executed only in CI environment as part of init code for integration tests environments or when executed with CI=true(woodpecker and GitHub actions do it) and is unrelated to https://gitea.hostea.org/Hostea/dashboard/issues/26

But local configs are cleaner.

CI build logs:

281 + git config user.email dachary@noreply.gitea.hostea.org 53s
282 fatal: not in a git directory 

The init script creates tmp directories, writes to a dummy file to have something to push, commits and pushes to the fleet repository. This way, dashboard will clone a non-empty repository, closely resembling the actual situation.

The changes this PR contains try to set local config for a Git repository without cd-ing into the repository directory. The global configuration is a cheap hack to not cd into it :D

These commands are executed only in CI environment as part of init code for integration tests environments or when executed with `CI=true`(woodpecker and GitHub actions do it) and is unrelated to https://gitea.hostea.org/Hostea/dashboard/issues/26 But local configs are cleaner. ## CI build logs: ``` 281 + git config user.email dachary@noreply.gitea.hostea.org 53s 282 fatal: not in a git directory ``` The init script creates tmp directories, writes to a dummy file to have something to push, commits and pushes to the fleet repository. This way, dashboard will clone a non-empty repository, closely resembling the actual situation. The changes this PR contains try to set local config for a Git repository without `cd`-ing into the repository directory. The global configuration is a cheap hack to not `cd` into it :D
dachary force-pushed wip-config from abec96eec3 to fc056b20b0 2022-07-08 13:25:41 +00:00 Compare
dachary force-pushed wip-config from fc056b20b0 to d0416a9533 2022-07-08 13:32:06 +00:00 Compare
dachary force-pushed wip-config from d0416a9533 to 9f40a5c1ac 2022-07-08 13:34:20 +00:00 Compare
dachary force-pushed wip-config from 9f40a5c1ac to 412c4a14ed 2022-07-08 13:38:16 +00:00 Compare
dachary closed this pull request 2022-07-08 13:39:24 +00:00
Poster
Owner

the --global in the CI is the reason why it does not fail as it should. But I'm working on a fix and will explain.

the --global in the CI is the reason why it does not fail as it should. But I'm working on a fix and will explain.
Some checks are pending
ci/woodpecker/pr/woodpecker Pipeline is pending

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Hostea/dashboard#41
There is no content yet.