Build with rust v1.66 and cross v0.2.4

Also added some sanity checks. The new docker image now also contains
all required targets and the rust-src component already, which makes it
a bit faster to get started.

Signed-off-by: Jacob Kiers <jacob@jacobkiers.net>
pull/14/head
Jacob Kiers 3 months ago
parent 31fda8bae2
commit ea30a49901

@ -0,0 +1,3 @@
[profile.release]
lto = "thin"
strip = true

@ -1,4 +1,5 @@
local executableName = 'newsletter-to-web';
local cross_image = 'img.kie.rs/jjkiers/rust-dind-cross:1.66-full';
local archs = [
// { target: 'aarch64-unknown-linux-gnu', short: 'arm64-gnu' },
@ -16,16 +17,12 @@ local targetExecutableName(arch) = executableName + if std.startsWith(arch.short
local add_build_steps() = [
{
name: getStepName(arch),
image: 'img.kie.rs/jjkiers/rust-dind-cross:1.62-slim',
image: cross_image,
volumes: [
{
name: 'dockersock',
path: '/var/run',
},
{
name: 'rustup',
path: '/usr/local/rustup',
},
],
commands: [
'echo Hello World from Jsonnet on ' + arch.target + '!',
@ -51,13 +48,19 @@ local add_build_steps() = [
steps:
[{
name: 'Wait for Docker',
image: 'img.kie.rs/jjkiers/rust-dind-cross:1.65-slim',
image: cross_image,
commands: [
'mkdir artifacts',
'echo Using image: ' + cross_image,
'while ! docker image ls; do sleep 1; done',
'cargo --version',
'rustc --version',
'docker info',
'docker pull hello-world:latest',
'mkdir artifacts',
],
environment: {
CROSS_REMOTE: true,
},
volumes: [{
name: 'dockersock',
path: '/var/run',
@ -67,7 +70,7 @@ local add_build_steps() = [
[
{
name: 'Show built artifacts',
image: 'img.kie.rs/jjkiers/rust-dind-cross:1.62-slim',
image: cross_image,
commands: [
'ls -lah artifacts',
],
@ -112,18 +115,6 @@ local add_build_steps() = [
name: 'dockersock',
temp: {},
},
{
name: 'docker-storage',
host: {
path: '/srv/drone/docker-dind-rust',
},
},
{
name: 'rustup',
host: {
path: '/srv/drone/rustup',
},
},
],
image_pull_secrets: ['docker_private_repo'],

Loading…
Cancel
Save