Skip to content

Commit

Permalink
Merge pull request #4 from Xorima/bug/filecount
Browse files Browse the repository at this point in the history
Fixes for count bug
  • Loading branch information
xorima committed Apr 12, 2020
2 parents 6eed15a + c25c4c2 commit c2ce8e6
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ rules:
truthy:
ignore: ".github/workflows/*"
line-length:
max: 120
max: 200
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Changelog

## 0.2.1

Fixed bug in file count logic

## 0.2.0

Initial creation of the application
4 changes: 2 additions & 2 deletions app/entrypoint.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,12 @@ catch {
# Copy items into the folder
copy-item "$SourceRepoDiskPath/*" ./$repoFolder -Recurse -Force
Set-Location $repoFolder
$filesChanges = Get-GitChangeCount
$filesChanged = Get-GitChangeCount
}
catch {
Write-Log -Level Error -Source 'entrypoint' -Message "Unable to copy managed files from $SourceRepoDiskPath to $repoFolder"
}
if ($fileChanges -gt 0)
if ($filesChanged -gt 0)
{
try {
if (!($branchExists))
Expand Down
43 changes: 43 additions & 0 deletions infrastructure/sous-chefs-cookbook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: github-file-manager-cookbook
spec:
schedule: "0 13 * * *"
jobTemplate:
spec:
template:
spec:
containers:
- name: github-file-manager
image: xorima/github-file-manager:0.2.1
env:
- name: GITHUB_TOKEN
valueFrom:
secretKeyRef:
name: xorimabot-github
key: github_token
- name: GFM_SOURCE_REPO_OWNER
value: sous-chefs
- name: GFM_SOURCE_REPO_NAME
value: repo-management
- name: GFM_SOURCE_REPO_PATH
value: "standardfiles/cookbook"
- name: GFM_DESTINATION_REPO_OWNER
value: sous-chefs
- name: GFM_DESTINATION_REPO_TOPICS
value: "chef-cookbook"
- name: GFM_BRANCH_NAME
value: "automated/standardfiles"
- name: GFM_PULL_REQUEST_TITLE
value: "Automated PR: Standardising Files"
- name: GFM_PULL_REQUEST_BODY
value: "This PR will standardise the files we have with out agreed spec in sous-chefs/repo-management, this repo has been identified as a cookbook repo by topics of chef-cookbook"
- name: GFM_GIT_NAME
value: "Xorima Bot"
- name: GFM_GIT_EMAIL
value: "xorimabot@avon-lea.co.uk"
- name: GFM_GIT_USERNAME
value: "xorimabot"
restartPolicy: Never

0 comments on commit c2ce8e6

Please sign in to comment.