Skip to content

Commit f3286ca

Browse files
v1.7.3 Merge
v1.7.3 Merge
2 parents 73410db + 2ef9dcb commit f3286ca

File tree

8 files changed

+156
-133
lines changed

8 files changed

+156
-133
lines changed

.gitlab-ci.yml

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
stages:
2+
- test
3+
- build and push
4+
- manifests
5+
- release
6+
7+
.common_build: &common_build
8+
image: docker:stable
9+
stage: build and push
10+
variables:
11+
DOCKER_HOST: tcp://docker:2375/
12+
DOCKER_DRIVER: overlay2
13+
services:
14+
- docker:dind
15+
except:
16+
- tags
17+
only:
18+
changes:
19+
- "Dockerfile*"
20+
- Varken.py
21+
- varken/*
22+
- .gitlab-ci.yml
23+
before_script:
24+
- mkdir $HOME/.docker
25+
- echo '{"experimental":"enabled"}' > $HOME/.docker/config.json
26+
- if [[ $CI_COMMIT_REF_NAME == "master" ]]; then
27+
export TAG=$(grep -i version varken/__init__.py | cut -d \ -f3 | tr -d \");
28+
else
29+
export TAG="develop";
30+
fi
31+
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USER" --password-stdin
32+
- export CI_PROJECT_PATH=$(echo $CI_PROJECT_PATH | tr "[:upper:]" "[:lower:]")
33+
34+
.common_release: &common_release
35+
<<: *common_build
36+
tags:
37+
- docker
38+
- shared
39+
only:
40+
refs:
41+
- master
42+
43+
flake8:
44+
image: python:3.7.3-alpine
45+
stage: test
46+
cache:
47+
key: "varken-cache"
48+
paths:
49+
- .cache/pip
50+
- venv/
51+
variables:
52+
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
53+
tags:
54+
- shared
55+
before_script:
56+
- python -m venv venv
57+
- source venv/bin/activate
58+
- pip install -U flake8
59+
script:
60+
- flake8 --max-line-length 120 Varken.py varken/*.py
61+
62+
amd64:
63+
<<: *common_build
64+
tags:
65+
- docker
66+
- shared
67+
script:
68+
- docker build --pull
69+
--cache-from "$CI_PROJECT_PATH":"$TAG-amd64"
70+
-t "$CI_PROJECT_PATH":"$TAG-amd64" .
71+
- docker push "$CI_PROJECT_PATH":"$TAG-amd64"
72+
73+
armv6:
74+
<<: *common_build
75+
tags:
76+
- docker
77+
- arm
78+
script:
79+
- docker build --pull
80+
--cache-from "$CI_PROJECT_PATH":"$TAG-arm"
81+
-t "$CI_PROJECT_PATH":"$TAG-arm"
82+
-f Dockerfile.arm .
83+
- docker push "$CI_PROJECT_PATH":"$TAG-arm"
84+
85+
arm64v8:
86+
<<: *common_build
87+
tags:
88+
- docker
89+
- arm64
90+
script:
91+
- docker build --pull
92+
--cache-from "$CI_PROJECT_PATH":"$TAG-arm64"
93+
-t "$CI_PROJECT_PATH":"$TAG-arm64"
94+
-f Dockerfile.arm64 .
95+
- docker push "$CI_PROJECT_PATH":"$TAG-arm64"
96+
97+
versioned:
98+
<<: *common_build
99+
stage: manifests
100+
tags:
101+
- docker
102+
- shared
103+
script:
104+
- docker manifest create "$CI_PROJECT_PATH":"$TAG"
105+
"$CI_PROJECT_PATH":"$TAG-amd64"
106+
"$CI_PROJECT_PATH":"$TAG-arm64"
107+
"$CI_PROJECT_PATH":"$TAG-arm"
108+
- docker manifest push -p "$CI_PROJECT_PATH":"$TAG"
109+
110+
latest:
111+
<<: *common_release
112+
stage: manifests
113+
tags:
114+
- docker
115+
script:
116+
- docker manifest create "$CI_PROJECT_PATH":latest
117+
"$CI_PROJECT_PATH":"$TAG-amd64"
118+
"$CI_PROJECT_PATH":"$TAG-arm64"
119+
"$CI_PROJECT_PATH":"$TAG-arm"
120+
- docker manifest push -p "$CI_PROJECT_PATH":latest
121+
122+
.github:
123+
<<: *common_release
124+
stage: release
125+
script:
126+
- apk add git
127+
- git remote set-url origin "https://$GITHUB_USER:[email protected]/$CI_PROJECT_PATH".git"
128+
- git tag $TAG
129+
- git push --tags

CHANGELOG.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,23 @@
11
# Change Log
22

3-
## [v1.7.2](https://github.com/Boerderij/Varken/tree/v1.7.2) (2019-06-23)
4-
[Full Changelog](https://github.com/Boerderij/Varken/compare/1.7.1...v1.7.2)
3+
## [v1.7.3](https://github.com/Boerderij/Varken/tree/v1.7.3) (2019-08-09)
4+
[Full Changelog](https://github.com/Boerderij/Varken/compare/1.7.2...v1.7.3)
5+
6+
**Implemented enhancements:**
7+
8+
- \#141 Take monitored status into account for Missing Available Movies check [\#145](https://github.com/Boerderij/Varken/pull/145) ([mikeporterdev](https://github.com/mikeporterdev))
9+
10+
**Fixed bugs:**
11+
12+
- \[BUG\] Varken Crashes when ini is read only [\#146](https://github.com/Boerderij/Varken/issues/146)
13+
- \[BUG\] Missing Available Movies/TV Shows does not take Monitored status into account [\#141](https://github.com/Boerderij/Varken/issues/141)
14+
15+
**Merged pull requests:**
16+
17+
- v1.7.3 Merge [\#149](https://github.com/Boerderij/Varken/pull/149) ([DirtyCajunRice](https://github.com/DirtyCajunRice))
18+
19+
## [1.7.2](https://github.com/Boerderij/Varken/tree/1.7.2) (2019-06-24)
20+
[Full Changelog](https://github.com/Boerderij/Varken/compare/1.7.1...1.7.2)
521

622
**Implemented enhancements:**
723

@@ -295,4 +311,4 @@
295311
- Create crontabs [\#6](https://github.com/Boerderij/Varken/pull/6) ([ghost](https://github.com/ghost))
296312
- update plex\_dashboard.json [\#5](https://github.com/Boerderij/Varken/pull/5) ([ghost](https://github.com/ghost))
297313
- Update README.md [\#4](https://github.com/Boerderij/Varken/pull/4) ([ghost](https://github.com/ghost))
298-
- added sickrage portion [\#3](https://github.com/Boerderij/Varken/pull/3) ([ghost](https://github.com/ghost))
314+
- added sickrage portion [\#3](https://github.com/Boerderij/Varken/pull/3) ([ghost](https://github.com/ghost))

Jenkinsfile

Lines changed: 0 additions & 126 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<img width="800" src="https://raw.githubusercontent.com/Boerderij/Varken/master/assets/varken_full_banner.jpg" alt="Logo Banner">
33
</p>
44

5-
[![Build Status](https://jenkins.cajun.pro/buildStatus/icon?job=Varken/master)](https://jenkins.cajun.pro/job/Varken/job/master/)
5+
[![pipeline status](https://gitlab.com/boerderij/Varken/badges/master/pipeline.svg)](https://gitlab.com/boerderij/Varken/commits/master)
66
[![Discord](https://img.shields.io/discord/518970285773422592.svg?colorB=7289DA&label=Discord&logo=Discord&logoColor=7289DA&style=flat-square)](https://discord.gg/VjZ6qSM)
77
[![ko-fi](https://img.shields.io/badge/Buy%20Us%20A%20Coffee-Donate-ff813f.svg?logo=CoffeeScript&style=flat-square)](https://ko-fi.com/varken)
88
[![Docker-Layers](https://images.microbadger.com/badges/image/boerderij/varken.svg)](https://microbadger.com/images/boerderij/varken)

varken/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
VERSION = "1.7.2"
1+
VERSION = "1.7.3"
22
BRANCH = 'master'

varken/iniparser.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from os import W_OK, access
12
from shutil import copyfile
23
from os import environ as env
34
from logging import getLogger
@@ -77,6 +78,9 @@ def write_file(self, inifile):
7778
file_path = join(self.data_folder, ini)
7879
if exists(file_path):
7980
self.logger.debug('Writing to %s', inifile)
81+
if not access(file_path, W_OK):
82+
self.logger.error("Config file is incomplete and read-only. Exiting.")
83+
exit(1)
8084
with open(file_path, 'w') as config_ini:
8185
self.config.write(config_ini)
8286
else:

varken/radarr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def get_missing(self):
3737
return
3838

3939
for movie in movies:
40-
if not movie.downloaded:
40+
if movie.monitored and not movie.downloaded:
4141
if movie.isAvailable:
4242
ma = 0
4343
else:

varken/sonarr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def get_calendar(self, query="Missing"):
5454
else:
5555
downloaded = 0
5656
if query == "Missing":
57-
if not downloaded:
57+
if show.monitored and not downloaded:
5858
missing.append((show.series['title'], downloaded, sxe, show.title, show.airDateUtc, show.id))
5959
else:
6060
air_days.append((show.series['title'], downloaded, sxe, show.title, show.airDateUtc, show.id))

0 commit comments

Comments
 (0)