Changeset 2079 in ProjectBuilder


Ignore:
Timestamp:
Apr 28, 2016, 8:05:40 PM (5 years ago)
Author:
Bruno Cornec
Message:

Add support for pbr for python project such as python-redfish
Update demo
More API tests added

Location:
devel
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • devel/pb-doc/pb-demo

    r2006 r2079  
    5757# Mount the external HDD if needed
    5858sudo mount /dev/sdc1 /mnt
    59 $ sudo mount -o bind /run/media/bruno/pb+docker/docker /var/cache/docker
     59$ sudo mount -o bind /mnt/docker /var/cache/docker
    6060# Then restart docker to avoid errors with Attempt to write a readonly database
    6161$ sudo systemctl restart docker
  • devel/pb-modules/etc/pb.conf.pod

    r2032 r2079  
    560560 Example: pbpassphrase pb = TheSecretPassPhrase
    561561
     562=item B<pbpbr>
     563
     564 Nature: Optional
     565 Key: project (as defined in the -p option or PBPROJ environment variable)
     566 Value: whatever. As soon as this is defined, then that project is known as using pbr for source epansion.
     567 Conffile: project
     568 Example: pbpbr python-redfish = 1
     569
    562570=item B<pbprojdir>
    563571
  • devel/pb-modules/lib/ProjectBuilder/VCS.pm

    r2032 r2079  
    206206            }
    207207            $source = pb_vcs_mod_htftp($source,"git");
    208             pb_system("cd $source ; stid=`$vcscmd stash create` ; $vcscmd archive --format=tar \$\{stid:=HEAD\} | (mkdir $tmp && cd $tmp && tar xf -)","Exporting current $source from GIT to $tmp ");
     208            my ($pbpbr) = pb_conf_get_if("pbpbr");
     209            if ((defined $pbpbr) && (defined $pbpbr->{$ENV{'PBPROJ'}})) {
     210                # The project use pbr so benefit from it to export data
     211                pb_system("cd $source ; mkdir $tmp ; python setup.py sdist --keep-temp --dist-dir $tmp ; cd $tmp ; file=`ls *.tar.gz` ; tar xfz \$file ; dir=`tar tvfz \$file | head -1 | awk '{print \$6}'` ; if [ ! -d \$dir ] || [ \$dir = / ]; then exit -1 ; fi ; mv \$dir/* \$dir/.??* . ; rmdir \$dir ; rm -f \$file ; ls -al ","Exporting current $source from GIT with pbr to $tmp ");
     212            } else {
     213                # no pbr do it ourselves
     214                pb_system("cd $source ; stid=`$vcscmd stash create` ; $vcscmd archive --format=tar \$\{stid:=HEAD\} | (mkdir $tmp && cd $tmp && tar xf -)","Exporting current $source from GIT to $tmp ");
     215            }
    209216        } else {
    210217            $uri = pb_vcs_mod_htftp($uri,"git");
  • devel/pb-server/api.json

    r2077 r2079  
    88  "basePath": "/v1",
    99  "paths": {
     10    "/prj": {
     11      "get": {
     12        "operationId": "listPrj",
     13        "parameters": [],
     14        "responses": {
     15          "200": {
     16            "description": "Success",
     17            "schema": {
     18              "type": "array",
     19              "items": { "$ref": "#/definitions/Entry" }
     20            }
     21          },
     22          "default": {
     23            "description": "Error.",
     24            "schema": { "$ref": "http://git.io/vcKD4#" }
     25          }
     26        }
     27      }
     28    }   
    1029    "/conf": {
    1130      "get": {
     
    94113      "required": true,
    95114      "type": "integer",
    96       "description": "A blog id"
     115      "description": "A conf id"
    97116    }
    98117  },
Note: See TracChangeset for help on using the changeset viewer.