File: docker.yml

package info (click to toggle)
fish 4.2.1-3.1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 35,980 kB
  • sloc: python: 6,972; javascript: 1,407; sh: 1,009; xml: 411; ansic: 230; objc: 78; makefile: 20
file content (65 lines) | stat: -rw-r--r-- 1,878 bytes parent folder | download | duplicates (2)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: "Update Linux docker images"

sources:
  alpine_latest_version:
    kind: dockerimage
    spec:
      image: alpine
      tagfilter: "^[0-9]+\\.[0-9]+$"
      versionfilter:
        kind: semver
  ubuntu_latest_lts_version:
    kind: shell
    spec:
      shell: bash
      command: |
        set -eo pipefail
        curl -fsS https://endoflife.date/api/ubuntu.json |
          jq -r --arg today "$today" '
            .[]
            | select(.lts)
            | "\(.cycle)"
          ' |
          sort --version-sort |
          tail -1
  ubuntu_oldest_non_eol_version:
    kind: shell
    spec:
      shell: bash
      command: |
        set -eo pipefail
        today=$(date --iso-8601)
        curl -fsS https://endoflife.date/api/ubuntu.json |
          jq -r --arg today "$today" '
            .[]
            | select(.eol >= $today)
            | "\(.cycle)"
          ' |
          sort --version-sort |
          head -1

targets:
  update_alpine_dockerfile:
    name: "Update Alpine Linux version"
    sourceid: alpine_latest_version
    kind: file
    spec:
      file: docker/alpine.Dockerfile
      matchpattern: "FROM alpine:.*"
      replacepattern: 'FROM alpine:{{ source "alpine_latest_version" }}'
  ubuntu_latest_version_dockerfile:
    name: "Update oldest non-EOL Ubuntu Linux version"
    sourceid: ubuntu_latest_lts_version
    kind: file
    spec:
      file: docker/ubuntu-latest-lts.Dockerfile
      matchpattern: "FROM ubuntu:.*"
      replacepattern: 'FROM ubuntu:{{ source "ubuntu_latest_lts_version" }}'
  ubuntu_oldest_supported_dockerfile:
    name: "Update oldest non-EOL Ubuntu Linux version"
    sourceid: ubuntu_oldest_non_eol_version
    kind: file
    spec:
      file: docker/ubuntu-oldest-supported.Dockerfile
      matchpattern: "FROM ubuntu:.*"
      replacepattern: 'FROM ubuntu:{{ source "ubuntu_oldest_non_eol_version" }}'