chore: build app container images skipping export to host
Container images for `apid`, `networkd`, etc. are now built inside the buildkit using the `img` tool. This means that all the dependencies are now controlled in `buildkit` and many more stages can run in parallel without problems (overwriting content in `_out/images`). This also simplifies Drone configuration, as we can let buildkit handle the dependencies. I also enabled more stages to run in parallel. Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
This commit is contained in:
parent
d57598ebe1
commit
f51e9a14fe
642
.drone.yml
642
.drone.yml
@ -49,120 +49,6 @@ steps:
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
|
||||
- name: machined
|
||||
pull: always
|
||||
image: autonomy/build-container:latest
|
||||
commands:
|
||||
- make machined
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
- name: docker
|
||||
path: /root/.docker/buildx
|
||||
- name: kube
|
||||
path: /root/.kube
|
||||
- name: dev
|
||||
path: /dev
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- setup-ci
|
||||
|
||||
- name: osd
|
||||
pull: always
|
||||
image: autonomy/build-container:latest
|
||||
commands:
|
||||
- make osd
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
- name: docker
|
||||
path: /root/.docker/buildx
|
||||
- name: kube
|
||||
path: /root/.kube
|
||||
- name: dev
|
||||
path: /dev
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- setup-ci
|
||||
|
||||
- name: apid
|
||||
pull: always
|
||||
image: autonomy/build-container:latest
|
||||
commands:
|
||||
- make apid
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
- name: docker
|
||||
path: /root/.docker/buildx
|
||||
- name: kube
|
||||
path: /root/.kube
|
||||
- name: dev
|
||||
path: /dev
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- setup-ci
|
||||
|
||||
- name: trustd
|
||||
pull: always
|
||||
image: autonomy/build-container:latest
|
||||
commands:
|
||||
- make trustd
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
- name: docker
|
||||
path: /root/.docker/buildx
|
||||
- name: kube
|
||||
path: /root/.kube
|
||||
- name: dev
|
||||
path: /dev
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- setup-ci
|
||||
|
||||
- name: ntpd
|
||||
pull: always
|
||||
image: autonomy/build-container:latest
|
||||
commands:
|
||||
- make ntpd
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
- name: docker
|
||||
path: /root/.docker/buildx
|
||||
- name: kube
|
||||
path: /root/.kube
|
||||
- name: dev
|
||||
path: /dev
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- setup-ci
|
||||
|
||||
- name: networkd
|
||||
pull: always
|
||||
image: autonomy/build-container:latest
|
||||
commands:
|
||||
- make networkd
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
- name: docker
|
||||
path: /root/.docker/buildx
|
||||
- name: kube
|
||||
path: /root/.kube
|
||||
- name: dev
|
||||
path: /dev
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- setup-ci
|
||||
|
||||
- name: osctl-linux
|
||||
pull: always
|
||||
image: autonomy/build-container:latest
|
||||
@ -256,12 +142,7 @@ steps:
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- apid
|
||||
- machined
|
||||
- networkd
|
||||
- ntpd
|
||||
- osd
|
||||
- trustd
|
||||
- setup-ci
|
||||
|
||||
- name: installer
|
||||
pull: always
|
||||
@ -299,7 +180,7 @@ steps:
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- installer
|
||||
- initramfs
|
||||
|
||||
- name: lint-go
|
||||
pull: always
|
||||
@ -470,7 +351,7 @@ steps:
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- talos
|
||||
- initramfs
|
||||
|
||||
- name: unit-tests-race
|
||||
pull: always
|
||||
@ -522,7 +403,6 @@ steps:
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- unit-tests
|
||||
- talos
|
||||
- osctl-linux
|
||||
|
||||
@ -544,7 +424,7 @@ steps:
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- unit-tests
|
||||
- initramfs
|
||||
- osctl-linux
|
||||
- kernel
|
||||
|
||||
@ -695,120 +575,6 @@ steps:
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
|
||||
- name: machined
|
||||
pull: always
|
||||
image: autonomy/build-container:latest
|
||||
commands:
|
||||
- make machined
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
- name: docker
|
||||
path: /root/.docker/buildx
|
||||
- name: kube
|
||||
path: /root/.kube
|
||||
- name: dev
|
||||
path: /dev
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- setup-ci
|
||||
|
||||
- name: osd
|
||||
pull: always
|
||||
image: autonomy/build-container:latest
|
||||
commands:
|
||||
- make osd
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
- name: docker
|
||||
path: /root/.docker/buildx
|
||||
- name: kube
|
||||
path: /root/.kube
|
||||
- name: dev
|
||||
path: /dev
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- setup-ci
|
||||
|
||||
- name: apid
|
||||
pull: always
|
||||
image: autonomy/build-container:latest
|
||||
commands:
|
||||
- make apid
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
- name: docker
|
||||
path: /root/.docker/buildx
|
||||
- name: kube
|
||||
path: /root/.kube
|
||||
- name: dev
|
||||
path: /dev
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- setup-ci
|
||||
|
||||
- name: trustd
|
||||
pull: always
|
||||
image: autonomy/build-container:latest
|
||||
commands:
|
||||
- make trustd
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
- name: docker
|
||||
path: /root/.docker/buildx
|
||||
- name: kube
|
||||
path: /root/.kube
|
||||
- name: dev
|
||||
path: /dev
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- setup-ci
|
||||
|
||||
- name: ntpd
|
||||
pull: always
|
||||
image: autonomy/build-container:latest
|
||||
commands:
|
||||
- make ntpd
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
- name: docker
|
||||
path: /root/.docker/buildx
|
||||
- name: kube
|
||||
path: /root/.kube
|
||||
- name: dev
|
||||
path: /dev
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- setup-ci
|
||||
|
||||
- name: networkd
|
||||
pull: always
|
||||
image: autonomy/build-container:latest
|
||||
commands:
|
||||
- make networkd
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
- name: docker
|
||||
path: /root/.docker/buildx
|
||||
- name: kube
|
||||
path: /root/.kube
|
||||
- name: dev
|
||||
path: /dev
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- setup-ci
|
||||
|
||||
- name: osctl-linux
|
||||
pull: always
|
||||
image: autonomy/build-container:latest
|
||||
@ -902,12 +668,7 @@ steps:
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- apid
|
||||
- machined
|
||||
- networkd
|
||||
- ntpd
|
||||
- osd
|
||||
- trustd
|
||||
- setup-ci
|
||||
|
||||
- name: installer
|
||||
pull: always
|
||||
@ -945,7 +706,7 @@ steps:
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- installer
|
||||
- initramfs
|
||||
|
||||
- name: lint-go
|
||||
pull: always
|
||||
@ -1116,7 +877,7 @@ steps:
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- talos
|
||||
- initramfs
|
||||
|
||||
- name: unit-tests-race
|
||||
pull: always
|
||||
@ -1168,7 +929,6 @@ steps:
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- unit-tests
|
||||
- talos
|
||||
- osctl-linux
|
||||
|
||||
@ -1190,7 +950,7 @@ steps:
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- unit-tests
|
||||
- initramfs
|
||||
- osctl-linux
|
||||
- kernel
|
||||
|
||||
@ -1433,120 +1193,6 @@ steps:
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
|
||||
- name: machined
|
||||
pull: always
|
||||
image: autonomy/build-container:latest
|
||||
commands:
|
||||
- make machined
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
- name: docker
|
||||
path: /root/.docker/buildx
|
||||
- name: kube
|
||||
path: /root/.kube
|
||||
- name: dev
|
||||
path: /dev
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- setup-ci
|
||||
|
||||
- name: osd
|
||||
pull: always
|
||||
image: autonomy/build-container:latest
|
||||
commands:
|
||||
- make osd
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
- name: docker
|
||||
path: /root/.docker/buildx
|
||||
- name: kube
|
||||
path: /root/.kube
|
||||
- name: dev
|
||||
path: /dev
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- setup-ci
|
||||
|
||||
- name: apid
|
||||
pull: always
|
||||
image: autonomy/build-container:latest
|
||||
commands:
|
||||
- make apid
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
- name: docker
|
||||
path: /root/.docker/buildx
|
||||
- name: kube
|
||||
path: /root/.kube
|
||||
- name: dev
|
||||
path: /dev
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- setup-ci
|
||||
|
||||
- name: trustd
|
||||
pull: always
|
||||
image: autonomy/build-container:latest
|
||||
commands:
|
||||
- make trustd
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
- name: docker
|
||||
path: /root/.docker/buildx
|
||||
- name: kube
|
||||
path: /root/.kube
|
||||
- name: dev
|
||||
path: /dev
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- setup-ci
|
||||
|
||||
- name: ntpd
|
||||
pull: always
|
||||
image: autonomy/build-container:latest
|
||||
commands:
|
||||
- make ntpd
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
- name: docker
|
||||
path: /root/.docker/buildx
|
||||
- name: kube
|
||||
path: /root/.kube
|
||||
- name: dev
|
||||
path: /dev
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- setup-ci
|
||||
|
||||
- name: networkd
|
||||
pull: always
|
||||
image: autonomy/build-container:latest
|
||||
commands:
|
||||
- make networkd
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
- name: docker
|
||||
path: /root/.docker/buildx
|
||||
- name: kube
|
||||
path: /root/.kube
|
||||
- name: dev
|
||||
path: /dev
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- setup-ci
|
||||
|
||||
- name: osctl-linux
|
||||
pull: always
|
||||
image: autonomy/build-container:latest
|
||||
@ -1640,12 +1286,7 @@ steps:
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- apid
|
||||
- machined
|
||||
- networkd
|
||||
- ntpd
|
||||
- osd
|
||||
- trustd
|
||||
- setup-ci
|
||||
|
||||
- name: installer
|
||||
pull: always
|
||||
@ -1683,7 +1324,7 @@ steps:
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- installer
|
||||
- initramfs
|
||||
|
||||
- name: lint-go
|
||||
pull: always
|
||||
@ -1854,7 +1495,7 @@ steps:
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- talos
|
||||
- initramfs
|
||||
|
||||
- name: unit-tests-race
|
||||
pull: always
|
||||
@ -1906,7 +1547,6 @@ steps:
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- unit-tests
|
||||
- talos
|
||||
- osctl-linux
|
||||
|
||||
@ -1928,7 +1568,7 @@ steps:
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- unit-tests
|
||||
- initramfs
|
||||
- osctl-linux
|
||||
- kernel
|
||||
|
||||
@ -2201,120 +1841,6 @@ steps:
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
|
||||
- name: machined
|
||||
pull: always
|
||||
image: autonomy/build-container:latest
|
||||
commands:
|
||||
- make machined
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
- name: docker
|
||||
path: /root/.docker/buildx
|
||||
- name: kube
|
||||
path: /root/.kube
|
||||
- name: dev
|
||||
path: /dev
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- setup-ci
|
||||
|
||||
- name: osd
|
||||
pull: always
|
||||
image: autonomy/build-container:latest
|
||||
commands:
|
||||
- make osd
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
- name: docker
|
||||
path: /root/.docker/buildx
|
||||
- name: kube
|
||||
path: /root/.kube
|
||||
- name: dev
|
||||
path: /dev
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- setup-ci
|
||||
|
||||
- name: apid
|
||||
pull: always
|
||||
image: autonomy/build-container:latest
|
||||
commands:
|
||||
- make apid
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
- name: docker
|
||||
path: /root/.docker/buildx
|
||||
- name: kube
|
||||
path: /root/.kube
|
||||
- name: dev
|
||||
path: /dev
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- setup-ci
|
||||
|
||||
- name: trustd
|
||||
pull: always
|
||||
image: autonomy/build-container:latest
|
||||
commands:
|
||||
- make trustd
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
- name: docker
|
||||
path: /root/.docker/buildx
|
||||
- name: kube
|
||||
path: /root/.kube
|
||||
- name: dev
|
||||
path: /dev
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- setup-ci
|
||||
|
||||
- name: ntpd
|
||||
pull: always
|
||||
image: autonomy/build-container:latest
|
||||
commands:
|
||||
- make ntpd
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
- name: docker
|
||||
path: /root/.docker/buildx
|
||||
- name: kube
|
||||
path: /root/.kube
|
||||
- name: dev
|
||||
path: /dev
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- setup-ci
|
||||
|
||||
- name: networkd
|
||||
pull: always
|
||||
image: autonomy/build-container:latest
|
||||
commands:
|
||||
- make networkd
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
- name: docker
|
||||
path: /root/.docker/buildx
|
||||
- name: kube
|
||||
path: /root/.kube
|
||||
- name: dev
|
||||
path: /dev
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- setup-ci
|
||||
|
||||
- name: osctl-linux
|
||||
pull: always
|
||||
image: autonomy/build-container:latest
|
||||
@ -2408,12 +1934,7 @@ steps:
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- apid
|
||||
- machined
|
||||
- networkd
|
||||
- ntpd
|
||||
- osd
|
||||
- trustd
|
||||
- setup-ci
|
||||
|
||||
- name: installer
|
||||
pull: always
|
||||
@ -2451,7 +1972,7 @@ steps:
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- installer
|
||||
- initramfs
|
||||
|
||||
- name: lint-go
|
||||
pull: always
|
||||
@ -2622,7 +2143,7 @@ steps:
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- talos
|
||||
- initramfs
|
||||
|
||||
- name: unit-tests-race
|
||||
pull: always
|
||||
@ -2674,7 +2195,6 @@ steps:
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- unit-tests
|
||||
- talos
|
||||
- osctl-linux
|
||||
|
||||
@ -2696,7 +2216,7 @@ steps:
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- unit-tests
|
||||
- initramfs
|
||||
- osctl-linux
|
||||
- kernel
|
||||
|
||||
@ -2969,120 +2489,6 @@ steps:
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
|
||||
- name: machined
|
||||
pull: always
|
||||
image: autonomy/build-container:latest
|
||||
commands:
|
||||
- make machined
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
- name: docker
|
||||
path: /root/.docker/buildx
|
||||
- name: kube
|
||||
path: /root/.kube
|
||||
- name: dev
|
||||
path: /dev
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- setup-ci
|
||||
|
||||
- name: osd
|
||||
pull: always
|
||||
image: autonomy/build-container:latest
|
||||
commands:
|
||||
- make osd
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
- name: docker
|
||||
path: /root/.docker/buildx
|
||||
- name: kube
|
||||
path: /root/.kube
|
||||
- name: dev
|
||||
path: /dev
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- setup-ci
|
||||
|
||||
- name: apid
|
||||
pull: always
|
||||
image: autonomy/build-container:latest
|
||||
commands:
|
||||
- make apid
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
- name: docker
|
||||
path: /root/.docker/buildx
|
||||
- name: kube
|
||||
path: /root/.kube
|
||||
- name: dev
|
||||
path: /dev
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- setup-ci
|
||||
|
||||
- name: trustd
|
||||
pull: always
|
||||
image: autonomy/build-container:latest
|
||||
commands:
|
||||
- make trustd
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
- name: docker
|
||||
path: /root/.docker/buildx
|
||||
- name: kube
|
||||
path: /root/.kube
|
||||
- name: dev
|
||||
path: /dev
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- setup-ci
|
||||
|
||||
- name: ntpd
|
||||
pull: always
|
||||
image: autonomy/build-container:latest
|
||||
commands:
|
||||
- make ntpd
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
- name: docker
|
||||
path: /root/.docker/buildx
|
||||
- name: kube
|
||||
path: /root/.kube
|
||||
- name: dev
|
||||
path: /dev
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- setup-ci
|
||||
|
||||
- name: networkd
|
||||
pull: always
|
||||
image: autonomy/build-container:latest
|
||||
commands:
|
||||
- make networkd
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
- name: docker
|
||||
path: /root/.docker/buildx
|
||||
- name: kube
|
||||
path: /root/.kube
|
||||
- name: dev
|
||||
path: /dev
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- setup-ci
|
||||
|
||||
- name: osctl-linux
|
||||
pull: always
|
||||
image: autonomy/build-container:latest
|
||||
@ -3176,12 +2582,7 @@ steps:
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- apid
|
||||
- machined
|
||||
- networkd
|
||||
- ntpd
|
||||
- osd
|
||||
- trustd
|
||||
- setup-ci
|
||||
|
||||
- name: installer
|
||||
pull: always
|
||||
@ -3219,7 +2620,7 @@ steps:
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- installer
|
||||
- initramfs
|
||||
|
||||
- name: lint-go
|
||||
pull: always
|
||||
@ -3390,7 +2791,7 @@ steps:
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- talos
|
||||
- initramfs
|
||||
|
||||
- name: unit-tests-race
|
||||
pull: always
|
||||
@ -3442,7 +2843,6 @@ steps:
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- unit-tests
|
||||
- talos
|
||||
- osctl-linux
|
||||
|
||||
@ -3464,7 +2864,7 @@ steps:
|
||||
- name: tmp
|
||||
path: /tmp
|
||||
depends_on:
|
||||
- unit-tests
|
||||
- initramfs
|
||||
- osctl-linux
|
||||
- kernel
|
||||
|
||||
@ -3702,6 +3102,6 @@ depends_on:
|
||||
|
||||
---
|
||||
kind: signature
|
||||
hmac: 6e1cb951c820c10c2b05d40cfb5577b8395b79d751b2c4246734de03c8a76422
|
||||
hmac: 84131ac5504f383563cba78fdadbf8f21721bc9a2e46991f236944c533137850
|
||||
|
||||
...
|
||||
|
62
Dockerfile
62
Dockerfile
@ -116,9 +116,13 @@ WORKDIR /src/internal/app/ntpd
|
||||
RUN --mount=type=cache,target=/.cache/go-build go build -ldflags "-s -w -X ${VERSION_PKG}.Name=Server -X ${VERSION_PKG}.SHA=${SHA} -X ${VERSION_PKG}.Tag=${TAG}" -o /ntpd
|
||||
RUN chmod +x /ntpd
|
||||
|
||||
FROM scratch AS ntpd
|
||||
COPY --from=ntpd-build /ntpd /ntpd
|
||||
ENTRYPOINT ["/ntpd"]
|
||||
FROM base AS ntpd-image
|
||||
ARG TAG
|
||||
ARG USERNAME
|
||||
COPY --from=ntpd-build /ntpd /scratch/ntpd
|
||||
WORKDIR /scratch
|
||||
RUN printf "FROM scratch\nCOPY ./ntpd /ntpd\nENTRYPOINT [\"/ntpd\"]" > Dockerfile
|
||||
RUN --security=insecure img build --tag ${USERNAME}/ntpd:${TAG} --output type=docker,dest=/ntpd.tar --no-console .
|
||||
|
||||
# The apid target builds the api image.
|
||||
|
||||
@ -130,9 +134,13 @@ WORKDIR /src/internal/app/apid
|
||||
RUN --mount=type=cache,target=/.cache/go-build go build -ldflags "-s -w -X ${VERSION_PKG}.Name=Server -X ${VERSION_PKG}.SHA=${SHA} -X ${VERSION_PKG}.Tag=${TAG}" -o /apid
|
||||
RUN chmod +x /apid
|
||||
|
||||
FROM scratch AS apid
|
||||
COPY --from=apid-build /apid /apid
|
||||
ENTRYPOINT ["/apid"]
|
||||
FROM base AS apid-image
|
||||
ARG TAG
|
||||
ARG USERNAME
|
||||
COPY --from=apid-build /apid /scratch/apid
|
||||
WORKDIR /scratch
|
||||
RUN printf "FROM scratch\nCOPY ./apid /apid\nENTRYPOINT [\"/apid\"]" > Dockerfile
|
||||
RUN --security=insecure img build --tag ${USERNAME}/apid:${TAG} --output type=docker,dest=/apid.tar --no-console .
|
||||
|
||||
# The osd target builds the osd image.
|
||||
|
||||
@ -144,9 +152,13 @@ WORKDIR /src/internal/app/osd
|
||||
RUN --mount=type=cache,target=/.cache/go-build go build -ldflags "-s -w -X ${VERSION_PKG}.Name=Server -X ${VERSION_PKG}.SHA=${SHA} -X ${VERSION_PKG}.Tag=${TAG}" -o /osd
|
||||
RUN chmod +x /osd
|
||||
|
||||
FROM scratch AS osd
|
||||
COPY --from=osd-build /osd /osd
|
||||
ENTRYPOINT ["/osd"]
|
||||
FROM base AS osd-image
|
||||
ARG TAG
|
||||
ARG USERNAME
|
||||
COPY --from=osd-build /osd /scratch/osd
|
||||
WORKDIR /scratch
|
||||
RUN printf "FROM scratch\nCOPY ./osd /osd\nENTRYPOINT [\"/osd\"]" > Dockerfile
|
||||
RUN --security=insecure img build --tag ${USERNAME}/osd:${TAG} --output type=docker,dest=/osd.tar --no-console .
|
||||
|
||||
# The trustd target builds the trustd image.
|
||||
|
||||
@ -158,9 +170,13 @@ WORKDIR /src/internal/app/trustd
|
||||
RUN --mount=type=cache,target=/.cache/go-build go build -ldflags "-s -w -X ${VERSION_PKG}.Name=Server -X ${VERSION_PKG}.SHA=${SHA} -X ${VERSION_PKG}.Tag=${TAG}" -o /trustd
|
||||
RUN chmod +x /trustd
|
||||
|
||||
FROM scratch AS trustd
|
||||
COPY --from=trustd-build /trustd /trustd
|
||||
ENTRYPOINT ["/trustd"]
|
||||
FROM base AS trustd-image
|
||||
ARG TAG
|
||||
ARG USERNAME
|
||||
COPY --from=trustd-build /trustd /scratch/trustd
|
||||
WORKDIR /scratch
|
||||
RUN printf "FROM scratch\nCOPY ./trustd /trustd\nENTRYPOINT [\"/trustd\"]" > Dockerfile
|
||||
RUN --security=insecure img build --tag ${USERNAME}/trustd:${TAG} --output type=docker,dest=/trustd.tar --no-console .
|
||||
|
||||
# The networkd target builds the networkd image.
|
||||
|
||||
@ -172,9 +188,14 @@ WORKDIR /src/internal/app/networkd
|
||||
RUN --mount=type=cache,target=/.cache/go-build go build -ldflags "-s -w -X ${VERSION_PKG}.Name=Server -X ${VERSION_PKG}.SHA=${SHA} -X ${VERSION_PKG}.Tag=${TAG}" -o /networkd
|
||||
RUN chmod +x /networkd
|
||||
|
||||
FROM scratch AS networkd
|
||||
COPY --from=networkd-build /networkd /networkd
|
||||
ENTRYPOINT ["/networkd"]
|
||||
FROM base AS networkd-image
|
||||
ARG TAG
|
||||
ARG USERNAME
|
||||
COPY --from=networkd-build /networkd /scratch/networkd
|
||||
WORKDIR /scratch
|
||||
RUN printf "FROM scratch\nCOPY ./networkd /networkd\nENTRYPOINT [\"/networkd\"]" > Dockerfile
|
||||
RUN --security=insecure img build --tag ${USERNAME}/networkd:${TAG} --output type=docker,dest=/networkd.tar --no-console .
|
||||
|
||||
|
||||
# The osctl targets build the osctl binaries.
|
||||
|
||||
@ -229,12 +250,11 @@ COPY --from=docker.io/autonomy/util-linux:f2a8e95 /lib/libuuid.* /rootfs/lib
|
||||
COPY --from=docker.io/autonomy/kmod:f2a8e95 /usr/lib/libkmod.* /rootfs/lib
|
||||
COPY --from=docker.io/autonomy/kernel:f2a8e95 /lib/modules /rootfs/lib/modules
|
||||
COPY --from=machined /machined /rootfs/sbin/init
|
||||
ARG IMAGES
|
||||
COPY ${IMAGES}/apid.tar /rootfs/usr/images/
|
||||
COPY ${IMAGES}/ntpd.tar /rootfs/usr/images/
|
||||
COPY ${IMAGES}/osd.tar /rootfs/usr/images/
|
||||
COPY ${IMAGES}/trustd.tar /rootfs/usr/images/
|
||||
COPY ${IMAGES}/networkd.tar /rootfs/usr/images/
|
||||
COPY --from=apid-image /apid.tar /rootfs/usr/images/
|
||||
COPY --from=ntpd-image /ntpd.tar /rootfs/usr/images/
|
||||
COPY --from=osd-image /osd.tar /rootfs/usr/images/
|
||||
COPY --from=trustd-image /trustd.tar /rootfs/usr/images/
|
||||
COPY --from=networkd-image /networkd.tar /rootfs/usr/images/
|
||||
# NB: We run the cleanup step before creating extra directories, files, and
|
||||
# symlinks to avoid accidentally cleaning them up.
|
||||
COPY ./hack/cleanup.sh /toolchain/bin/cleanup.sh
|
||||
|
41
Makefile
41
Makefile
@ -6,8 +6,7 @@ BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
|
||||
REGISTRY_AND_USERNAME := $(REGISTRY)/$(USERNAME)
|
||||
|
||||
ARTIFACTS := _out
|
||||
IMAGES := $(ARTIFACTS)/images
|
||||
TOOLS ?= autonomy/tools:v0.1.0
|
||||
TOOLS ?= autonomy/tools:v0.1.0-1-g1c0644f
|
||||
GO_VERSION ?= 1.13
|
||||
OPERATING_SYSTEM := $(shell uname -s | tr "[:upper:]" "[:lower:]")
|
||||
OSCTL_DEFAULT_TARGET := osctl-$(OPERATING_SYSTEM)
|
||||
@ -29,9 +28,9 @@ COMMON_ARGS += --build-arg=TOOLS=$(TOOLS)
|
||||
COMMON_ARGS += --build-arg=SHA=$(SHA)
|
||||
COMMON_ARGS += --build-arg=TAG=$(TAG)
|
||||
COMMON_ARGS += --build-arg=GO_VERSION=$(GO_VERSION)
|
||||
COMMON_ARGS += --build-arg=IMAGES=$(IMAGES)
|
||||
COMMON_ARGS += --build-arg=ARTIFACTS=$(ARTIFACTS)
|
||||
COMMON_ARGS += --build-arg=TESTPKGS=$(TESTPKGS)
|
||||
COMMON_ARGS += --build-arg=USERNAME=$(USERNAME)
|
||||
|
||||
all: initramfs kernel installer osctl talos
|
||||
|
||||
@ -105,28 +104,6 @@ docs: ## Generates the documentation for machine config, and osctl.
|
||||
@rm -rf docs/osctl/*
|
||||
@$(MAKE) local-$@ DEST=./
|
||||
|
||||
# Apps
|
||||
|
||||
apid: ## Builds the apid container image. The build result will be output to the specified local destination.
|
||||
@$(MAKE) docker-$@ DEST=./$(IMAGES)
|
||||
|
||||
machined: ## Builds machined. The build result will only remain in the build cache.
|
||||
@$(MAKE) target-$@
|
||||
|
||||
networkd: ## Builds the networkd container image. The build result will be output to the specified local destination.
|
||||
@$(MAKE) docker-$@ DEST=./$(IMAGES)
|
||||
|
||||
ntpd: ## Builds the ntpd container image. The build result will be output to the specified local destination.
|
||||
@$(MAKE) docker-$@ DEST=./$(IMAGES)
|
||||
|
||||
osd: ## Builds the osd container image. The build result will be output to the specified local destination.
|
||||
@$(MAKE) docker-$@ DEST=./$(IMAGES)
|
||||
|
||||
trustd: ## Builds the trustd container image. The build result will be output to the specified local destination.
|
||||
@$(MAKE) docker-$@ DEST=./$(IMAGES)
|
||||
|
||||
apps: apid machined networkd ntpd osd trustd ## Builds all apps (apid, machined, networkd, ntpd, osd, and trustd).
|
||||
|
||||
# Local Artifacts
|
||||
|
||||
.PHONY: kernel
|
||||
@ -135,17 +112,17 @@ kernel: ## Outputs the kernel package contents (vmlinuz, and vmlinux) to the art
|
||||
@-rm -rf $(ARTIFACTS)/modules
|
||||
|
||||
.PHONY: initramfs
|
||||
initramfs: apps ## Builds the compressed initramfs and outputs it to the artifact directory.
|
||||
@$(MAKE) local-$@ DEST=$(ARTIFACTS)
|
||||
initramfs: ## Builds the compressed initramfs and outputs it to the artifact directory.
|
||||
@$(MAKE) local-$@ DEST=$(ARTIFACTS) TARGET_ARGS="--allow security.insecure"
|
||||
|
||||
.PHONY: installer
|
||||
installer: apps ## Builds the container image for the installer and outputs it to the artifact directory.
|
||||
@$(MAKE) docker-$@ DEST=$(ARTIFACTS)
|
||||
installer: ## Builds the container image for the installer and outputs it to the artifact directory.
|
||||
@$(MAKE) docker-$@ DEST=$(ARTIFACTS) TARGET_ARGS="--allow security.insecure"
|
||||
@docker load < $(ARTIFACTS)/$@.tar
|
||||
|
||||
.PHONY: talos
|
||||
talos: apps ## Builds the Talos container image and outputs it to the artifact directory.
|
||||
@$(MAKE) docker-$@ DEST=$(ARTIFACTS)
|
||||
talos: ## Builds the Talos container image and outputs it to the artifact directory.
|
||||
@$(MAKE) docker-$@ DEST=$(ARTIFACTS) TARGET_ARGS="--allow security.insecure"
|
||||
@mv $(ARTIFACTS)/$@.tar $(ARTIFACTS)/container.tar
|
||||
@docker load < $(ARTIFACTS)/container.tar
|
||||
|
||||
@ -182,7 +159,7 @@ lint: ## Runs linters on go, protobuf, and markdown file types.
|
||||
# Tests
|
||||
|
||||
.PHONY: unit-tests
|
||||
unit-tests: apps ## Performs unit tests.
|
||||
unit-tests: ## Performs unit tests.
|
||||
@$(MAKE) local-$@ DEST=$(ARTIFACTS) TARGET_ARGS="--allow security.insecure"
|
||||
|
||||
.PHONY: unit-tests-race
|
||||
|
@ -188,19 +188,13 @@ local Pipeline(name, steps=[], depends_on=[], with_docker=true, disable_clone=fa
|
||||
|
||||
// Default pipeline.
|
||||
|
||||
local machined = Step("machined", depends_on=[setup_ci]);
|
||||
local osd = Step("osd", depends_on=[setup_ci]);
|
||||
local trustd = Step("trustd", depends_on=[setup_ci]);
|
||||
local ntpd = Step("ntpd", depends_on=[setup_ci]);
|
||||
local networkd = Step("networkd", depends_on=[setup_ci]);
|
||||
local apid = Step("apid", depends_on=[setup_ci]);
|
||||
local osctl_linux = Step("osctl-linux", depends_on=[setup_ci]);
|
||||
local osctl_darwin = Step("osctl-darwin", depends_on=[setup_ci]);
|
||||
local docs = Step("docs", depends_on=[osctl_linux]);
|
||||
local kernel = Step('kernel', depends_on=[setup_ci]);
|
||||
local initramfs = Step("initramfs", depends_on=[apid, machined, networkd, ntpd, osd, trustd]);
|
||||
local initramfs = Step("initramfs", depends_on=[setup_ci]);
|
||||
local installer = Step("installer", depends_on=[initramfs]);
|
||||
local talos = Step("talos", depends_on=[installer]);
|
||||
local talos = Step("talos", depends_on=[initramfs]);
|
||||
local golint = Step("lint-go", depends_on=[setup_ci]);
|
||||
local protobuflint = Step("lint-protobuf", depends_on=[setup_ci]);
|
||||
local markdownlint = Step("lint-markdown", depends_on=[setup_ci]);
|
||||
@ -209,10 +203,10 @@ local image_azure = Step("image-azure", depends_on=[installer]);
|
||||
local image_digital_ocean = Step("image-digital-ocean", depends_on=[installer]);
|
||||
local image_gcp = Step("image-gcp", depends_on=[installer]);
|
||||
local image_vmware = Step("image-vmware", depends_on=[installer]);
|
||||
local unit_tests = Step("unit-tests", depends_on=[talos]);
|
||||
local unit_tests = Step("unit-tests", depends_on=[initramfs]);
|
||||
local unit_tests_race = Step("unit-tests-race", depends_on=[golint]);
|
||||
local e2e_docker = Step("e2e-docker", depends_on=[unit_tests, talos, osctl_linux]);
|
||||
local e2e_firecracker = Step("e2e-firecracker", privileged=true, depends_on=[unit_tests, osctl_linux, kernel]);
|
||||
local e2e_docker = Step("e2e-docker", depends_on=[talos, osctl_linux]);
|
||||
local e2e_firecracker = Step("e2e-firecracker", privileged=true, depends_on=[initramfs, osctl_linux, kernel]);
|
||||
|
||||
local coverage = {
|
||||
name: 'coverage',
|
||||
@ -275,12 +269,6 @@ local push_latest = {
|
||||
|
||||
local default_steps = [
|
||||
setup_ci,
|
||||
machined,
|
||||
osd,
|
||||
apid,
|
||||
trustd,
|
||||
ntpd,
|
||||
networkd,
|
||||
osctl_linux,
|
||||
osctl_darwin,
|
||||
docs,
|
||||
|
Loading…
Reference in New Issue
Block a user