Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion external/docker-keeper/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.10.14
0.11.1
26 changes: 18 additions & 8 deletions external/docker-keeper/keeper.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,11 @@ def get_commit(commit_api):
% (naive_url_encode(repo), naive_url_encode(branch)))
headers = None
lambda_query = gitlab_lambda_query_sha1
elif fetcher == 'gitlab.inria.fr':
url = ('https://%s/api/v4/projects/%s/repository/branches/%s'
% (fetcher, naive_url_encode(repo), naive_url_encode(branch)))
headers = None
lambda_query = gitlab_lambda_query_sha1
else:
error("Error: do not support 'fetcher: %s'" % fetcher)
return get_url(url, headers, None, lambda_query)
Expand Down Expand Up @@ -363,18 +368,18 @@ def get_list_dict_dockerfile_matrix_tags_args(json, debug):
args1 = json['args'] if 'args' in json else {}
gvars = json['vars'] if 'vars' in json else {}
# = global vars, interpolated in:
# - dockerfile
# - args
# - build.args
# - build.tags
# - build.after_deploy_export
for item in images:
list_matrix = product_build_matrix(item['matrix'])
if 'dockerfile' in item['build']:
dfile = check_trim_relative_path(item['build']['dockerfile'])
dfile_templ = check_trim_relative_path(item['build']['dockerfile'])
else:
dfile = 'Dockerfile'
context = check_trim_relative_path(item['build']['context'])
path = '%s/%s' % (context, dfile)
dfile_templ = 'Dockerfile'
context_templ = check_trim_relative_path(item['build']['context'])
raw_tags = item['build']['tags']
args2 = item['build']['args'] if 'args' in item['build'] else {}
raw_args = merge_dict(args1, args2)
Expand Down Expand Up @@ -454,6 +459,9 @@ def get_list_dict_dockerfile_matrix_tags_args(json, debug):
if eval_if(script_cond, matrix, gvars):
# otherwise skip the script item
after_deploy_script.append(script_item)
dfile = eval_bashlike(dfile_templ, matrix, gvars) # NOT defaults
context = eval_bashlike(context_templ, matrix, gvars) # idem
path = '%s/%s' % (context, dfile)
newitem = {"context": context, "dockerfile": dfile,
"path": path,
"matrix": matrix, "tags": tags, "args": args,
Expand Down Expand Up @@ -1524,12 +1532,14 @@ def main(argv):
# $ py.test bash_formatter.py

def test_get_commit():
github = {"fetcher": "github", "repo": "coq/coq", "branch": "v8.0"}
github_expected = "f7777da84893a182f566667426d13dd43f2ee45a"
github = {"fetcher": "github", "repo": "rocq-prover/rocq",
"branch": "v8.1"}
github_expected = "f7cdf553d983a79fe0fbb08403f6a55230016074"
github_actual = get_commit(github)
assert github_actual == github_expected
gitlab = {"fetcher": "gitlab", "repo": "coq/coq", "branch": "v8.0"}
gitlab_expected = "f7777da84893a182f566667426d13dd43f2ee45a"
gitlab = {"fetcher": "gitlab.inria.fr", "repo": "coq/coq",
"branch": "v8.1"}
gitlab_expected = "f7cdf553d983a79fe0fbb08403f6a55230016074"
gitlab_actual = get_commit(gitlab)
assert gitlab_actual == gitlab_expected

Expand Down
5 changes: 2 additions & 3 deletions rocq/stable/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ RUN set -x \
&& opam update -y -u \
&& opam pin add -n -k version rocq-stdlib ${ROCQ_VERSION} \
&& opam pin add -n -k version rocq-prover ${ROCQ_VERSION} \
# We need not pin rocq-core nor rocq-runtime
# as rocq-prover => "rocq-core" {= version}
# and rocq-core => "rocq-runtime" {= version}
&& opam pin add -n -k version rocq-core ${ROCQ_VERSION} \
&& opam pin add -n -k version rocq-runtime ${ROCQ_VERSION} \
&& opam pin add -n -k version coqide-server ${ROCQ_VERSION} \
# We don't install coq-core nor coq as they're transitional pkgs whose install time is negligible
&& opam install -y -v -j "${NJOBS}" rocq-prover coqide-server ${ROCQ_EXTRA_OPAM} \
Expand Down