1

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'
  • What have you tried thus far? Have you tried running docker-compose locally, and if so, are you running into the same error? – PrestonM Sep 3 '19 at 21:14
  • 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? – Sumbul Rafiq Sep 4 '19 at 16:53
  • Could you post an answer? – 030 Dec 31 '19 at 18:20
1

The author of the Q&A indicated that the issue has been solved since absolute paths were used.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.