Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
DNS proxy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Container Library
DNS proxy
Commits
b015fb2e
Verified
Commit
b015fb2e
authored
Sep 6, 2023
by
Sheogorath
Browse files
Options
Downloads
Patches
Plain Diff
Switch to earthly
parent
f84e2eae
Branches
ci/earthly
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#18111
passed
Sep 7, 2023
Stage: test
Changes
4
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitlab-ci.yml
+17
-11
17 additions, 11 deletions
.gitlab-ci.yml
Dockerfile
+0
-18
0 additions, 18 deletions
Dockerfile
Earthfile
+37
-0
37 additions, 0 deletions
Earthfile
renovate.json
+10
-2
10 additions, 2 deletions
renovate.json
with
64 additions
and
31 deletions
.gitlab-ci.yml
+
17
−
11
View file @
b015fb2e
include
:
-
project
:
'
container-library/build-ah-engine
'
ref
:
2.1.4
file
:
'
/
gitlab-ci-template
.yml'
-
project
:
'
shivering-isles/infrastructure-gitops
'
ref
:
main
file
:
'
/
images/.utils/gitlab-earthly
.y
a
ml'
variables
:
CI_CONTAINER_BUILD_ARCHS
:
"
amd64"
container-tagging
:
before_script
:
-
podman login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
-
export BUILD_DATE="$(date --rfc-3339 ns)"
-
export CI_REGISTRY_IMAGE_VERSION=$(grep 'ARG DNSPROXY_VERSION=' Dockerfile | sed -e 's/^ARG DNSPROXY_VERSION=v//g')
build
:
extends
:
.earthly
script
:
-
|
if [ -n "$CI_OCI_CACHE" ]; then
export ARGS="${ARGS} --remote-cache=$CI_OCI_CACHE"
fi
-
|
if [ $CI_COMMIT_BRANCH = $CI_DEFAULT_BRANCH ]; then
export BUILD_ARGS="${BUILD_ARGS} --latest=true"
else
export BUILD_ARGS="${BUILD_ARGS} --tag=$CI_COMMIT_REF_SLUG --latest=false"
fi
-
earthly --ci --allow-privileged --push ${ARGS} +container --registry=${CI_REGISTRY_IMAGE} ${BUILD_ARGS}
This diff is collapsed.
Click to expand it.
Dockerfile
deleted
100644 → 0
+
0
−
18
View file @
f84e2eae
FROM
docker.io/library/golang:1.21.0
as
build-env
# renovate: datasource=git-tags depName=https://git.shivering-isles.com/github-mirror/AdguardTeam/dnsproxy.git
ARG
DNSPROXY_VERSION=v0.54.0
ENV
DNSPROXY_VERSION=${DNSPROXY_VERSION}
ENV
CGO_ENABLED=0
RUN
true
\
&&
git clone https://git.shivering-isles.com/github-mirror/AdguardTeam/dnsproxy.git
--depth
1
-b
"
$DNSPROXY_VERSION
"
\
&&
cd
dnsproxy
\
&&
go build
-mod
=
vendor
FROM
gcr.io/distroless/static
COPY
--from=build-env /go/dnsproxy/dnsproxy /
CMD
["/dnsproxy"]
This diff is collapsed.
Click to expand it.
Earthfile
0 → 100644
+
37
−
0
View file @
b015fb2e
VERSION 0.7
# build creates a binary release of dnsproxy
build:
FROM git.shivering-isles.com/shivering-isles/infrastructure-gitops/images/mirror+golang
WORKDIR /go-workdir
ARG DNSPROXY_VERSION
ENV CGO_ENABLED=0
GIT CLONE --keep-ts --branch "${DNSPROXY_VERSION}" https://git.shivering-isles.com/github-mirror/AdguardTeam/dnsproxy.git ./
RUN go build -mod=vendor
SAVE ARTIFACT ./dnsproxy AS LOCAL local-output/dnsproxy
container-internal:
FROM git.shivering-isles.com/shivering-isles/infrastructure-gitops/images/mirror+distroless-static
# renovate: datasource=git-tags depName=https://git.shivering-isles.com/github-mirror/AdguardTeam/dnsproxy.git
ARG DNSPROXY_VERSION
ENV DNSPROXY_VERSION=${DNSPROXY_VERSION}
COPY (+build/dnsproxy --DNSPROXY_VERSION=${DNSPROXY_VERSION}) /dnsproxy
CMD ["/dnsproxy"]
# container builds the dnsproxy container
container:
FROM git.shivering-isles.com/shivering-isles/infrastructure-gitops/images/mirror+golang
# renovate: datasource=git-tags depName=https://git.shivering-isles.com/github-mirror/AdguardTeam/dnsproxy.git
ARG DNSPROXY_VERSION=v0.54.0
ARG registry=quay.io/shivering-isles/dnsproxy
ARG tag=${DNSPROXY_VERSION}
ARG latest=false
IF [ $latest = "true" ]
FROM +container-internal --DNSPROXY_VERSION=${DNSPROXY_VERSION}
SAVE IMAGE --push ${registry}:latest
END
FROM +container-internal --DNSPROXY_VERSION=${DNSPROXY_VERSION}
SAVE IMAGE --push ${registry}:${tag}
This diff is collapsed.
Click to expand it.
renovate.json
+
10
−
2
View file @
b015fb2e
{
"extends"
:
[
"config:base"
,
"regexManagers:dockerfileVersions"
"config:base"
],
"regexManager"
:
[
{
"fileMatch"
:
[
"Dockerfile$"
,
"Earthfile$"
],
"matchStrings"
:
[
"#
\\
s*renovate:
\\
s*datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?
\\
sENV .*?_VERSION=
\"
(?<currentValue>.*)
\"\\
s"
],
"versioningTemplate"
:
"{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}"
}
],
"prConcurrentLimit"
:
5
,
"automerge"
:
true
,
...
...
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
sign in
to comment