[Starlingx-discuss] Release notes/change log creation script

Scott Little scott.little at windriver.com
Fri Dec 21 16:37:41 UTC 2018


Prettier for human eyes.  Not as convenient for processing downstream 
scripts.  Perhaps publishing both formats would have value?

Can you post your script somewhere?

Scott



On 18-12-21 11:20 AM, Victor Rodriguez wrote:
> On Thu, Dec 20, 2018 at 3:16 PM Victor Rodriguez <vm.rod25 at gmail.com> wrote:
>> On Thu, Dec 20, 2018 at 11:03 AM Scott Little
>> <scott.little at windriver.com> wrote:
>>> Currently, I have it as a jenkins script on CENGN.  We can discuss the
>>> wisdom of placing it in stx-tools at the next build meeting.
>> Sounds good
>>
>>> I'm a  little concerned about blindly pulling scripts of a public git server
>>> and running them in a bot like jenkins, even if it's a repo we
>>> theoretically control.
>> At least to have a point where we can send PR to improve the output of
>> the log change
>>
>> This is the changelog we generate with the other script :
>> https://hastebin.com/wodibelano.sql
>>
> Sorry, hastebin has a day or so of duration, here is a github gist
>
> https://gist.github.com/VictorRodriguez/404c1e19c19db765dfeb82ee481db6ad
>
> regards
>
>
>> Open for comunity consideration
>>
>> regards
>>
>> Here is an example of wh
>>> ---------------------- < snip> ---------------------
>>>
>>> MY_REPO_ROOT=/localdisk/designer/$USER/$BRANCH
>>> MY_WORKSPACE=/localdisk/loadbuild/$USER/$BRANCH/$TIMESTAMP
>>>
>>> cd $MY_REPO_ROOT
>>>
>>> for e in $(find . -type d -name .git)
>>> do
>>>    pushd $e/..
>>>    f=$(/usr/bin/dirname $e)
>>>    echo "$f"
>>>    g=$(printf "%-48s" $f)
>>>    c=$(grep $(echo $f | sed 's:/:[/]:g' | sed 's:$:[^a-zA-Z0-9/_-]:' |
>>> sed 's:^[.][.]:^[.][.]:' | sed 's:^[.]:^[.]:')
>>> $MY_WORKSPACE/../LAST_COMMITS | awk ' { print $2 } ')
>>>    git log --pretty=tformat:"$g  %H  %ci%x09%cn%x09%ce%x09%s" --date=iso
>>> --after $(date --date='yesterday' +%Y-%m-%d) > $MY_WORKSPACE/CHANGELOG.PART
>>>
>>>    if [ "x$c" != "x" ] ; then
>>>      git log --pretty=tformat:"$g  %H  %ci%x09%cn%x09%ce%x09%s" $c.. >>
>>> $MY_WORKSPACE/CHANGELOG || true
>>>    else
>>>      cat $MY_WORKSPACE/CHANGELOG.PART >> $MY_WORKSPACE/CHANGELOG
>>>    fi
>>>    popd
>>> done
>>> \rm $MY_WORKSPACE/CHANGELOG.PART
>>>
>>>
>>> for e in $(find . -type d -name .git)
>>> do
>>>    pushd $e/..
>>>    f=$(/usr/bin/dirname $e)
>>>    echo "$f"
>>>    g=`printf "%-48s" $f`
>>>    git log --pretty=tformat:"$g %H" -n 1 >> $MY_WORKSPACE/LAST_COMMITS
>>>    popd
>>> done
>>>
>>> \cp $MY_WORKSPACE/LAST_COMMITS $MY_WORKSPACE/../LAST_COMMITS
>>>
>>>
>>>
>>> On 18-12-20 11:28 AM, Victor Rodriguez wrote:
>>>> On Thu, Dec 20, 2018 at 10:15 AM Scott Little
>>>> <scott.little at windriver.com> wrote:
>>>>> We have been generating a change log for the last few successful builds.
>>>>>
>>>>> e.g.
>>>>>
>>>>> http://mirror.starlingx.cengn.ca/mirror/starlingx/master/centos/20181214T060000Z/outputs/CHANGELOG.txt
>>>>>
>>>> Do you have the link to th escript that generates this ? can we contribute ?
>>>>> Format is
>>>>> - one change per line
>>>>> - tab delimited fields
>>>>> - Fields:
>>>>>      <path to root of git>
>>>>>      <sha>
>>>>>      <commit date>
>>>>>      <author name>
>>>>>      <author email>
>>>>>      <Title>
>>>>>
>>>>> ./cgcs-root/stx/git/distributedcloud              d1e5526d8468b06cc62b81bf2158a565cac94a66  2018-12-12 20:46:58 +0000   Alex Kozyrev    alex.kozyrev at windriver.com      Add Barbican user to the list of subcloud users.
>>>>> ./cgcs-root/stx/stx-config                        9453402511c7858bb1cf52428808b5689a3d95cd  2018-12-13 21:59:38 +0000   Gerrit Code Review      review at openstack.org    Merge "Enhancements for the rbd-provisioner helm chart"
>>>>> ./cgcs-root/stx/stx-config                        e8203ff83e733f4b934f3c6d03c8935386003310  2018-12-13 19:50:26 +0000   Gerrit Code Review      review at openstack.org    Merge "Don't delete nova-ks-endpoint job in nova chart"
>>>>> ./cgcs-root/stx/stx-config                        6b2be98f0ddbbee4c507f01d509d5e42153ee606  2018-12-13 19:13:15 +0000   Irina Mihai     irina.mihai at windriver.com       Enhancements for the rbd-provisioner helm chart
>>>>> ./cgcs-root/stx/stx-config                        2f3e6d9915361c1ca065491418510a7680391023  2018-12-13 10:36:07 -0500   Angie Wang      angie.wang at windriver.com        Don't delete nova-ks-endpoint job in nova chart
>>>>> ./cgcs-root/stx/stx-fault                         41f6f2e675f1a7e07b107296eec1e616b6945461  2018-12-13 18:27:59 +0000   Gerrit Code Review      review at openstack.org    Merge "Standardize install target for fm-common."
>>>>> ./cgcs-root/stx/stx-fault                         f6d95a0a9d367284c491ae74b1f2ec1c3c531309  2018-12-05 15:06:56 -0600   Erich Cordoba   erich.cordoba.malibran at intel.com        Standardize install target for fm-common.
>>>>> ./cgcs-root/stx/stx-integ                         d320036b0be13833bd4dfb8ff9e0f71c1e77473e  2018-12-13 22:52:55 +0000   Gerrit Code Review      review at openstack.org    Merge "fix tpm certificate handling"
>>>>> ./cgcs-root/stx/stx-integ                         14f168ac4b4fdfcb45bdff7e0d82715ec9a2c589  2018-12-13 20:22:44 +0000   Gerrit Code Review      review at openstack.org    Merge "Fix collectd Memory plugin Strict Mode learning"
>>>>> ./cgcs-root/stx/stx-integ                         0ec172537192932c11f7a9cdc799fbc7e49a22e1  2018-12-13 09:31:03 -0500   Eric MacDonald  eric.macdonald at windriver.com    Fix collectd Memory plugin Strict Mode learning
>>>>> ./cgcs-root/stx/stx-integ                         81fded989a237a9b8a3b2998684fd9c0c689f077  2018-12-12 14:48:49 -0500   Paul-Emile Element      Paul-Emile.Element at windriver.com        fix tpm certificate handling
>>>>> ./cgcs-root/stx/stx-nfv                           3ce422d5a2d572b639eba52001444ce3d11a9bec  2018-12-13 21:46:00 +0000   Gerrit Code Review      review at openstack.org    Merge "Allow VIM to manage services independently"
>>>>> ./cgcs-root/stx/stx-nfv                           b6f7a850592cc3ba90b7a00874e3a629fffee26a  2018-12-13 08:08:13 -0500   Kevin Smith     kevin.smith at windriver.com       Allow VIM to manage services independently
>>>>>
>>>>>
>>>>>
>>>>> On 18-12-19 04:31 PM, Young, Ken wrote:
>>>>>> We haven't gotten to this yet but we will.  Let's discuss tomorrow.
>>>>>>
>>>>>> /KenY
>>>>>>
>>>>>> On 2018-12-19, 4:23 PM, "Victor Rodriguez" <vm.rod25 at gmail.com> wrote:
>>>>>>
>>>>>>        Ken
>>>>>>
>>>>>>        Any update on this? Do you still need this script for the CENGN
>>>>>>        release notes/changelog?
>>>>>>
>>>>>>        Can we discuss this topic on tomorrow build meeting?
>>>>>>
>>>>>>        Regards
>>>>>>
>>>>>>        On Thu, Dec 6, 2018 at 10:56 AM Ponce Castaneda, Guillermo A
>>>>>>        <guillermo.a.ponce.castaneda at intel.com> wrote:
>>>>>>        >
>>>>>>        > Hello everybody,
>>>>>>        >
>>>>>>        > I want to share with you the following script that we use internally to create a Change Log everytime we generate a new StarlingX ISO.
>>>>>>        > Here, internally, we have a Jenkins server that creates (or tries to) a new ISO every day, and with this ISO we also create a manifest.xml file, and by using another job that is triggered just as the ISO Job finishes we create the Change Log by using the following script:
>>>>>>        > https://gist.github.com/gaponcec/99f19e2bc972761e11ccba2260622d10
>>>>>>        >
>>>>>>        > The script has the following requirements: Argparse, gitpython, xmljson, dictdiffer and PTable.
>>>>>>        > It requires two parameters, the old manifest.xml and the new one and it should be run like this:
>>>>>>        > $ python3 create_change_log.py-o old_manifest.xml -n new_manifest.xml
>>>>>>        >
>>>>>>        > This will give you the change log on stdout.
>>>>>>        >
>>>>>>        > On our Jenkins script we save a file with this and e-mail it to the team afterwards.
>>>>>>        >
>>>>>>        > Please let me know what you all think about, feedback is really appreciated.
>>>>>>        >
>>>>>>        > - Guillermo Ponce
>>>>>>        >
>>>>>>        > _______________________________________________
>>>>>>        > Starlingx-discuss mailing list
>>>>>>        > Starlingx-discuss at lists.starlingx.io
>>>>>>        > http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Starlingx-discuss mailing list
>>>>>> Starlingx-discuss at lists.starlingx.io
>>>>>> http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss
>>>>>
>>>>> _______________________________________________
>>>>> Starlingx-discuss mailing list
>>>>> Starlingx-discuss at lists.starlingx.io
>>>>> http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss
>>>




More information about the Starlingx-discuss mailing list