Code Monkey home page Code Monkey logo

Comments (19)

antuspenskiy avatar antuspenskiy commented on May 30, 2024 1

hi @quincarter , edbizarro/gitlab-ci-pipeline-php:7.1-alpine image must be fixed with my PR #11 , and sudo package available in image.

from gitlab-ci-pipeline-php.

edbizarro avatar edbizarro commented on May 30, 2024 1

@quincarter please invalidate your cache, the older cache was generated with the image using the root user, and now the user is php

from gitlab-ci-pipeline-php.

edbizarro avatar edbizarro commented on May 30, 2024

Hi @quincarter

I'm changed the user in the images for security reasons, now all images run with the user php, so you need to run your commands in the debian images with sudo. sudo apt get...

from gitlab-ci-pipeline-php.

edbizarro avatar edbizarro commented on May 30, 2024

btw. images already come with node, npm and yarn, u don't need to install these in your pipeline setup

from gitlab-ci-pipeline-php.

quincarter avatar quincarter commented on May 30, 2024

@edbizarro -- i am getting bin/bash: line 55: sudo: command not found in my runner.

Checking out 399e85d8 as feature/mybranch123...
Skipping Git submodules setup
Checking cache for feature/mybranch123...
FATAL: file does not exist                         
Failed to extract cache
$ set -xe
$ sudo apt-get install -y libxml2-dev
++ echo '$ sudo apt-get install -y libxml2-dev'
++ sudo apt-get install -y libxml2-dev
/bin/bash: line 55: sudo: command not found
ERROR: Job failed: exit code 1

from gitlab-ci-pipeline-php.

edbizarro avatar edbizarro commented on May 30, 2024

hi @quincarter

Please try run again

from gitlab-ci-pipeline-php.

quincarter avatar quincarter commented on May 30, 2024

@edbizarro I am still getting the same error.

from gitlab-ci-pipeline-php.

antuspenskiy avatar antuspenskiy commented on May 30, 2024

@edbizarro Hello!
We have error for same reason as above:

apk --update add php7-simplexml php7-fileinfo
ERROR: Unable to lock database: Permission denied
ERROR: Failed to open apk database: Permission denied

I think we need sudo package for alpine images )

from gitlab-ci-pipeline-php.

quincarter avatar quincarter commented on May 30, 2024

@antuspenskiy - yes i agree -- when in the docker config, it needs to have an apt-get update && apt-get install sudo somewhere. Then the runner user needs to be added to the sudoers group. @edbizarro --- this is what needs to happen if it is not already there.

from gitlab-ci-pipeline-php.

edbizarro avatar edbizarro commented on May 30, 2024

hi @quincarter and @antuspenskiy

I added the user php to the sodoers and added sudo package.

screenshot from 2017-09-22 11-27-35

Sry for the problem.

from gitlab-ci-pipeline-php.

quincarter avatar quincarter commented on May 30, 2024

Okay it looks as though the 7.0 image is fixed, but the 7.1 image is not.

edbizarro/gitlab-ci-pipeline-php:7.1-alpine

Can you verify that the sudo command has been added here? Thanks @edbizarro

from gitlab-ci-pipeline-php.

edbizarro avatar edbizarro commented on May 30, 2024

as @antuspenskiy said, the 7.1 images already has sudo

screenshot from 2017-09-22 13-49-05

from gitlab-ci-pipeline-php.

RamonSmit avatar RamonSmit commented on May 30, 2024

Same happened on my pipelines, also got this now:
image

from gitlab-ci-pipeline-php.

edbizarro avatar edbizarro commented on May 30, 2024

@RamonSmit using which tag did this happen?

from gitlab-ci-pipeline-php.

RamonSmit avatar RamonSmit commented on May 30, 2024

@edbizarro edbizarro/gitlab-ci-pipeline-php:7.1 ID=sha256:b9b39a103634cd882f726ff8aeac1a174f5d7c0ab18dc3386717e75d55bcba80

from gitlab-ci-pipeline-php.

edbizarro avatar edbizarro commented on May 30, 2024

@RamonSmit try change your cache folder to ~/.composer/cache

from gitlab-ci-pipeline-php.

quincarter avatar quincarter commented on May 30, 2024

Yeah now our 7.1 image is messing up -----

Running with gitlab-ci-multi-runner 9.4.2 (6d06f2e)
Cloning repository...
Cloning into '/blah'...
Checking out c09e5c3f as feature/fixing-gitlab-ci...
Skipping Git submodules setup
Checking cache for feature/fixing-gitlab-ci...
Successfully extracted cache
/bin/bash: line 6: /somefile.tmp/CI_SERVER_TLS_CA_FILE: Permission denied
/bin/bash: line 6: /somefile.tmp/CI_SERVER_TLS_CA_FILE: Permission denied
ERROR: Job failed: error executing remote command: command terminated with non-zero exit code: Error executing in Docker Container: 1

And the first part of our gitlab-ci.yml looks like this --

image: edbizarro/gitlab-ci-pipeline-php:7.1-alpine

before_script:
  - set -xe
  - sudo apk add --update php7-simplexml

after_script:
  - sudo killall php

stages:
  - setup
  - test

setup:
  type: setup
  script:
    - composer install --quiet --no-interaction
    - sudo cp .env.testing .env
  cache:
    key: ${CI_BUILD_REF_NAME}
    paths:
      - vendor/
  artifacts:
    expire_in: 1 week
    paths:
      - vendor/
      - .env

from gitlab-ci-pipeline-php.

RamonSmit avatar RamonSmit commented on May 30, 2024

@edbizarro ~/.composer/cache solved it for us! Thanks!

from gitlab-ci-pipeline-php.

edbizarro avatar edbizarro commented on May 30, 2024

I'm closing this issue for now, if you have any problem please feel free to open another one.

Thanks

from gitlab-ci-pipeline-php.

Related Issues (20)

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.