Code Monkey home page Code Monkey logo

pipelines-php's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pipelines-php's Issues

Pipeline is missing unit tests

The PHP pipeline docs include instructions on executing unit tests.

I noticed the test step is not present in the azure-pipelines.yml script in this repo. Is this intentional?

I'm trying to get the tests to run properly but I see a mismatch between the phpunit version requested through composer and the one that is actually used to invoke the tests. I opened this as an issue with the documentation.

As noted there, I'm not sure what the "right" answer is, but I'm happy to send a PR if someone can point me in the right direction.

Build artifact containing changes in source branch

Hi,

I am new to Azure DevOps. Followed the documentation to setup a build pipeline. The configuration is;
Framework: Laravel 5.4 (PHP)
Repo: Azure Repo (Git based)
Agent: Self hosted (registered with Azure DevOps and online)
Source branch: master (Trigger is enabled for continuous integration - Shallow depth is set to 1)
My build pipeline contain two tasks. Copy Files to and Publish Artifact.
Current behavior: All of the git repo history is traversed (all branches are pulled as per the log). All of the files are copied from the master branch and published as Artifact. (Approx 8089 files and it took 15 mins to complete the build process)
Desired behavior: Only master branch is pulled and reviewed for changes. Only modified, newly added files should be published as artifact. (On a usual build it would be 4-10 files and shall take 10-20 seconds to publish).
What am I missing? Is there a way to publish the changes on source branch as artifact?
Also, with my older deployment stack, I was able to link up files and folders that are not affected by a build or release and just link them with new release (avoiding the copy paste of these files folders). How do we handle that with Azure DevOps?

Pipeline broken

This pipeline as it is here seems to be broken.

I cloned this repository and tried to run it in an Azure Devops project.

When running it the pipeline throws the following error:

##[warning]An image label with the label Ubuntu 16.04 does not exist.
,##[error]The remote provider was unable to process the request.
Pool: [Azure Pipelines](https://opiniongames.visualstudio.com/31c0df6c-eb00-46d6-b29d-f13c4feb61eb/_settings/agentqueues?poolId=&queueId=155)
Image: Ubuntu 16.04

When I set ubuntu-latest as the vmImage I get following warnings in the Use PHP version 7.2 step:

/usr/bin/bash --noprofile --norc /home/vsts/work/_temp/4289af7e-ed5b-45d3-82f8-67d84ab63e1d.sh
update-alternatives: error: alternative /usr/bin/php7.2 for php not registered; not setting
update-alternatives: error: alternative /usr/bin/phar7.2 for phar not registered; not setting
update-alternatives: error: alternative /usr/bin/phpdbg7.2 for phpdbg not registered; not setting
update-alternatives: error: alternative /usr/bin/php-cgi7.2 for php-cgi not registered; not setting
update-alternatives: error: alternative /usr/bin/phar.phar7.2 for phar.phar not registered; not setting
PHP 8.1.11 (cli) (built: Sep 29 2022 22:28:49) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.11, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.11, Copyright (c), by Zend Technologies
    with Xdebug v3.1.5, Copyright (c) 2002-2022, by Derick Rethans
Finishing: Use PHP version 7.2

It does not use the configured PHP version 7.2 but the default installed one, which is currently PHP 8.1.11.
This seems to be a very recent change, as ubuntu-latest has been working for me up until end of last week (17.11.2022).
Through trial and error I found that Ubuntu 18.04 has php7.2, but then the pipeline fails in the composer install step.

composer install --no-interaction --prefer-dist
========================== Starting Command Output ===========================
/usr/bin/bash --noprofile --norc /home/vsts/work/_temp/a89ccc45-1e79-4747-a1c4-2b4cfebb21c0.sh

In Factory.php line 321:
                                                                               
  "./composer.json" does not match the expected JSON schema:                   
   - name : Does not match the regex pattern ^[a-z0-9]([_.-]?[a-z0-9]+)*/[a-z  
  0-9](([_.]|-{1,2})?[a-z0-9]+)*$                                              
                                                                               

install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-progress] [--no-install] [--audit] [--audit-format AUDIT-FORMAT] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [<packages>...]

##[error]Bash exited with code '1'.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.