@@ -59,13 +59,10 @@ _commit := `git rev-parse HEAD`
5959
6060# The git branch we are currnetly on
6161
62- [private ]
63- _branch := ` git rev-parse --abbrev-ref HEAD | sed ' s/[^a-zA-Z0-9]/-/g' `
64-
6562# The slug is the branch name (sanitized) with a marker if the tree is dirty
6663
6764[private ]
68- _slug := (if _clean == " clean" { " " } else { " dirty." }) + _branch
65+ _slug := (if _clean == " clean" { " " } else { " dirty." }) + _commit
6966
7067# The name of the doc-env container
7168
@@ -77,11 +74,11 @@ _doc_env_container_name := container_repo + "/doc-env"
7774[private ]
7875_compile_env_container_name := container_repo + " /compile-env"
7976[private ]
80- _frr_container_name := container_repo + " /frr"
77+ _frr_container_name := container_repo + " /frr-" + profile
8178[private ]
8279_libc_container_name := container_repo + " /libc-env"
8380[private ]
84- _mstflint_container_name := container_repo + " /mstflint"
81+ _mstflint_container_name := container_repo + " /mstflint-" + profile
8582
8683# This is a unique identifier for the build.
8784# We temporarily tag our containers with this id so that we can be certain that we are
@@ -122,11 +119,9 @@ _nix_build attribute:
122119 - f default.nix \
123120 " {{ attribute }} " \
124121 - -out-link " /tmp/dpdk-sys/builds/{{ attribute }} " \
125- - -argstr onlyRunDeps false \
126122 - -argstr container-repo " {{ container_repo }} " \
127123 - -argstr image-tag " {{ _build-id }} " \
128124 - -argstr rust-channel " {{ rust }} " \
129- - -argstr profile " {{ profile }} " \
130125 " -j{{ max_nix_builds }} " \
131126 ` if [ " {{ cores }}" != " all" ]; then echo --cores " {{ cores }}" ; fi `
132127
@@ -150,7 +145,6 @@ _build-container target container-name: (_nix_build ("container." + target))
150145 docker load --input / tmp/ dpdk-sys/ builds/ container.{{ target }}
151146 docker build \
152147 - -label " git.commit={{ _commit }} " \
153- - -label " git.branch={{ _branch }} " \
154148 - -label " git.tree-state={{ _clean }} " \
155149 - -label " build.date=${build_date}" \
156150 - -label " build.timestamp={{ _build_time }} " \
@@ -183,18 +177,7 @@ _build-container target container-name: (_nix_build ("container." + target))
183177 .
184178 docker tag \
185179 " {{ container-name }} :post-{{ _build-id }} " \
186- " {{ container-name }} :{{ _slug }} .{{ profile }} "
187- docker tag \
188- " {{ container-name }} :post-{{ _build-id }} " \
189- " {{ container-name }} :{{ _commit }} .{{ profile }} "
190- if [ " {{ profile }} " = " release" ]; then
191- docker tag \
192- " {{ container-name }} :post-{{ _build-id }} " \
193- " {{ container-name }} :{{ _slug }} "
194- docker tag \
195- " {{ container-name }} :post-{{ _build-id }} " \
196- " {{ container-name }} :{{ _commit }} "
197- fi
180+ " {{ container-name }} :{{ _slug }} "
198181 docker rmi " {{ container-name }} :{{ _build-id }} "
199182 docker rmi " {{ container-name }} :post-{{ _build-id }} "
200183
@@ -208,10 +191,10 @@ build-compile-env-container: build-sysroot (_build-container "compile-env" _comp
208191build-frr-container : (_build-container " frr-" + profile _frr_container_name)
209192
210193# Build and tag the libc container
211- build-libc-container : (_build-container " libc-env-" + profile _libc_container_name)
194+ build-libc-container : (_build-container " libc-env" _libc_container_name)
212195
213196# Build and tag the libc container
214- build-mstflint-container : (_build-container " mstflint-" + profile _mstflint_container_name)
197+ build-mstflint-container : (_build-container " mstflint" _mstflint_container_name)
215198
216199# Build the sysroot, and compile-env containers
217200build : build-sysroot build-libc-container build-frr-container build-compile-env-container build-doc-env-container
@@ -221,16 +204,11 @@ build: build-sysroot build-libc-container build-frr-container build-compile-env-
221204push : build
222205 {{ _just_debug_ }}
223206 docker push " {{ _compile_env_container_name }} :{{ _slug }} "
224- docker push " {{ _compile_env_container_name }} :{{ _commit }} "
225207 docker push " {{ _doc_env_container_name }} :{{ _slug }} "
226- docker push " {{ _doc_env_container_name }} :{{ _commit }} "
227- docker push " {{ _frr_container_name }} :{{ _slug }} .{{ profile }} "
228- docker push " {{ _frr_container_name }} :{{ _commit }} .{{ profile }} "
229- docker push " {{ _libc_container_name }} :{{ _slug }} .{{ profile }} "
230- docker push " {{ _libc_container_name }} :{{ _commit }} .{{ profile }} "
208+ docker push " {{ _frr_container_name }} :{{ _slug }} "
209+ docker push " {{ _libc_container_name }} :{{ _slug }} "
231210 # Temporary comment to reduce build times
232- # docker push "{{ _mstflint_container_name }}:{{ _slug }}.{{ profile }}"
233- # docker push "{{ _mstflint_container_name }}:{{ _commit }}.{{ profile }}"
211+ # docker push "{{ _mstflint_container_name }}:{{ _slug }}"
234212
235213# Delete all the old generations of the nix store and run the garbage collector
236214[script ]
0 commit comments