Skip to content
This repository was archived by the owner on Feb 9, 2022. It is now read-only.

Introduce ovirt-engine-repositories role #1

Merged
merged 2 commits into from
Dec 11, 2017

Conversation

KKoukiou
Copy link
Contributor

@KKoukiou KKoukiou commented Dec 8, 2017

No description provided.

@KKoukiou
Copy link
Contributor Author

KKoukiou commented Dec 8, 2017

@mwperina @machacekondra Just moved all files from other repo, and added the rpm related scripts (just copied the from vm-infra making changes where necessary)/

@KKoukiou
Copy link
Contributor Author

KKoukiou commented Dec 8, 2017

Also can somebody with appropriate permissions enable the Travis CI for this repository?

@machacekondra
Copy link
Contributor

ci build please

@machacekondra
Copy link
Contributor

I've setup everything. Also in engine-setup repo. CI will start to work, once this patch is merged:

https://gerrit.ovirt.org/#/c/85203/

@KKoukiou
Copy link
Contributor Author

KKoukiou commented Dec 8, 2017

@machacekondra Super, thanks!

build.sh Outdated
@@ -0,0 +1,53 @@
#!/bin/bash

VERSION="1.0.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

VERSION="1.1.0"

build.sh Outdated
#!/bin/bash

VERSION="1.0.0"
MILESTONE=
Copy link
Contributor

Choose a reason for hiding this comment

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

MILESTONE=master

build.sh Outdated

VERSION="1.0.0"
MILESTONE=
RPM_RELEASE="1"
Copy link
Contributor

Choose a reason for hiding this comment

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

RPM_RELEASE="0.1.$MILESTONE.$(date -u +%Y%m%d%H%M%S)"

build.sh Outdated
-e "s|@PACKAGE_VERSION@|$PACKAGE_VERSION|g" \
< ovirt-ansible-repositories.spec.in > ovirt-ansible-repositories.spec

git ls-files | tar --files-from /proc/self/fd/0 -czf "$TARBALL" ovirt-ansible-vm-infra.spec
Copy link
Contributor

Choose a reason for hiding this comment

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

git ls-files | tar --files-from /proc/self/fd/0 -czf "$TARBALL" ovirt-ansible-repositories.spec

%global ansible_roles_dir ansible/roles

Name: @PACKAGE_NAME@
Summary: Ansible role to create virtual machine infrastructure
Copy link
Contributor

Choose a reason for hiding this comment

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

Summary: Ansible role to setup oVirt/RHV repositories

Requires: ansible >= 2.4

%description
This Ansible role is used to set the repositories required for
Copy link
Contributor

Choose a reason for hiding this comment

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

s/set/set up/

seems better for me, but I am not sure.

This Ansible role is used to set the repositories required for
oVirt engine or host installation.

%pretrans -p <lua>
Copy link
Contributor

Choose a reason for hiding this comment

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

You can remove this %pretrans, it was used only for roles which existed in 4.1

@machacekondra
Copy link
Contributor

Thanks for contributing automation files 👍

build.sh Outdated
ln -f -s $PKG_DATA_DIR_ORIG $ROLENAME_LEGACY

cp -pR defaults/ $PKG_DATA_DIR
cp -pR library/ $PKG_DATA_DIR
Copy link
Contributor

Choose a reason for hiding this comment

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

you can remove this line

@KKoukiou
Copy link
Contributor Author

@mwperina @machacekondra Anything else I could change here? If not let's proceed with merging this one because tests for oVirt/ovirt-ansible-engine-setup#1 are depending on this role.

@ovirt-infra
Copy link

Hello contributor, thanks for submitting a PR for an this project!

I am the bot who triggers "standard-CI" builds for this project.
As a security measure I will not run automated tests on PRs that are not from white-listed contributors.

In order to allow automated tests to run, please ask one of the project maintainers to review the code and then do one of the following:

  1. Type ci test please on this PR to trigger automated tests for it.
  2. Type ci add to whitelist on this PR to trigger automated tests for it and also add you to the contributor white-list so that your future PRs will be tested automatically.
  3. If you are planning to contribute to more than one project, maybe it's better to ask them to add you to the project organization, so you'll be able to run tests for all the organisation's projects.

Note: You might see multiple messages like this showing up on a single PR, this is due to a known bug in the GitHub trigger plugin on Jenkins, the infra team is working on fixing this via new testing flow in the near future, so we'll be able to post a single message per PR.

@ovirt-infra
Copy link

Some tests failed

@machacekondra
Copy link
Contributor

ci add to whitelist

@machacekondra
Copy link
Contributor

ci build please

@ovirt-infra
Copy link

Some tests failed

1 similar comment
@ovirt-infra
Copy link

Some tests failed

@machacekondra
Copy link
Contributor

ci add to whitelist

@machacekondra
Copy link
Contributor

ci build please

@machacekondra
Copy link
Contributor

@mwperina Do we want to create legacy symlink for newly created roles? Or are we ok with name just oVirt.repositories?

@mwperina
Copy link
Member

No, new roles (unreleased in oVirt 4.1.z) should have only the new name, ie oVirt.repositories

This Ansible role is used to set up the repositories required for
oVirt engine or host installation.

-- Remove the legacy directory before installing the symlink. This is known issue in RPM:
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove lines 22-28

build.sh Outdated
PKG_DATA_DIR=${PKG_DATA_DIR:-$ROLES_DATAROOT_DIR/$PACKAGE_NAME}
PKG_DATA_DIR_ORIG=${PKG_DATA_DIR_ORIG:-$PKG_DATA_DIR}
PKG_DOC_DIR=${PKG_DOC_DIR:-$DOC_DIR/$PACKAGE_NAME}
ROLENAME_LEGACY="${ROLENAME_LEGACY:-$ROLES_DATAROOT_DIR/ovirt-repositories}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove this line.

build.sh Outdated
mkdir -p $PKG_DOC_DIR

# Create a symlink, so legacy role name does work:
ln -f -s $PKG_DATA_DIR_ORIG $ROLENAME_LEGACY
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove line 43 and 44.

@@ -0,0 +1,53 @@
%global rolename repositories
%global roleprefix oVirt.
%global roleprefix_legacy ovirt-
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove this line.

export PKG_DATA_DIR_ORIG=%{_datadir}/%{ansible_roles_dir}/%{roleprefix}%{rolename}
export PKG_DATA_DIR=%{buildroot}$PKG_DATA_DIR_ORIG
export PKG_DOC_DIR=%{buildroot}%{_pkgdocdir}
export ROLENAME_LEGACY=%{buildroot}%{_datadir}/%{ansible_roles_dir}/%{roleprefix_legacy}%{rolename}
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove this line.


%files
%{_datadir}/%{ansible_roles_dir}/%{roleprefix}%{rolename}
%{_datadir}/%{ansible_roles_dir}/%{roleprefix_legacy}%{rolename}
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove this line.

@ifireball
Copy link

ci test please

@machacekondra
Copy link
Contributor

ci buid please

@machacekondra machacekondra merged commit 83c8135 into oVirt:master Dec 11, 2017
@KKoukiou
Copy link
Contributor Author

Thanks for quick reviews!

@KKoukiou KKoukiou deleted the initial-commit branch December 11, 2017 13:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants