Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean and lean example of testing moodle plugin with bitbucket pipelines #215

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

kiklop74
Copy link
Contributor

This is as barebone as I could make it. Also reflects latest changes in the pipelines as well.

Copy link
Contributor

@jrchamp jrchamp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know much about bitbucket, but I saw a couple items that I hope are helpful!

mkdir -p /usr/share/man/man1 /usr/share/man/man3 /usr/share/man/man7 &&
apt-get -q update && apt-get -yq install default-jre-headless mariadb-client &&
curl -sS https://raw.githubusercontent.com/creationix/nvm/v0.39.3/install.sh | bash &&
. ~/.bashrc && nvm install --default --latest-npm lts/gallium &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use the version of nvm from the .nvmrc file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You misunderstood this. Everything in the setupdeps part is executed before anything is installed and just caches a nodejs version used in several most recent versions of moodle. During the execution of moodle-plugin-ci install the tool itself will check and install what is specified in .nvmrc.

export MOODLE_BEHAT_WWWROOT="http://$BITBUCKET_DOCKER_HOST_INTERNAL:8000" ;
export MOODLE_BEHAT_WDHOST="http://$BITBUCKET_DOCKER_HOST_INTERNAL:4444/wd/hub" ;
export MOODLE_REPO='https://bitbucket.org/moodle/moodle.git' ;
export MOODLE_BRANCH='MOODLE_311_STABLE' ;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this going to cause a problem for the Moodle 4.0 test? Or should it be moved to the Moodle 3.11 test?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are only the defaults. If nothing specific is set in moodle-plugin-ci install these are the default values used. However, anything specified in moodle-plugin-ci install command line overrides any ENV variable.

@kiklop74
Copy link
Contributor Author

Linking with issue #125

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants