0

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 that it is failing on paver update assets.

I have tried to copy the devstack code to my bitbucket repo instead of cloning from git, the problem is Devstack has been updated to Ironwood, but my site is using hawthorn version. I am trying to make the devstack repo hawthorn compatible due to which i am using "hawthorn.master" branch. I have also increased the memory to the most I possibly could.

Also, i saw that cloning was not working well due to which i have set up origin inside the docker environment and then it was fetching all the required files but then it gives the Subprocess return code 1 error. The script in my bitbucket-pipleines.yml is :

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'

The build fails at this 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

Does anyone know the solution to this problem? Please suggest.

rameez.hashmi
  • 29
  • 1
  • 12
  • Could you add the error message before this "Subprocess return code: 1"? I mean the traceback message. – Isanka Wijerathne Sep 04 '19 at 02:11
  • 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 04 '19 at 16:56

0 Answers0