Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.7.3 Merge #149

Merged
merged 10 commits into from
Aug 9, 2019
129 changes: 129 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
stages:
- test
- build and push
- manifests
- release

.common_build: &common_build
image: docker:stable
stage: build and push
variables:
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay2
services:
- docker:dind
except:
- tags
only:
changes:
- "Dockerfile*"
- Varken.py
- varken/*
- .gitlab-ci.yml
before_script:
- mkdir $HOME/.docker
- echo '{"experimental":"enabled"}' > $HOME/.docker/config.json
- if [[ $CI_COMMIT_REF_NAME == "master" ]]; then
export TAG=$(grep -i version varken/__init__.py | cut -d \ -f3 | tr -d \");
else
export TAG="develop";
fi
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USER" --password-stdin
- export CI_PROJECT_PATH=$(echo $CI_PROJECT_PATH | tr "[:upper:]" "[:lower:]")

.common_release: &common_release
<<: *common_build
tags:
- docker
- shared
only:
refs:
- master

flake8:
image: python:3.7.3-alpine
stage: test
cache:
key: "varken-cache"
paths:
- .cache/pip
- venv/
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
tags:
- shared
before_script:
- python -m venv venv
- source venv/bin/activate
- pip install -U flake8
script:
- flake8 --max-line-length 120 Varken.py varken/*.py

amd64:
<<: *common_build
tags:
- docker
- shared
script:
- docker build --pull
--cache-from "$CI_PROJECT_PATH":"$TAG-amd64"
-t "$CI_PROJECT_PATH":"$TAG-amd64" .
- docker push "$CI_PROJECT_PATH":"$TAG-amd64"

armv6:
<<: *common_build
tags:
- docker
- arm
script:
- docker build --pull
--cache-from "$CI_PROJECT_PATH":"$TAG-arm"
-t "$CI_PROJECT_PATH":"$TAG-arm"
-f Dockerfile.arm .
- docker push "$CI_PROJECT_PATH":"$TAG-arm"

arm64v8:
<<: *common_build
tags:
- docker
- arm64
script:
- docker build --pull
--cache-from "$CI_PROJECT_PATH":"$TAG-arm64"
-t "$CI_PROJECT_PATH":"$TAG-arm64"
-f Dockerfile.arm64 .
- docker push "$CI_PROJECT_PATH":"$TAG-arm64"

versioned:
<<: *common_build
stage: manifests
tags:
- docker
- shared
script:
- docker manifest create "$CI_PROJECT_PATH":"$TAG"
"$CI_PROJECT_PATH":"$TAG-amd64"
"$CI_PROJECT_PATH":"$TAG-arm64"
"$CI_PROJECT_PATH":"$TAG-arm"
- docker manifest push -p "$CI_PROJECT_PATH":"$TAG"

latest:
<<: *common_release
stage: manifests
tags:
- docker
script:
- docker manifest create "$CI_PROJECT_PATH":latest
"$CI_PROJECT_PATH":"$TAG-amd64"
"$CI_PROJECT_PATH":"$TAG-arm64"
"$CI_PROJECT_PATH":"$TAG-arm"
- docker manifest push -p "$CI_PROJECT_PATH":latest

.github:
<<: *common_release
stage: release
script:
- apk add git
- git remote set-url origin "https://$GITHUB_USER:[email protected]/$CI_PROJECT_PATH".git"
- git tag $TAG
- git push --tags
22 changes: 19 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
# Change Log

## [v1.7.2](https:/Boerderij/Varken/tree/v1.7.2) (2019-06-23)
[Full Changelog](https:/Boerderij/Varken/compare/1.7.1...v1.7.2)
## [v1.7.3](https:/Boerderij/Varken/tree/v1.7.3) (2019-08-09)
[Full Changelog](https:/Boerderij/Varken/compare/1.7.2...v1.7.3)

**Implemented enhancements:**

- \#141 Take monitored status into account for Missing Available Movies check [\#145](https:/Boerderij/Varken/pull/145) ([mikeporterdev](https:/mikeporterdev))

**Fixed bugs:**

- \[BUG\] Varken Crashes when ini is read only [\#146](https:/Boerderij/Varken/issues/146)
- \[BUG\] Missing Available Movies/TV Shows does not take Monitored status into account [\#141](https:/Boerderij/Varken/issues/141)

**Merged pull requests:**

- v1.7.3 Merge [\#149](https:/Boerderij/Varken/pull/149) ([DirtyCajunRice](https:/DirtyCajunRice))

## [1.7.2](https:/Boerderij/Varken/tree/1.7.2) (2019-06-24)
[Full Changelog](https:/Boerderij/Varken/compare/1.7.1...1.7.2)

**Implemented enhancements:**

Expand Down Expand Up @@ -295,4 +311,4 @@
- Create crontabs [\#6](https:/Boerderij/Varken/pull/6) ([ghost](https:/ghost))
- update plex\_dashboard.json [\#5](https:/Boerderij/Varken/pull/5) ([ghost](https:/ghost))
- Update README.md [\#4](https:/Boerderij/Varken/pull/4) ([ghost](https:/ghost))
- added sickrage portion [\#3](https:/Boerderij/Varken/pull/3) ([ghost](https:/ghost))
- added sickrage portion [\#3](https:/Boerderij/Varken/pull/3) ([ghost](https:/ghost))
126 changes: 0 additions & 126 deletions Jenkinsfile

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<img width="800" src="https://raw.githubusercontent.com/Boerderij/Varken/master/assets/varken_full_banner.jpg" alt="Logo Banner">
</p>

[![Build Status](https://jenkins.cajun.pro/buildStatus/icon?job=Varken/master)](https://jenkins.cajun.pro/job/Varken/job/master/)
[![pipeline status](https://gitlab.com/boerderij/Varken/badges/master/pipeline.svg)](https://gitlab.com/boerderij/Varken/commits/master)
[![Discord](https://img.shields.io/discord/518970285773422592.svg?colorB=7289DA&label=Discord&logo=Discord&logoColor=7289DA&style=flat-square)](https://discord.gg/VjZ6qSM)
[![ko-fi](https://img.shields.io/badge/Buy%20Us%20A%20Coffee-Donate-ff813f.svg?logo=CoffeeScript&style=flat-square)](https://ko-fi.com/varken)
[![Docker-Layers](https://images.microbadger.com/badges/image/boerderij/varken.svg)](https://microbadger.com/images/boerderij/varken)
Expand Down
2 changes: 1 addition & 1 deletion varken/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
VERSION = "1.7.2"
VERSION = "1.7.3"
BRANCH = 'master'
4 changes: 4 additions & 0 deletions varken/iniparser.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from os import W_OK, access
from shutil import copyfile
from os import environ as env
from logging import getLogger
Expand Down Expand Up @@ -77,6 +78,9 @@ def write_file(self, inifile):
file_path = join(self.data_folder, ini)
if exists(file_path):
self.logger.debug('Writing to %s', inifile)
if not access(file_path, W_OK):
self.logger.error("Config file is incomplete and read-only. Exiting.")
exit(1)
with open(file_path, 'w') as config_ini:
self.config.write(config_ini)
else:
Expand Down
2 changes: 1 addition & 1 deletion varken/radarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def get_missing(self):
return

for movie in movies:
if not movie.downloaded:
if movie.monitored and not movie.downloaded:
if movie.isAvailable:
ma = 0
else:
Expand Down
2 changes: 1 addition & 1 deletion varken/sonarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def get_calendar(self, query="Missing"):
else:
downloaded = 0
if query == "Missing":
if not downloaded:
if show.monitored and not downloaded:
missing.append((show.series['title'], downloaded, sxe, show.title, show.airDateUtc, show.id))
else:
air_days.append((show.series['title'], downloaded, sxe, show.title, show.airDateUtc, show.id))
Expand Down