If you are not sure about using Software Factory, here are some perks that might convince you:
As of now, Gerrit is mandatory in Software Factory for a couple of reasons:
Gerrit will be made optional in a future release  of Software Factory
Note: that it is possible to use Software Factory as a third party CI for an external Gerrit or a GitHub organization. In this case, the gerrit server is only used to host the config repository, and operators can bypass it entirely by pushing config repository changes with the “git push” command instead of “git review”.
This may happen because of web browser cache issues. Remove all cookies then log out and log in again to refresh your gerrit privileges.
This error happens when zuul can’t build a job. Most of the time it’s because:
This happens when no worker nodes are available to execute a build:
You can change the hostname after the deployment by changing the fqdn parameter in /etc/software-factory/sfconfig.yaml, removing the existing SSL certificates (only required if running functional tests and using the default self-signed certificates) and running sfconfig again:
sed -i -e 's/fqdn:.*/fqdn: mynewhostname.com/g' /etc/software-factory/sfconfig.yaml
note: that you might need to update URLs in other places as well, for example git remote urls in .gitreview and .git/config files for repositories hosted on Software Factory.
The mirror service uses the mirror2swift utility to provide a local cache for external ressources. For example we use it to mirror RPM repositories, which speeds up building times of our test environments.
To enable the mirror service, you need to configure a swift container in sfconfig.yaml and then specify the URL to mirror in the config-repo:
Add the mirror role to /etc/software-factory/arch.yaml
Configure the mirror role in /etc/software-factory/sfconfig.yaml
Edit the mirror configuration template provided in the mirrors directory of the config repository.
When periodic_update is set, the mirror will be updated periodically through a dedicated zuul pipeline. The status of the update can be checked like any other CI build. Otherwise, to update the cache manually, this command needs to be executed:
sudo -u mirror2swift mirror2swift /var/lib/mirror2swift/config.yaml
periodic_update: '0 0 * * *'
The swift_mirror_url needs to be the canonical, fully qualified url of the target container. The swift_mirror_tempurl_key needs to be a tempurl key with writing rights. The periodic_update needs to be a valid zuul timer format, e.g. daily is ‘0 0 * * *’.
The yaml files in the config repository represent the list of mirrors as documented here:
https://github.com/cschwede/mirror2swift. For example, config/mirrors/centos.yaml:
- name: os
When the config-update job fails, you can manually restart the job using the command bellow. Make sure to set the ref-sha which is the last commit hash of the config repository.
zuul enqueue-ref --trigger gerrit --tenant local --pipeline post --project config --ref master --newrev ref-sha
The job will be running in the post pipeline of the Zuul status page.
The Gerrit REST API is open for queries by default on all Software Factory deployments.
There is an extensive documentation available online:
The Gerrit API is available at the https://fqdn/r/ endpoint for non authenticated requests and for authenticated requests it is https://fqdn/r/a/.
To use the authenticated endpoint you have to create an API password first. To do so, go to the User Settings page (upper right corner on the top menu) and click on the button Generate new API key.
getting open changed with cURL would be:
And to access a restricted resources with cURL would be:
curl -u username:apikey https://fqdn/r/a/accounts/self/password.http
After getting a Gerrit API key (as explained in), use the basic auth-type in gertty.yaml,
- name: sftests
Gerrit Related Tutorials
|Python Tutorial||Web Services Tutorial|
|HTML 5 Tutorial||Adv Java Tutorial|
|Git (software) Tutorial||Jenkins Tutorial|
Gerrit Related Interview Questions
|Python Interview Questions||Web Services Interview Questions|
|HTML 5 Interview Questions||Adv Java Interview Questions|
|Git (software) Interview Questions||Jenkins Interview Questions|
|OpenVZ Interview Questions||Advanced C++ Interview Questions|
|Java 9 Interview Questions|
All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.