Fully remove docker-in-docker and cross
continuous-integration/drone/push Build is failing Details

Signed-off-by: Jacob Kiers <code@kiers.eu>
This commit is contained in:
Jacob Kiers 2023-06-10 12:54:24 +02:00
parent 3b5016b887
commit 6c189e68a5
1 changed files with 7 additions and 42 deletions

View File

@ -12,6 +12,8 @@ local getStepName(arch) = 'Build for ' + arch.short;
local builtExecutableName(arch) = executableName + if std.length(std.findSubstr(arch.short, 'windows')) > 0 then '.exe' else '';
local targetExecutableName(arch) = executableName + '-' + arch.target + if std.length(std.findSubstr(arch.short, 'windows')) > 0 then '.exe' else '';
local rustupAddTarget(arch) = 'rustup target add' + arch.target;
local add_build_steps() = [
{
name: getStepName(arch),
@ -26,11 +28,11 @@ local add_build_steps() = [
'echo Hello World from Jsonnet on ' + arch.target + '!',
'rustup target add ' + arch.target,
'scripts/prepare-build.sh',
'cross zigbuild --release --target ' + arch.target,
'cargo zigbuild --release --target ' + arch.target,
'cp target/' + arch.target + '/release/' + builtExecutableName(arch) + ' artifacts/' + targetExecutableName(arch),
'rm -rf target/' + arch.target + '/release/*',
],
depends_on: ['Wait for Docker'],
depends_on: ['Prepare'],
}
for arch in archs
];
@ -44,24 +46,10 @@ local add_build_steps() = [
},
steps:
[{
name: 'Wait for Docker',
name: 'Prepare',
image: build_image,
commands: [
'mkdir artifacts',
'echo Using image: ' + build_image,
'while ! docker image ls; do sleep 1; done',
'cargo --version',
'rustc --version',
'docker info',
'docker pull hello-world:latest',
],
environment: {
CROSS_REMOTE: true,
},
volumes: [{
name: 'dockersock',
path: '/var/run',
}],
commands: ['scripts/prepare-build.sh'] +
[rustupAddTarget(a) for a in archs],
}] +
add_build_steps() +
[
@ -91,28 +79,5 @@ local add_build_steps() = [
},
],
services: [{
name: 'docker',
image: 'docker:dind',
privileged: true,
volumes: [
{
name: 'dockersock',
path: '/var/run',
},
{
name: 'docker-storage',
path: '/var/lib/docker',
},
],
}],
volumes: [
{
name: 'dockersock',
temp: {},
},
],
image_pull_secrets: ['docker_private_repo'],
}