aboutsummaryrefslogtreecommitdiffstats
path: root/.drone.jsonnet
blob: 83f4c2c0843d7d229ec864e1d9347097b8284da6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
local tags = ['v3.6', 'v3.7', 'v3.8', 'v3.9', 'v3.10', 'v3.11', 'edge'];
local tags_armv7 = ['v3.9', 'v3.10', 'v3.11', 'edge'];

local pipeline(arch, darch, tags) = {
  kind: 'pipeline',
  name: arch,
  platform: {
    os: 'linux',
    arch: darch,
  },
  steps: [
    {
      name: 'dockerfiles',
      image: 'alpine',
      commands: ['./dockerfiles.sh'],
    },
  ] + [
    {
      name: tag,
      image: 'plugins/docker',
      settings: {
        username: {
          from_secret: 'docker_user',
        },
        password: {
          from_secret: 'docker_pass',
        },
        repo: 'alpinelinux/docker-abuild',
        tags: '%s-%s' % [std.strReplace(tag, 'v', ''), arch],
        dockerfile: 'Dockerfiles/%s/%s/Dockerfile' % [tag, arch],
      },
      when: {
        branch: ['master'],
      },
      depends_on: ['dockerfiles'],
    }
    for tag in tags
  ],
};

[
  pipeline('x86', 'amd64', tags),
  pipeline('x86_64', 'amd64', tags),
  pipeline('aarch64', 'arm64', tags),
  pipeline('armhf', 'arm', tags),
  pipeline('armv7', 'arm', tags_armv7),
]