Automating bodhi daily pushes

2018-10-02 Thread Mohan Boddu
Please review this change:
diff --git a/roles/bodhi2/backend/files/bodhi-automated-pushes.cron
b/roles/bodhi2/backend/files/bodhi-au
new file mode 100644
index 000..7e12cfd
--- /dev/null
+++ b/roles/bodhi2/backend/files/bodhi-automated-pushes.cron
@@ -0,0 +1 @@
+59 23 * * * apache /usr/local/bin/bodhi-automated-pushes.py
diff --git a/roles/bodhi2/backend/files/bodhi-automated-pushes.py
b/roles/bodhi2/backend/files/bodhi-auto
new file mode 100644
index 000..aacc81c
--- /dev/null
+++ b/roles/bodhi2/backend/files/bodhi-automated-pushes.py
@@ -0,0 +1,12 @@
+import requests
+import json
+import subprocess
+import logging
+
+req = requests.get('https://bodhi.fedoraproject.org/composes/')
+bodhi_composes = req.json()
+
+if len(bodhi_composes['composes']) == 0:
+bodhi_push_cmd = ["bodhi-push", "--username", "releng"]
+push = subprocess.Popen(bodhi_push_cmd, stdout=PIPE, stderr=PIPE,
stdin=PIPE)
+push.stdin.write('y')
diff --git a/roles/bodhi2/backend/tasks/main.yml
b/roles/bodhi2/backend/tasks/main.yml
index f76d944..054cef1 100644
--- a/roles/bodhi2/backend/tasks/main.yml
+++ b/roles/bodhi2/backend/tasks/main.yml
@@ -264,6 +264,14 @@
   - bodhi
   - cron

+- name: put bodhi-automated-pushes.py in place
+  copy: src=bodhi-automated-pushes.py
dest=/usr/local/bin/bodhi-automated-pushes.py mode=0755
+  when: inventory_hostname.startswith('bodhi-backend01') and env ==
"production"
+  tags:
+  - config
+  - bodhi
+  - cron
+
 - name: put update-fullfiletimelist in place
   copy: src="{{ files }}/scripts/update-fullfiletimelist"
dest=/usr/local/bin/update-fullfiletimelist mo
   when: inventory_hostname.startswith('bodhi-backend01') and env ==
"production"
@@ -288,6 +296,14 @@
   - bodhi
   - cron

+- name: Set the bodhi-automated-pushes cron job
+  copy: src=bodhi-automated-pushes.cron
dest=/etc/cron.d/bodhi-automated-pushes
+  when: inventory_hostname.startswith('bodhi-backend01') and env ==
"production"
+  tags:
+  - config
+  - bodhi
+  - cron
+
 - name: directory sizes update cron job.
   cron: name="directory-sizes-update" minute="30" hour="19" user="ftpsync"
 job="/usr/bin/find /pub/alt/ /pub/archive/ /pub/fedora-secondary/
/pub/fedora/ /pub/epel/ -type


During freezes the cron job is disabled and we will push the updates
manually.
___
infrastructure mailing list -- infrastructure@lists.fedoraproject.org
To unsubscribe send an email to infrastructure-le...@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/infrastructure@lists.fedoraproject.org


Re: epel7-infra and epel7 conflicts wrt pagure updates (or, can we have an epel7-infra DistTag?)

2018-10-02 Thread Dennis Gilmore
El vie, 28-09-2018 a las 16:16 -0700, Kevin Fenzi escribió:
> On 09/27/2018 01:50 PM, Mikolaj Izdebski wrote:
> > On 09/27/2018 10:39 PM, Neal Gompa wrote:
> > > I'd like to propose that we change epel7-infra so that the
> > > DistTag
> > > defined in %dist is ".el7.infra" instead of ".el7". This will
> > > prevent
> > > the conflict and have the advantage that the infra tag is higher
> > > by
> > > default.
> > 
> > +1 to use custom dist tags for infra builds. But I would like to
> > see
> > this implemented for all infra repos, not only epel7-infra.
> 
> Is there an easy way to do this?
> 
> I'm ok with it, but perhaps we could do 'fedora-infra' or 'fi' since
> we
> aren't the only infrastructure out there. :)
need to build redhat-release-server in the infra tag and define the new
value for the dist macro I would suggest .el7.infra or .el7.fi

Dennis


signature.asc
Description: This is a digitally signed message part
___
infrastructure mailing list -- infrastructure@lists.fedoraproject.org
To unsubscribe send an email to infrastructure-le...@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/infrastructure@lists.fedoraproject.org


Re: fedora-infrastructure#7267: "fedora-packager and statscache sunset" patch review.

2018-10-02 Thread David Shier
The git tagger references were not, in fact, missed. I saw those, and 
decided to ask about them as they did n't look related to me. Nirik 
indicated they were something else and needed to reamain, so I left 
them.


Am Di, 2. Okt, 2018 um 10:15 A. M. schrieb Mikolaj Izdebski 
:

On 10/02/2018 02:22 AM, David Shier wrote:

 All/sysadmin-main -

 Could someone please review the attached patch file for the removal 
of
 tagger and statscache from the ansible repos/proxy lists/ etc.? I 
was
 going to attach to issue, but pagure is only letting me do 
pictures, and

 this one is large and gnarly as a picture.


1. Commit subject is way too long and not well formed. There are many
guidelines on writing commit messages, eg. [1]
2. Ideally there should be one service removed per commit, not both 
in a

single commit
3. You missed multiple references to tagger, see "git grep tagger"

[1] https://chris.beams.io/posts/git-commit/



 Thanks,

 Dave Shier/odin



 ___
 infrastructure mailing list -- 
infrastructure@lists.fedoraproject.org
 To unsubscribe send an email to 
infrastructure-le...@lists.fedoraproject.org

 Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
 List Guidelines: 
https://fedoraproject.org/wiki/Mailing_list_guidelines
 List Archives: 
https://lists.fedoraproject.org/archives/list/infrastructure@lists.fedoraproject.org




--
Mikolaj Izdebski
Senior Software Engineer, Red Hat
IRC: mizdebsk
___
infrastructure mailing list -- infrastructure@lists.fedoraproject.org
To unsubscribe send an email to 
infrastructure-le...@lists.fedoraproject.org

Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: 
https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/infrastructure@lists.fedoraproject.org
___
infrastructure mailing list -- infrastructure@lists.fedoraproject.org
To unsubscribe send an email to infrastructure-le...@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/infrastructure@lists.fedoraproject.org


Re: fedora-infrastructure#7267: "fedora-packager and statscache sunset" patch review.

2018-10-02 Thread Mikolaj Izdebski
On 10/02/2018 02:22 AM, David Shier wrote:
> All/sysadmin-main -
> 
> Could someone please review the attached patch file for the removal of
> tagger and statscache from the ansible repos/proxy lists/ etc.? I was
> going to attach to issue, but pagure is only letting me do pictures, and
> this one is large and gnarly as a picture.

1. Commit subject is way too long and not well formed. There are many
guidelines on writing commit messages, eg. [1]
2. Ideally there should be one service removed per commit, not both in a
single commit
3. You missed multiple references to tagger, see "git grep tagger"

[1] https://chris.beams.io/posts/git-commit/

> 
> Thanks,
> 
> Dave Shier/odin
> 
> 
> 
> ___
> infrastructure mailing list -- infrastructure@lists.fedoraproject.org
> To unsubscribe send an email to infrastructure-le...@lists.fedoraproject.org
> Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: 
> https://lists.fedoraproject.org/archives/list/infrastructure@lists.fedoraproject.org
> 

-- 
Mikolaj Izdebski
Senior Software Engineer, Red Hat
IRC: mizdebsk
___
infrastructure mailing list -- infrastructure@lists.fedoraproject.org
To unsubscribe send an email to infrastructure-le...@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/infrastructure@lists.fedoraproject.org