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

Fix the release mechanism #244

Merged
merged 17 commits into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ further defined and clarified by project maintainers.
## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at contact@egi.eu. The project team will
review and investigate all complaints, and will respond in a way that it deems
appropriate to the circumstances. The project team is obligated to maintain
confidentiality with regard to the reporter of an incident. Further details of
specific enforcement policies may be posted separately.
reported by contacting the project team at [contact@egi.eu](mailto:contact@egi.eu).
The project team will review and investigate all complaints, and will respond
in a way that it deems appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an
incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
Expand Down
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
223 changes: 119 additions & 104 deletions .github/workflows/packages.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Create packages and test installation

on:
Expand All @@ -10,150 +11,164 @@ jobs:
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
- name: Build sdist
run: |
pip install tox
python setup.py sdist
- name: Get version
id: version
run: echo "version=$(python setup.py --version)" >> "$GITHUB_OUTPUT"
- name: Upload output file
uses: actions/upload-artifact@v2
with:
name: sdist
path: dist/*tar.gz
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
- name: Build sdist
run: |
pip install tox
python setup.py sdist
- name: Get version
id: version
run: echo "version=$(python setup.py --version)" >> "$GITHUB_OUTPUT"
- name: Upload output file
uses: actions/upload-artifact@v3
with:
name: sdist
path: dist/*tar.gz

centos7:
name: build centos 7 rpms
needs: sdist
runs-on: ubuntu-latest
container: centos:7
steps:
- uses: actions/download-artifact@v2
with:
name: sdist
- name: install build requisites
run: |
yum install -y rpm-build rpmlint
yum install -y centos-release-openstack-queens
yum install -y python-pbr python-setuptools
- name: build rpm
run: |
tar -xzf cloud_info_provider-${{ needs.sdist.outputs.version }}.tar.gz \
--strip-components 1 cloud_info_provider-${{ needs.sdist.outputs.version }}/rpm
sed -i "s/^\(Version.\).*/\\1 ${{ needs.sdist.outputs.version }}/" rpm/cloud-info-provider.spec
sed -i "s/^\(Version.\).*/\\1 ${{ needs.sdist.outputs.version }}/" rpm/cloud-info-provider-opennebula.spec
sed -i "s/^\(Version.\).*/\\1 ${{ needs.sdist.outputs.version }}/" rpm/cloud-info-provider-openstack.spec
mkdir -p {BUILD,RPMS,SOURCES,SPECS,SRPMS}
cp -v cloud_info_provider-${{ needs.sdist.outputs.version }}.tar.gz SOURCES
rpmbuild --define "_topdir $PWD" -ba rpm/cloud-info-provider.spec
rpmbuild --define "_topdir $PWD" -ba rpm/cloud-info-provider-openstack.spec
rpmbuild --define "_topdir $PWD" -ba rpm/cloud-info-provider-opennebula.spec
rpmlint RPMS/noarch/*.rpm
- name: Upload rpms
uses: actions/upload-artifact@v2
with:
name: rpms
path: |
RPMS/noarch/cloud-info-provider-${{ needs.sdist.outputs.version }}-1.el7.noarch.rpm
RPMS/noarch/cloud-info-provider-opennebula-${{ needs.sdist.outputs.version }}-1.el7.noarch.rpm
RPMS/noarch/cloud-info-provider-openstack-${{ needs.sdist.outputs.version }}-1.el7.noarch.rpm
- uses: actions/download-artifact@v3
with:
name: sdist
- name: install build requisites
run: |
yum install -y rpm-build rpmlint
yum install -y centos-release-openstack-queens
yum install -y python-pbr python-setuptools
- name: build rpm
run: |
tar -xzf cloud_info_provider-${{ needs.sdist.outputs.version }}.tar.gz \
--strip-components 1 \
cloud_info_provider-${{ needs.sdist.outputs.version }}/rpm
sed -i "s/^\(Version.\).*/\\1 ${{ needs.sdist.outputs.version }}/" \
rpm/cloud-info-provider.spec
sed -i "s/^\(Version.\).*/\\1 ${{ needs.sdist.outputs.version }}/" \
rpm/cloud-info-provider-opennebula.spec
sed -i "s/^\(Version.\).*/\\1 ${{ needs.sdist.outputs.version }}/" \
rpm/cloud-info-provider-openstack.spec
mkdir -p {BUILD,RPMS,SOURCES,SPECS,SRPMS}
cp -v cloud_info_provider-${{ needs.sdist.outputs.version }}.tar.gz \
SOURCES
for rpm in rpm/cloud-info-provider.spec \
rpm/cloud-info-provider-openstack.spec \
rpm/cloud-info-provider-opennebula.spec; do
rpmbuild --define "_topdir $PWD" -ba "$rpm"
done
rpmlint RPMS/noarch/*.rpm
- name: Upload rpms
uses: actions/upload-artifact@v3
with:
name: rpms
path: |
RPMS/noarch/cloud-info-provider-${{ needs.sdist.outputs.version }}-1.el7.noarch.rpm
RPMS/noarch/cloud-info-provider-opennebula-${{ needs.sdist.outputs.version }}-1.el7.noarch.rpm
RPMS/noarch/cloud-info-provider-openstack-${{ needs.sdist.outputs.version }}-1.el7.noarch.rpm

ubuntu:
name: build debs
needs: sdist
runs-on: ubuntu-latest
container: ubuntu:xenial
steps:
- uses: actions/download-artifact@v2
with:
name: sdist
- name: install build requistes
run: |
apt-get update -q
apt-get install -q -y devscripts debhelper git
apt-get install -q -y python-all-dev python-pbr python-setuptools
- name: build packages
run: |
tar -xzf cloud_info_provider-${{ needs.sdist.outputs.version }}.tar.gz \
- uses: actions/download-artifact@v3
with:
name: sdist
- name: install build requistes
run: |
apt-get update -q
apt-get install -q -y devscripts debhelper git
apt-get install -q -y python-all-dev python-pbr python-setuptools
- name: build packages
run: |
tar -xzf cloud_info_provider-${{ needs.sdist.outputs.version }}.tar.gz \
--strip-components 1
sed -i -e "1s/(.*)/(${{ needs.sdist.outputs.version }}-1)/" debian/changelog
debuild --no-tgz-check clean binary
cd debs/cloud-info-provider-openstack
sed -i -e "1s/(.*)/(${{ needs.sdist.outputs.version }}-1)/" debian/changelog
debuild --no-tgz-check clean binary
cd ../../debs/cloud-info-provider-opennebula
sed -i -e "1s/(.*)/(${{ needs.sdist.outputs.version }}-1)/" debian/changelog
debuild --no-tgz-check clean binary
cd ../..
mv debs/*.deb .
mv ../*.deb .
- name: Upload debs
uses: actions/upload-artifact@v2
with:
name: debs
path: |
python-cloud-info-provider_${{ needs.sdist.outputs.version }}-1_all.deb
python-cloud-info-provider-opennebula_${{ needs.sdist.outputs.version }}-1_all.deb
python-cloud-info-provider-openstack_${{ needs.sdist.outputs.version }}-1_all.deb
sed -i -e "1s/(.*)/(${{ needs.sdist.outputs.version }}-1)/" \
debian/changelog
debuild --no-tgz-check clean binary
cd debs/cloud-info-provider-openstack
sed -i -e "1s/(.*)/(${{ needs.sdist.outputs.version }}-1)/" \
debian/changelog
debuild --no-tgz-check clean binary
cd ../../debs/cloud-info-provider-opennebula
sed -i -e "1s/(.*)/(${{ needs.sdist.outputs.version }}-1)/" \
debian/changelog
debuild --no-tgz-check clean binary
cd ../..
mv debs/*.deb .
mv ../*.deb .
- name: Upload debs
uses: actions/upload-artifact@v3
with:
name: debs
path: |
python-cloud-info-provider_${{ needs.sdist.outputs.version }}-1_all.deb
python-cloud-info-provider-opennebula_${{ needs.sdist.outputs.version }}-1_all.deb
python-cloud-info-provider-openstack_${{ needs.sdist.outputs.version }}-1_all.deb

centos7-install-openstack:
name: install centos 7 rpms (openstack)
needs: centos7
runs-on: ubuntu-latest
container: centos:7
steps:
- uses: actions/download-artifact@v2
with:
name: rpms
- name: install generated rpms
run: |
yum install -y centos-release-openstack-queens
yum localinstall -y cloud-info-provider-openstack-*.rpm cloud-info-provider-[^o]*.rpm
- uses: actions/download-artifact@v3
with:
name: rpms
- name: install generated rpms
run: |
yum install -y centos-release-openstack-queens
yum localinstall -y cloud-info-provider-openstack-*.rpm \
cloud-info-provider-[^o]*.rpm

centos7-install-opennebula:
name: install centos 7 rpms (opennebula)
needs: centos7
runs-on: ubuntu-latest
container: centos:7
steps:
- uses: actions/download-artifact@v2
with:
name: rpms
- name: install generated rpms
run: |
yum install -y epel-release
yum localinstall -y cloud-info-provider-opennebula-*.rpm cloud-info-provider-[^o]*.rpm
- uses: actions/download-artifact@v3
with:
name: rpms
- name: install generated rpms
run: |
yum install -y epel-release
yum localinstall -y cloud-info-provider-opennebula-*.rpm \
cloud-info-provider-[^o]*.rpm

ubuntu-install-openstack:
name: install debs (openstack)
needs: ubuntu
runs-on: ubuntu-latest
container: ubuntu:xenial
steps:
- uses: actions/download-artifact@v2
with:
name: debs
- name: install generated debs
run: |
apt-get update
apt-get install -y ./python-cloud-info-provider_*.deb ./python-cloud-info-provider-openstack_*.deb
- uses: actions/download-artifact@v3
with:
name: debs
- name: install generated debs
run: |
apt-get update
apt-get install -y ./python-cloud-info-provider_*.deb \
./python-cloud-info-provider-openstack_*.deb

ubuntu-install-opennebula:
name: install debs (opennebula)
needs: ubuntu
runs-on: ubuntu-latest
container: ubuntu:xenial
steps:
- uses: actions/download-artifact@v2
with:
name: debs
- name: install generated debs
run: |
apt-get update
apt-get install -y ./python-cloud-info-provider_*.deb ./python-cloud-info-provider-opennebula_*.deb
- uses: actions/download-artifact@v3
with:
name: debs
- name: install generated debs
run: |
apt-get update
apt-get install -y ./python-cloud-info-provider_*.deb \
./python-cloud-info-provider-opennebula_*.deb
Loading
Loading