Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nm-reactor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eduardo Trujillo
nm-reactor
Commits
e2e97d8e
Commit
e2e97d8e
authored
2 years ago
by
Eduardo Trujillo
Browse files
Options
Downloads
Patches
Plain Diff
feat(ci): Add experimental RPM builds
parent
54e0b83a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#322
failed
2 years ago
Stage: format
Stage: build
Stage: lint
Stage: test
Stage: release
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+18
-1
18 additions, 1 deletion
.gitlab-ci.yml
rust-nm-reactor.spec
+78
-0
78 additions, 0 deletions
rust-nm-reactor.spec
with
96 additions
and
1 deletion
.gitlab-ci.yml
+
18
−
1
View file @
e2e97d8e
...
@@ -109,4 +109,21 @@ release:
...
@@ -109,4 +109,21 @@ release:
assets
:
assets
:
links
:
links
:
-
name
:
'
Linux
(amd64)'
-
name
:
'
Linux
(amd64)'
url
:
"
${PACKAGE_REGISTRY_URL}/${LINUX_AMD64_BINARY}"
url
:
"
${PACKAGE_REGISTRY_URL}/${LINUX_AMD64_BINARY}"
\ No newline at end of file
fedora
:
stage
:
release
# rules
:
# - if: '$CI_COMMIT_TAG =~ /^\d+\.\d+\.\d+$/'
needs
:
-
job
:
rust-nightly
image
:
docker.io/library/fedora:37
script
:
-
dnf install -y rust cargo rpm-build rpmdevtools rust-packaging dnf-plugins-core curl
-
rpmdev-setuptree
-
cp ./rust-nm-reactor.spec ~/rpmbuild/SPECS/
-
spectool -g -R ~/rpmbuild/SPECS/rust-nm-reactor.spec
-
dnf builddep -y ~/rpmbuild/SPECS/rust-nm-reactor.spec
-
rpmbuild -ba ~/rpmbuild/SPECS/rust-nm-reactor.spec
-
|
for file in ~/rpmbuild/RPMS/**/*.rpm; curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file ${file} ${PACKAGE_REGISTRY_URL}/$(basename $file); done
This diff is collapsed.
Click to expand it.
rust-nm-reactor.spec
0 → 100644
+
78
−
0
View file @
e2e97d8e
# Initially generated by rust2rpm 23. Manually modified to support building
# using crates not available from crates.io. As a result, this package cannot
# be built offline. It is primarily intended for CI builds.
%bcond_without check
%global crate nm-reactor
Name: rust-nm-reactor
Version: 0.1.1
Release: %autorelease
Summary: NetworkManager reactor
License: BSD-3-Clause
URL: https://gitlab.chromabits.com/etcinit/nm-reactor
Source: https://gitlab.chromabits.com/etcinit/nm-reactor/-/archive/%{version}/nm-reactor-%{version}.tar.gz
BuildRequires: rust-packaging >= 21
BuildRequires: dbus-devel
%global _description %{expand:
NetworkManager reactor. If-this-then-that for NetworkManager.}
%description %{_description}
%package -n %{crate}
Summary: %{summary}
%description -n %{crate} %{_description}
%files -n %{crate}
%license LICENSE
%doc README.md
%{_bindir}/nm-reactor
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
set -eu
%{__mkdir} -p .cargo
cat > .cargo/config << EOF
[build]
rustc = "%{__rustc}"
rustdoc = "%{__rustdoc}"
[env]
CFLAGS = "%{build_cflags}"
CXXFLAGS = "%{build_cxxflags}"
LDFLAGS = "%{build_ldflags}"
[install]
root = "%{buildroot}%{_prefix}"
[term]
verbose = true
[source]
[source.local-registry]
directory = "%{cargo_registry}"
EOF
%{__rm} -f Cargo.lock
%{__rm} -f Cargo.toml.orig
%build
%cargo_build
%install
%cargo_install
%if %{with check}
%check
%cargo_test
%endif
%changelog
%autochangelog
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment