如果像example这样的锚点用于定义可重复使用的部分,但我想为expire_in
的每次重复使用分别定义artifacts
关键字的.templ: &save_ipk
stage: build
script:
- ls package/*.ipk
artifacts:
paths:
- package/*.ipk
#...
save_ipk_tags:
<<: *save_ipk
expire_in: 6 months
only:
- tags
save_ipk_mr:
<<: *save_ipk
expire_in: 1 month
only:
- merge_requests
属性模板,CI Linter报告:
错误:():在...(使用* save_ipk的行)上解析块映射时,找不到所需的键
save_ipk
我本来希望模板expire_in
的内容被合并,然后artifacts
属性在import time
import tkinter as tk
from tkinter import ttk
para1_range = [0,1,2,3,4,5,6,7,8,9,10]
MAX = len(para1_range)
count = 0
for k in range(0,len(para1_range)):
time.sleep(1)
root = tk.Tk()
root.geometry('{}x{}'.format(400, 100))
progress_var = tk.DoubleVar() #here you have ints but when calc. %'s usually floats
theLabel = tk.Label(root, text="Sample text to show")
theLabel.pack()
progressbar = ttk.Progressbar(root, variable=progress_var, maximum=MAX, mode="determinate")
progressbar.pack(fill=tk.X, expand=1)
def loop_function():
while count <= MAX:
### some work to be done
progress_var.set(count)
root.update_idletasks()
root.after(100, loop_function)
count += 1
loop_function()
root.mainloop()
下很好(就像用C预处理器替代)。我唯一的解决方案是取出模板的整个工件部分,然后重复进行。