Added Fedora package (this will most likely fail but meh).

This commit is contained in:
Toastie 2025-03-27 15:02:01 +13:00
parent c569c64abc
commit 6a5be484a0
Signed by: toastie_t0ast
GPG key ID: 74226CF45EEE5AAF
2 changed files with 71 additions and 18 deletions

87
Jenkinsfile vendored
View file

@ -43,18 +43,12 @@ pipeline
dockerfile { filename 'packaging/RHEL9.Dockerfile' }
}
environment { DOTNET_CLI_HOME = "/tmp/.dotnet" }
when
{
expression
{
return env.BRANCH_NAME == 'main' || env.BRANCH_NAME == 'beta' || env.BRANCH_NAME == 'jenkins-testing';
}
}
steps
{
sh 'rpmbuild -bb packaging/supportchild.spec --define "_topdir $PWD/.rpmbuild-el9" --define "dev_build true"'
sh 'cp .rpmbuild-el9/RPMS/x86_64/supportchild-dev-*.el9.x86_64.rpm linux-x64/'
archiveArtifacts(artifacts: 'linux-x64/supportchild-dev-*.el9.x86_64.rpm', caseSensitive: true)
sh 'cp .rpmbuild-el9/RPMS/x86_64/supportchild-dev-*.x86_64.rpm linux-x64/'
archiveArtifacts(artifacts: 'linux-x64/supportchild-dev-*.x86_64.rpm', caseSensitive: true)
stash includes: 'linux-x64/supportchild-dev-*.x86_64.rpm', name: 'el9-rpm'
}
}
stage('RHEL8')
@ -64,18 +58,75 @@ pipeline
dockerfile { filename 'packaging/RHEL8.Dockerfile' }
}
environment { DOTNET_CLI_HOME = "/tmp/.dotnet" }
when
{
expression
{
return env.BRANCH_NAME == 'main' || env.BRANCH_NAME == 'beta' || env.BRANCH_NAME == 'jenkins-testing';
}
}
steps
{
sh 'rpmbuild -bb packaging/supportchild.spec --define "_topdir $PWD/.rpmbuild-el8" --define "dev_build true"'
sh 'cp .rpmbuild-el8/RPMS/x86_64/supportchild-dev-*.el8.x86_64.rpm linux-x64/'
archiveArtifacts(artifacts: 'linux-x64/supportchild-dev-*.el8.x86_64.rpm', caseSensitive: true)
sh 'cp .rpmbuild-el8/RPMS/x86_64/supportchild-dev-*.x86_64.rpm linux-x64/'
archiveArtifacts(artifacts: 'linux-x64/supportchild-dev-*.x86_64.rpm', caseSensitive: true)
stash includes: 'linux-x64/supportchild-dev-*.x86_64.rpm', name: 'el8-rpm'
}
}
stage('Fedora')
{
agent
{
dockerfile { filename 'packaging/Fedora.Dockerfile' }
}
environment { DOTNET_CLI_HOME = "/tmp/.dotnet" }
steps
{
sh 'rpmbuild -bb packaging/supportchild.spec --define "_topdir $PWD/.rpmbuild-fedora" --define "dev_build true"'
sh 'cp .rpmbuild-fedora/RPMS/x86_64/supportchild-dev-*.x86_64.rpm linux-x64/'
archiveArtifacts(artifacts: 'linux-x64/supportchild-dev-*.x86_64.rpm', caseSensitive: true)
stash includes: 'linux-x64/supportchild-dev-*.x86_64.rpm', name: 'fedora-rpm'
}
}
}
}
stage('Deploy')
{
parallel
{
stage('RHEL9')
{
when
{
expression { return env.BRANCH_NAME == 'main' || env.BRANCH_NAME == 'beta'; }
}
steps
{
unstash name: 'el9-rpm'
sh 'mkdir -p /usr/share/nginx/repo.toastiet0ast.com/rhel/el9/packages/supportchild/'
sh 'cp linux-x64/supportchild-dev-*.x86_64.rpm /usr/share/nginx/repo.toastiet0ast.com/rhel/el9/packages/supportchild/'
sh 'createrepo_c --update /usr/share/nginx/repo.toastiet0ast.com/rhel/el9'
}
}
stage('RHEL8')
{
when
{
expression { return env.BRANCH_NAME == 'main' || env.BRANCH_NAME == 'beta'; }
}
steps
{
unstash name: 'el8-rpm'
sh 'mkdir -p /usr/share/nginx/repo.toastiet0ast.com/rhel/el8/packages/supportchild/'
sh 'cp linux-x64/supportchild-dev-*.x86_64.rpm /usr/share/nginx/repo.toastiet0ast.com/rhel/el8/packages/supportchild/'
sh 'createrepo_c --update /usr/share/nginx/repo.toastiet0ast.com/rhel/el8'
}
}
stage('Fedora')
{
when
{
expression { return env.BRANCH_NAME == 'main' || env.BRANCH_NAME == 'beta'; }
}
steps
{
unstash name: 'fedora-rpm'
sh 'mkdir -p /usr/share/nginx/repo.toastiet0ast.com/fedora/packages/supportchild/'
sh 'cp linux-x64/supportchild-dev-*.x86_64.rpm /usr/share/nginx/repo.toastiet0ast.com/fedora/packages/supportchild/'
sh 'createrepo_c --update /usr/share/nginx/repo.toastiet0ast.com/fedora'
}
}
}

View file

@ -0,0 +1,2 @@
FROM fedora:latest
RUN dnf install dotnet-sdk-9.0 rpm-build git -y