Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
eae221f9
Commit
eae221f9
authored
Dec 15, 2023
by
Brad Davidson
Committed by
Brad Davidson
Jan 04, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix OS PRETTY_NAME on tagged releases
These were always showing up as dev due to the build arg not being set by the drone step. Signed-off-by:
Brad Davidson
<
brad.davidson@rancher.com
>
parent
b297996b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
5 deletions
+13
-5
.drone.yml
.drone.yml
+6
-1
Dockerfile
package/Dockerfile
+6
-3
package-image
scripts/package-image
+1
-1
No files found.
.drone.yml
View file @
eae221f9
...
...
@@ -102,6 +102,8 @@ steps:
repo
:
"
rancher/k3s"
username
:
from_secret
:
docker_username
build_args_from_env
:
-
DRONE_TAG
when
:
instance
:
-
drone-publish.k3s.io
...
...
@@ -270,6 +272,8 @@ steps:
repo
:
"
rancher/k3s"
username
:
from_secret
:
docker_username
build_args_from_env
:
-
DRONE_TAG
when
:
instance
:
-
drone-publish.k3s.io
...
...
@@ -379,6 +383,8 @@ steps:
repo
:
"
rancher/k3s"
username
:
from_secret
:
docker_username
build_args_from_env
:
-
DRONE_TAG
when
:
instance
:
-
drone-publish.k3s.io
...
...
@@ -496,7 +502,6 @@ steps:
-
DOCKER_USERNAME
-
DOCKER_PASSWORD
-
DRONE_TAG
trigger
:
instance
:
-
drone-publish.k3s.io
...
...
package/Dockerfile
View file @
eae221f9
...
...
@@ -5,14 +5,17 @@ RUN mkdir -p /image/etc/ssl/certs /image/run /image/var/run /image/tmp /image/li
tar
-xa
-C
/image
-f
/data.tar.zst
&&
\
cp
/etc/ssl/certs/ca-certificates.crt /image/etc/ssl/certs/ca-certificates.crt
FROM
scratch
ARG
VERSION
="dev"
FROM
scratch
as collect
ARG
DRONE_TAG
="dev"
COPY
--from=base /image /
COPY
--from=base /usr/share/zoneinfo /usr/share/zoneinfo
RUN
mkdir
-p
/etc
&&
\
echo
'hosts: files dns'
>
/etc/nsswitch.conf
&&
\
echo
"PRETTY_NAME=
\"
K3s
${
VERSION
}
\"
"
>
/etc/os-release
&&
\
echo
"PRETTY_NAME=
\"
K3s
${
DRONE_TAG
}
\"
"
>
/etc/os-release
&&
\
chmod
1777 /tmp
FROM
scratch
COPY
--from=collect / /
VOLUME
/var/lib/kubelet
VOLUME
/var/lib/rancher/k3s
VOLUME
/var/lib/cni
...
...
scripts/package-image
View file @
eae221f9
...
...
@@ -14,6 +14,6 @@ PROXY_OPTS=
[
-z
"
$http_proxy
"
]
||
PROXY_OPTS
=
"
$PROXY_OPTS
--build-arg http_proxy=
$http_proxy
"
[
-z
"
$https_proxy
"
]
||
PROXY_OPTS
=
"
$PROXY_OPTS
--build-arg https_proxy=
$https_proxy
"
[
-z
"
$no_proxy
"
]
||
PROXY_OPTS
=
"
$PROXY_OPTS
--build-arg no_proxy=
$no_proxy
"
docker build
${
PROXY_OPTS
}
--build-arg
VERSION
=
${
VERSION
}
-t
${
IMAGE
}
-f
package/Dockerfile
.
docker build
${
PROXY_OPTS
}
--build-arg
DRONE_TAG
=
${
VERSION_TAG
}
-t
${
IMAGE
}
-f
package/Dockerfile
.
./scripts/image_scan.sh
${
IMAGE
}
${
ARCH
}
echo
Built
${
IMAGE
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment