Skip to content
This repository has been archived by the owner on Mar 11, 2019. It is now read-only.

Commit

Permalink
Rename project into fennec-aurora-task-creator
Browse files Browse the repository at this point in the history
It is more self-explanatory than "nightlies-watcher"
  • Loading branch information
JohanLorenzo committed Oct 20, 2016
1 parent 1a62e49 commit 5a1490b
Show file tree
Hide file tree
Showing 28 changed files with 50 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@ target/
# Vim
*.swp

# Specific to nightlies-watcher
# Specific to fennec-aurora-task-creator
config.json
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
recursive-include nightlies_watcher/data *
recursive-include fennec_aurora_task_creator/data *

include LICENSE
include README.rst
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# nightlies-watcher
# fennec-aurora-task-creator

[![Build Status](https://travis-ci.org/JohanLorenzo/nightlies-watcher.svg?branch=master)](https://travis-ci.org/JohanLorenzo/nightlies-watcher) [![Coverage Status](https://coveralls.io/repos/github/JohanLorenzo/nightlies-watcher/badge.svg?branch=master)](https://coveralls.io/github/JohanLorenzo/nightlies-watcher?branch=master)
[![Build Status](https://travis-ci.org/JohanLorenzo/fennec-aurora-task-creator.svg?branch=master)](https://travis-ci.org/JohanLorenzo/fennec-aurora-task-creator) [![Coverage Status](https://coveralls.io/repos/github/JohanLorenzo/fennec-aurora-task-creator/badge.svg?branch=master)](https://coveralls.io/github/JohanLorenzo/fennec-aurora-task-creator?branch=master)

Create publishing tasks once Firefox for Android nightlies are built. It currently only supports publishing to Google Play Store.

Expand All @@ -14,7 +14,7 @@ First, you need `python>=3.5.0`.
virtualenv3 venv3
# activate it
. venv3/bin/activate
pip install nightlies-watcher
pip install fennec-aurora-task-creator
```

## Configure
Expand All @@ -40,11 +40,11 @@ Here you may [create and edit scopes](https://tools.taskcluster.net/auth/clients

### Pulse config

In order to know when builds are ready, nightlies-watcher relies on [Pulse](https://wiki.mozilla.org/Auto-tools/Projects/Pulse). Here you may [create a client](https://pulseguardian.mozilla.org/profile). If you're using Mozilla's instance, you'll need to listen to the [task completed exchange](https://wiki.mozilla.org/Auto-tools/Projects/Pulse/Exchanges#Queue:_Task_Completed), which translates to:
In order to know when builds are ready, fennec-aurora-task-creator relies on [Pulse](https://wiki.mozilla.org/Auto-tools/Projects/Pulse). Here you may [create a client](https://pulseguardian.mozilla.org/profile). If you're using Mozilla's instance, you'll need to listen to the [task completed exchange](https://wiki.mozilla.org/Auto-tools/Projects/Pulse/Exchanges#Queue:_Task_Completed), which translates to:
```
exchange/taskcluster-queue/v1/task-completed
```
At the first start of nightlies-watcher, a pulse queue will be created. If you're still using Mozilla's instance, nightlies are found under these keys:
At the first start of fennec-aurora-task-creator, a pulse queue will be created. If you're still using Mozilla's instance, nightlies are found under these keys:
```
route.index.gecko.v2.$BRANCH.nightly.latest.$PLATFORM.#
```
Expand Down
2 changes: 1 addition & 1 deletion config_example.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"group_name": "Publisher",
"group_symbol": "pub",
"symbol": "gp",
"reason": "The Nightly scheduler named 'nightlies-watcher' triggered this build",
"reason": "The Nightly scheduler named 'fennec-aurora-task-creator' triggered this build",
"tier": 3,
"is_opt": true
},
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os
from frozendict import frozendict

from nightlies_watcher.directories import PROJECT_DIRECTORY, DATA_DIRECTORY
from fennec_aurora_task_creator.directories import PROJECT_DIRECTORY, DATA_DIRECTORY

logger = logging.getLogger(__name__)

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import requests

from nightlies_watcher.exceptions import NoPushIdError, TooManyPushIdsError
from fennec_aurora_task_creator.exceptions import NoPushIdError, TooManyPushIdsError


def get_push_id(repository, revision):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import logging
import taskcluster

from nightlies_watcher.config import get_config
from nightlies_watcher.worker import start_message_queue_worker
from fennec_aurora_task_creator.config import get_config
from fennec_aurora_task_creator.worker import start_message_queue_worker

logger = logging.getLogger(__name__)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import re
import taskcluster

from nightlies_watcher import treeherder, hg_mozilla, tc_index, tc_queue
from nightlies_watcher.directories import PROJECT_DIRECTORY
from nightlies_watcher.exceptions import NotOnlyOneApkError, TreeherderJobAlreadyExistError
from fennec_aurora_task_creator import treeherder, hg_mozilla, tc_index, tc_queue
from fennec_aurora_task_creator.directories import PROJECT_DIRECTORY
from fennec_aurora_task_creator.exceptions import NotOnlyOneApkError, TreeherderJobAlreadyExistError


logger = logging.getLogger(__name__)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from taskcluster import Index, exceptions

from nightlies_watcher.exceptions import TaskNotFoundError
from fennec_aurora_task_creator.exceptions import TaskNotFoundError

_index = Index()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from taskcluster import Queue

from nightlies_watcher.exceptions import UnmatchedRouteError
from fennec_aurora_task_creator.exceptions import UnmatchedRouteError

_queue = Queue()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

from frozendict import frozendict

from nightlies_watcher.config import get_config
from nightlies_watcher.directories import DATA_DIRECTORY
from fennec_aurora_task_creator.config import get_config
from fennec_aurora_task_creator.directories import DATA_DIRECTORY


def test_get_config():
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest

from nightlies_watcher.hg_mozilla import _get_full_repository_name, get_push_id, _get_push_log_url, _pluck_push_id
from nightlies_watcher.exceptions import NoPushIdError, TooManyPushIdsError
from fennec_aurora_task_creator.hg_mozilla import _get_full_repository_name, get_push_id, _get_push_log_url, _pluck_push_id
from fennec_aurora_task_creator.exceptions import NoPushIdError, TooManyPushIdsError


def test_get_full_repository_name():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from unittest import mock

from nightlies_watcher.main import main
from fennec_aurora_task_creator.main import main


def test_main():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

from distutils.util import strtobool

from nightlies_watcher.exceptions import NotOnlyOneApkError, TreeherderJobAlreadyExistError
from nightlies_watcher.publish import publish_if_possible, _filter_right_artifacts, _craft_artifact_urls, \
from fennec_aurora_task_creator.exceptions import NotOnlyOneApkError, TreeherderJobAlreadyExistError
from fennec_aurora_task_creator.publish import publish_if_possible, _filter_right_artifacts, _craft_artifact_urls, \
_craft_task_data, _fetch_task_ids_per_achitecture, _fetch_artifacts


Expand Down Expand Up @@ -178,7 +178,7 @@ def utcnow(cls):
'name': 'Google Play Publisher',
'description': 'Publishes Aurora builds to Google Play Store',
'owner': 'r@m.c',
'source': 'https://github.com/JohanLorenzo/nightlies-watcher',
'source': 'https://github.com/JohanLorenzo/fennec-aurora-task-creator',
},
'payload': {
'apks': {
Expand All @@ -200,7 +200,7 @@ def utcnow(cls):


def test_fetch_task_ids_per_achitecture(monkeypatch):
from nightlies_watcher import tc_index
from fennec_aurora_task_creator import tc_index

monkeypatch.setattr(
tc_index, 'get_task_id', lambda _, __, architecture: 'QbosbKzTTB2E08IHTAtTfw' if architecture == 'android-x86' else 'VRzn3vi6RvSNaKTaT5u83A'
Expand All @@ -218,7 +218,7 @@ def test_fetch_task_ids_per_achitecture(monkeypatch):


def test_fetch_artifacts(monkeypatch):
from nightlies_watcher import tc_queue
from fennec_aurora_task_creator import tc_queue

monkeypatch.setattr(tc_queue, 'fetch_artifacts_list', lambda _: ['dummy_data'])

Expand Down Expand Up @@ -299,7 +299,7 @@ def assert_create_task_is_called_with_right_arguments(payload, _):
'name': 'Google Play Publisher',
'description': 'Publishes Aurora builds to Google Play Store',
'owner': 'r@m.c',
'source': 'https://github.com/JohanLorenzo/nightlies-watcher',
'source': 'https://github.com/JohanLorenzo/fennec-aurora-task-creator',
},
'payload': {
'apks': {
Expand All @@ -319,10 +319,10 @@ def assert_create_task_is_called_with_right_arguments(payload, _):
'workerType': 'test-worker',
}

from nightlies_watcher import treeherder
from fennec_aurora_task_creator import treeherder
monkeypatch.setattr(treeherder, 'does_job_already_exist', lambda _, __, ___, tier: False)

from nightlies_watcher import tc_queue
from fennec_aurora_task_creator import tc_queue
monkeypatch.setattr(tc_queue, 'create_task', assert_create_task_is_called_with_right_arguments)

publish_if_possible(config, 'mozilla-aurora', '7bc185ff4e8b66536bf314f9cf8b03f7d7f0b9b8')
Expand All @@ -338,7 +338,7 @@ def test_publish_raises_error_if_job_exists_in_treeherder(monkeypatch):
}
}

from nightlies_watcher import treeherder
from fennec_aurora_task_creator import treeherder
monkeypatch.setattr(treeherder, 'does_job_already_exist', lambda _, __, ___, tier: True)

with pytest.raises(TreeherderJobAlreadyExistError):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import pytest
import taskcluster

from nightlies_watcher.exceptions import TaskNotFoundError
from nightlies_watcher.tc_index import get_task_id, _craft_full_namespace, _index
from fennec_aurora_task_creator.exceptions import TaskNotFoundError
from fennec_aurora_task_creator.tc_index import get_task_id, _craft_full_namespace, _index


def test_craft_full_namespace():
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import pytest

from nightlies_watcher.tc_queue import fetch_task_definition, pluck_architecture, pluck_repository, pluck_revision, _queue, fetch_artifacts_list, create_task
from nightlies_watcher.exceptions import UnmatchedRouteError
from fennec_aurora_task_creator.tc_queue import fetch_task_definition, pluck_architecture, pluck_repository, pluck_revision, \
_queue, fetch_artifacts_list, create_task
from fennec_aurora_task_creator.exceptions import UnmatchedRouteError

TASK_DEFINITION = {
'routes': [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest

from nightlies_watcher.exceptions import NoTreeherderResultSetError, TooManyTreeherderResultSetsError
from nightlies_watcher.treeherder import _is_job_in_list, _client, does_job_already_exist, get_routes
from fennec_aurora_task_creator.exceptions import NoTreeherderResultSetError, TooManyTreeherderResultSetsError
from fennec_aurora_task_creator.treeherder import _is_job_in_list, _client, does_job_already_exist, get_routes


def test_is_job_in_list():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

from unittest.mock import Mock

from nightlies_watcher import tc_queue, publish
from nightlies_watcher.exceptions import TaskNotFoundError, TreeherderJobAlreadyExistError
from nightlies_watcher.worker import _dispatch, start_message_queue_worker
from fennec_aurora_task_creator import tc_queue, publish
from fennec_aurora_task_creator.exceptions import TaskNotFoundError, TreeherderJobAlreadyExistError
from fennec_aurora_task_creator.worker import _dispatch, start_message_queue_worker


@pytest.mark.asyncio
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from thclient import TreeherderClient

from nightlies_watcher.exceptions import NoTreeherderResultSetError, TooManyTreeherderResultSetsError
from fennec_aurora_task_creator.exceptions import NoTreeherderResultSetError, TooManyTreeherderResultSetsError


logger = logging.getLogger(__name__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import logging
import json

from nightlies_watcher import tc_queue, publish
from nightlies_watcher.exceptions import TaskNotFoundError, TreeherderJobAlreadyExistError
from nightlies_watcher.config import get_config
from fennec_aurora_task_creator import tc_queue, publish
from fennec_aurora_task_creator.exceptions import TaskNotFoundError, TreeherderJobAlreadyExistError
from fennec_aurora_task_creator.config import get_config


log = logging.getLogger(__name__)
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@
source_url = f.read().rstrip()

setup(
name="nightlies-watcher",
name="fennec-aurora-task-creator",
version=version,
description="Watches Aurora nightlies and creates tasks to deploy them to Google Play Store",
author="Mozilla Release Engineering",
author_email="release+python@mozilla.com",
url=source_url,
packages=find_packages(),
package_data={"nightlies-watcher": ["data/*"]},
package_data={"fennec-aurora-task-creator": ["data/*"]},
include_package_data=True,
zip_safe=False,
entry_points={
"console_scripts": [
"nightlies-watcher = nightlies_watcher.main:main",
"fennec-aurora-task-creator = fennec_aurora_task_creator.main:main",
],
},
license="MPL2",
Expand Down
2 changes: 1 addition & 1 deletion source_url.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/JohanLorenzo/nightlies-watcher
https://github.com/JohanLorenzo/fennec-aurora-task-creator
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ deps =
asynctest

commands =
py.test --cov nightlies_watcher --cov-report term-missing
py.test --cov fennec_aurora_task_creator --cov-report term-missing
coverage html
flake8

Expand Down

0 comments on commit 5a1490b

Please sign in to comment.