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

Add support for Gitlab CI #3149

Merged
merged 14 commits into from
Oct 16, 2019
Merged

Add support for Gitlab CI #3149

merged 14 commits into from
Oct 16, 2019

Conversation

codablock
Copy link

@codablock codablock commented Oct 11, 2019

This PR adds a .gitlab-ci.yml file which mirror what we currently do on Travis. The advantage with Gitlab CI is that we don't really need to handle the "build in docker" stuff that we were doing in Travis, as Gitlab naturally executes all jobs in self-specified Docker images.

The mirrored Gitlab repository is here: https://gitlab.com/dashpay/dash
The build won't be triggered for now as .gitlab-ci.yml is missing from the develop branch atm. But you can see example pipelines in my private repo: https://gitlab.com/codablock/dash/pipelines which are building my private dash repo.

I used ablock/dash-gitlabci-builder as base image for jobs. This image simply has all the needed apt packages preinstalled to speed up the build. The Github repo for this image is here and automated builds are set up. I can later move this image to the dashpay organization if requested.

The .gitlab-ci.yml currently misses the automated Docker build for dashpay/dashd-develop, as I didn't want to interfere with the main build. I'll add this later when/if we decide to move to Gitlab.

@codablock codablock force-pushed the pr_gitlabci branch 3 times, most recently from 2c9768a to f7395cc Compare October 13, 2019 15:19
@codablock codablock changed the title [WIP] Testing Gitlab CI Add support for Gitlab CI Oct 13, 2019
@codablock
Copy link
Author

PR is ready for review

@codablock codablock force-pushed the pr_gitlabci branch 6 times, most recently from 026cfe5 to 74a108b Compare October 14, 2019 06:13
@codablock
Copy link
Author

Current test build is running here: https://gitlab.com/codablock/dash/pipelines/88568571
I assume that the build will fail due to tests failing with an unrelated reason. I've observed this before but was unable to debug what happened because logs get too large when the test_runner prints all the debug.log's. My solution is to disable printing of logs and instead upload logs as artifacts.

Changes done since initial PR:

  1. Use ubuntu:bionic as base image instead of the custom one
  2. Cache apt packages
  3. Collect test logs and put them into the build artifact. Also use combine_logs.py to create combined logs

@codablock
Copy link
Author

Building/Testing on Gitlab CI revealed issues with test nodes stopping behavior which required to backport a few PRs. I'll create a new PR for these backports later and will then remove the commits from this PR after the backports got merged.

@codablock
Copy link
Author

First green build: https://gitlab.com/codablock/dash/pipelines/88676598 :)

@UdjinM6 UdjinM6 added this to the 14.1 milestone Oct 15, 2019
The first dumpwallet is quite slow sometimes, which then makes the
later called dumpwallet throw a wallet locked exception.
@codablock
Copy link
Author

Rebased, removed commits related to #3153 and force pushed. New build is running here: https://gitlab.com/codablock/dash/pipelines/89066282

@codablock
Copy link
Author

Test failures on Travis are unrelated and fixed by #3157

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

👍
utACK

@codablock codablock merged commit 24fee30 into dashpay:develop Oct 16, 2019
@codablock codablock deleted the pr_gitlabci branch October 16, 2019 09:48
@codablock
Copy link
Author

First build for the official Gitlab dash repo and develop is running here: https://gitlab.com/dashpay/dash/pipelines/89163738
This one is using AWS gitlab-runners, so it should be faster then the previous builds.

barrystyle pushed a commit to PACGlobalOfficial/PAC that referenced this pull request Jan 22, 2020
* Add .gitlab-ci.yml

* Use | instead of > for multiline commands

This honor new-lines and makes ; unnecessary

* Use ubuntu:bionic as base image

* Move cache initialization before apt-get installs

* Cache apt packages

* Move installation of wget and unzip up as we need it for the cache

* Prevent apt from deleting caches

* Collect test logs into artifact

* Make combine_logs.py always look for the template in the correct dir

* Move final cache stuff into after_script

* Reintroduce PYTHON_DEBUG=1, but only for .travis.yml

* Install jinja2 in Travis builder image

* Enable ChainLocks after quorums have been created

Creating 4 quorums causes a lot of blocks to be created and signed by
ChainLocks, which then causes timeouts later.

* Increase timeout in wallet-dump.py test

The first dumpwallet is quite slow sometimes, which then makes the
later called dumpwallet throw a wallet locked exception.
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