Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
5,183 changes: 5,183 additions & 0 deletions THIRD_PARTY_LICENSES.txt

Large diffs are not rendered by default.

54 changes: 54 additions & 0 deletions buildrpm/coredns-container-image.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@

%if 0%{?with_debug}
# https://bugzilla.redhat.com/show_bug.cgi?id=995136#c12
%global _dwz_low_mem_die_limit 0
%else
%global debug_package %{nil}
%endif

%{!?registry: %global registry container-registry.oracle.com/olcne}

%global _buildhost build-ol%{?oraclelinux}-%{?_arch}.oracle.com
%global _name coredns

Name: %{_name}-container-image
Version: 1.12.2
Release: 1%{?dist}
Summary: DNS and Service Discovery
License: Apache-2.0
Group: System/Management
Url: https://github.com/coredns/coredns
Source: %{name}-%{version}.tar.bz2
Vendor: Oracle America

%description
CoreDNS is a DNS server.
It can be used in a multitude of environments because of its flexibility.
CoreDNS chains plugins. Each plugin performs a DNS function, such as
Kubernetes service discovery, Prometheus metrics or rewriting queries.
And many more.

%prep
%setup -q -n %{name}-%{version}

%build
%global rpm_name %{_name}-%{version}-%{release}.%{_build_arch}
yum clean all && yumdownloader --destdir=${PWD}/rpms %{rpm_name}

%__rm .dockerignore
%global docker_tag %{registry}/%{_name}:v%{version}
docker build --pull=never --squash \
--build-arg https_proxy=${https_proxy} \
-t %{docker_tag} -f ./olm/builds/Dockerfile .
docker save -o %{_name}.tar %{docker_tag}

%install
%__install -D -m 644 %{_name}.tar %{buildroot}/usr/local/share/olcne/%{_name}.tar

%files
%license LICENSE
/usr/local/share/olcne/%{_name}.tar

%changelog
* Fri Sep 19 2025 Olcne-Builder Jenkins <[email protected]> - 1.12.2-1
- Added Oracle specific build files
59 changes: 59 additions & 0 deletions buildrpm/coredns.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@

%global with_debug 0

%if 0%{?with_debug}
# https://bugzilla.redhat.com/show_bug.cgi?id=995136#c12
%global _dwz_low_mem_die_limit 0
%else
%global debug_package %{nil}
%endif

%global build_dir src/github.com/coredns/coredns
%global _buildhost build-ol%{?oraclelinux}-%{?_arch}.oracle.com

Name: coredns
Version: 1.12.2
Release: 1%{?dist}
Summary: DNS and Service Discovery
License: Apache-2.0
Group: System/Management
Url: https://github.com/coredns/coredns
Source: %{name}-%{version}.tar.bz2
Vendor: Oracle America
BuildRequires: golang
BuildRequires: jq

%description
CoreDNS is a DNS server.
It can be used in a multitude of environments because of its flexibility.
CoreDNS chains plugins. Each plugin performs a DNS function, such as
Kubernetes service discovery, Prometheus metrics or rewriting queries.
And many more.

%prep
%setup -q -n coredns-%{version}
mkdir -p %{build_dir}
mv $(ls | grep -v "^src$") %{build_dir}
mv .go-version %{build_dir}

%build
unset GOPROXY
pushd %{build_dir}
GIT_COMMIT_SHA=$(curl -s https://api.github.com/repos/coredns/coredns/git/refs/tags/v1.12.2 | jq -r '.object.sha[0:7]')
GOLANG_VERSION=$(cat .go-version)
make GITCOMMIT=${GIT_COMMIT_SHA}

popd

%install
install -D -p -m 0755 %{build_dir}/coredns %{buildroot}%{_bindir}/%{name}
mv %{build_dir}/LICENSE .
mv %{build_dir}/THIRD_PARTY_LICENSES.txt .

%files
%license LICENSE THIRD_PARTY_LICENSES.txt
%{_bindir}/%{name}

%changelog
* Fri Sep 19 2025 Olcne-Builder Jenkins <[email protected]> - 1.12.2-1
- Added Oracle specific build files
17 changes: 17 additions & 0 deletions olm/builds/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM container-registry.oracle.com/os/oraclelinux:8
COPY rpms /tmp/
RUN dnf install -y /tmp/*.rpm &&\
dnf clean all &&\
rm -rf /var/cache/yum/* /tmp/*.rpm

FROM container-registry.oracle.com/os/oraclelinux:8
COPY --from=0 /usr/share/licenses/coredns* /usr/share/licenses/
COPY --from=0 /usr/bin/coredns /usr/bin/coredns
RUN dnf install -y bind-utils ca-certificates openssl &&\
dnf clean all &&\
rm -rf /var/cache/yum/* /tmp/* &&\
ln -s /usr/share/licenses /LICENSES

EXPOSE 53 53/udp

ENTRYPOINT ["/usr/bin/coredns"]
17 changes: 17 additions & 0 deletions olm/jenkins/ci/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@Library('olcne-pipeline') _
import com.oracle.olcne.pipeline.BranchPattern

String coredns_version = "1.12.2";
String image_tag = 'v' + coredns_version + '';

olcnePipeline(
containers: [('container-registry.oracle.com/olcne/coredns:' + image_tag): 'olcne/coredns:' + image_tag],
branchPattern: new BranchPattern(master: 'oracle/release/' + coredns_version, feature: '(?!^release/.*$)(^.*$)'),
platforms: ['ol8'],
architectures: ['x86_64', 'aarch64'],
yumOL8Repos: ['ol8_appstream'],
preBuildCommands: [
'podman pull container-registry.oracle.com/olcne/base:latest',
'podman tag container-registry.oracle.com/olcne/base:latest container-registry.oracle.com/os/oraclelinux:8',
],
)
Loading
Loading