Fully remove docker-in-docker and cross
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
Signed-off-by: Jacob Kiers <code@kiers.eu>
This commit is contained in:
parent
3b5016b887
commit
642513f154
|
@ -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 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 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() = [
|
local add_build_steps() = [
|
||||||
{
|
{
|
||||||
name: getStepName(arch),
|
name: getStepName(arch),
|
||||||
|
@ -24,13 +26,11 @@ local add_build_steps() = [
|
||||||
],
|
],
|
||||||
commands: [
|
commands: [
|
||||||
'echo Hello World from Jsonnet on ' + arch.target + '!',
|
'echo Hello World from Jsonnet on ' + arch.target + '!',
|
||||||
'rustup target add ' + arch.target,
|
'cargo zigbuild --release --target ' + arch.target,
|
||||||
'scripts/prepare-build.sh',
|
|
||||||
'cross zigbuild --release --target ' + arch.target,
|
|
||||||
'cp target/' + arch.target + '/release/' + builtExecutableName(arch) + ' artifacts/' + targetExecutableName(arch),
|
'cp target/' + arch.target + '/release/' + builtExecutableName(arch) + ' artifacts/' + targetExecutableName(arch),
|
||||||
'rm -rf target/' + arch.target + '/release/*',
|
'rm -rf target/' + arch.target + '/release/*',
|
||||||
],
|
],
|
||||||
depends_on: ['Wait for Docker'],
|
depends_on: ['Prepare'],
|
||||||
}
|
}
|
||||||
for arch in archs
|
for arch in archs
|
||||||
];
|
];
|
||||||
|
@ -44,24 +44,10 @@ local add_build_steps() = [
|
||||||
},
|
},
|
||||||
steps:
|
steps:
|
||||||
[{
|
[{
|
||||||
name: 'Wait for Docker',
|
name: 'Prepare',
|
||||||
image: build_image,
|
image: build_image,
|
||||||
commands: [
|
commands: ['scripts/prepare-build.sh'] +
|
||||||
'mkdir artifacts',
|
[rustupAddTarget(a) for a in archs],
|
||||||
'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',
|
|
||||||
}],
|
|
||||||
}] +
|
}] +
|
||||||
add_build_steps() +
|
add_build_steps() +
|
||||||
[
|
[
|
||||||
|
@ -91,28 +77,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'],
|
image_pull_secrets: ['docker_private_repo'],
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue