Answers: <p>The author of the Q&amp;A indicated that the issue has been solved since absolute paths were used.</p>
  
Answers: CC BY-SA 4.0
Answers: 2019-12-31T20:09:59.380Z
Answers: 2019-12-31T20:09:59.380Z
Answers: 030
Body: <p>I am trying to set up CI process using bitbucket pipelines for my Openedx site. The script that i am using in my bitbucket-pipelines.yml file is given below. I am trying to just set up the build process on LMS (themes), so that whenever someone make any change in the front end of the site, the build updates paver assets and recompile the assets. The problem is, it is failing on paver update assets giving the error:</p>
  
  <blockquote>
    <p>python manage.py lms --settings=devstack_docker print_setting
    STATIC_ROOT 2>/dev/null Build failed running
    pavelib.assets.update_assets: Subprocess return code: 1</p>
  </blockquote>
  
  <p>Any solution?</p>
  
  <pre><code>image: python:3.5.6 
  definitions:
    services:
      docker:
        memory: 7168
  options:
    size: 2x  # all steps in this repo get 8GB memory
  
  pipelines:
    default:
      - step: 
          services:
            - docker
          script:
            # Upgrade Docker Compose to the latest version test
            - python --version
            - export DOCKER_COMPOSE_VERSION=1.13.0
            - curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
            - chmod +x docker-compose
            - mv docker-compose /usr/local/bin
  
            - export OPENEDX_RELEASE=hawthorn.master
            - git clone https://github.com/sanjaysample/devstack.git
            - cd devstack 
            - git checkout open-release/hawthorn.master
            - make dev.checkout
            - make requirements
            - make dev.clone 
            - ls
            - make pull
            - make dev.up
            - sleep 60 # LMS needs like 60 seconds to come up
            - docker cp ../metronic edx.devstack.lms:/edx/app/edxapp/edx-platform/themes
            - docker cp ../pavelib edx.devstack.lms:/edx/app/edxapp/edx-platform
            - wget https://raw.githubusercontent.com/sumbul03/edx-theme/master/lms.env.json
            - docker cp lms.env.json edx.devstack.lms:/edx/app/edxapp/lms.env.json
            - rm lms.env.json
            - docker cp edx.devstack.lms:/edx/app/edxapp/lms.env.json .
            - cat lms.env.json
            - docker ps
            - docker-compose restart lms
            - docker-compose exec -T lms bash -c 'source /edx/app/edxapp/edxapp_env && cd /edx/app/edxapp/edx-platform && git init && git remote add origin https://github.com/edx/edx-platform.git && git fetch origin open-release/hawthorn.master && git checkout -f open-release/hawthorn.master && paver install_prereqs && paver update_assets lms --settings=devstack_docker --debug || true'</code></pre>
  
Comments: CC BY-SA 4.0
Comments: 2019-09-03T21:14:11.903Z
Comments: What have you tried thus far? Have you tried running docker-compose locally, and if so, are you running into the same error?
Comments: Preston Martin
Comments: CC BY-SA 4.0
Comments: 2019-09-04T16:53:50.917Z
Comments: Hi, thanks for replying. This issue is now solved by making changes in docker-compose.yml file. It was not fetching from the right directory so I just provided the absolute paths in the file and somehow it worked. 
  
  Now the next problem is, i am updating the lms assets using  "make lms-static" command. It is updating my custom theme's assets but when i am inserting some syntax error in .css file of my custom theme, it is not failing the build. Do you know if pipelines fail on syntax error or not?
Comments: Sumbul Rafiq
Comments: CC BY-SA 4.0
Comments: 2019-12-31T18:20:47.243Z
Comments: Could you post an answer?
Comments: 030
Tags: <docker><continuous-integration><docker-compose><bitbucket-pipelines>
Title: Continuous integration using bitbucket pipelines failed for OpenEdx
UserDisplayName: Sumbul Rafiq
ThreadText: # Continuous integration using bitbucket pipelines failed for OpenEdx
  
  (Asked by: username_0 on 2019-09-03)
  
  I am trying to set up CI process using bitbucket pipelines for my Openedx site. The script that i am using in my bitbucket-pipelines.yml file is given below. I am trying to just set up the build process on LMS (themes), so that whenever someone make any change in the front end of the site, the build updates paver assets and recompile the assets. The problem is, it is failing on paver update assets giving the error:
  
  > python manage.py lms --settings=devstack\_docker print\_setting
  > STATIC\_ROOT 2>/dev/null Build failed running
  > pavelib.assets.update\_assets: Subprocess return code: 1
  
  Any solution?
  
  ```
  image: python:3.5.6 
  definitions:
    services:
      docker:
        memory: 7168
  options:
    size: 2x  # all steps in this repo get 8GB memory
  
  pipelines:
    default:
      - step: 
          services:
            - docker
          script:
            # Upgrade Docker Compose to the latest version test
            - python --version
            - export DOCKER_COMPOSE_VERSION=1.13.0
            - curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
            - chmod +x docker-compose
            - mv docker-compose /usr/local/bin
  
            - export OPENEDX_RELEASE=hawthorn.master
            - git clone https://github.com/sanjaysample/devstack.git
            - cd devstack 
            - git checkout open-release/hawthorn.master
            - make dev.checkout
            - make requirements
            - make dev.clone 
            - ls
            - make pull
            - make dev.up
            - sleep 60 # LMS needs like 60 seconds to come up
            - docker cp ../metronic edx.devstack.lms:/edx/app/edxapp/edx-platform/themes
            - docker cp ../pavelib edx.devstack.lms:/edx/app/edxapp/edx-platform
            - wget https://raw.githubusercontent.com/sumbul03/edx-theme/master/lms.env.json
            - docker cp lms.env.json edx.devstack.lms:/edx/app/edxapp/lms.env.json
            - rm lms.env.json
            - docker cp edx.devstack.lms:/edx/app/edxapp/lms.env.json .
            - cat lms.env.json
            - docker ps
            - docker-compose restart lms
            - docker-compose exec -T lms bash -c 'source /edx/app/edxapp/edxapp_env && cd /edx/app/edxapp/edx-platform && git init && git remote add origin https://github.com/edx/edx-platform.git && git fetch origin open-release/hawthorn.master && git checkout -f open-release/hawthorn.master && paver install_prereqs && paver update_assets lms --settings=devstack_docker --debug || true'
  ```
  
  **Tags:** docker, continuous-integration, docker-compose, bitbucket-pipelines
  
  > **Comments:**
  > **username_1**: What have you tried thus far? Have you tried running docker-compose locally, and if so, are you running into the same error?  
  > **username_0**: Hi, thanks for replying. This issue is now solved by making changes in docker-compose.yml file. It was not fetching from the right directory so I just provided the absolute paths in the file and somehow it worked.   Now the next problem is, i am updating the lms assets using  "make lms-static" command. It is updating my custom theme's assets but when i am inserting some syntax error in .css file of my custom theme, it is not failing the build. Do you know if pipelines fail on syntax error or not?  
  > **username_2**: Could you post an answer?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2019-12-31. Score: 1
  
  The author of the Q&A indicated that the issue has been solved since absolute paths were used.
  
  
  ---
  
  