Skip to content

Commit c1c6ff1

Browse files
authored
Merge pull request #13 from rocq-community/pin-rocq-core
Also pin `rocq-core`
2 parents 131b3f3 + 59f232d commit c1c6ff1

File tree

3 files changed

+21
-12
lines changed

3 files changed

+21
-12
lines changed

external/docker-keeper/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.10.14
1+
0.11.1

external/docker-keeper/keeper.py

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,11 @@ def get_commit(commit_api):
253253
% (naive_url_encode(repo), naive_url_encode(branch)))
254254
headers = None
255255
lambda_query = gitlab_lambda_query_sha1
256+
elif fetcher == 'gitlab.inria.fr':
257+
url = ('https://%s/api/v4/projects/%s/repository/branches/%s'
258+
% (fetcher, naive_url_encode(repo), naive_url_encode(branch)))
259+
headers = None
260+
lambda_query = gitlab_lambda_query_sha1
256261
else:
257262
error("Error: do not support 'fetcher: %s'" % fetcher)
258263
return get_url(url, headers, None, lambda_query)
@@ -363,18 +368,18 @@ def get_list_dict_dockerfile_matrix_tags_args(json, debug):
363368
args1 = json['args'] if 'args' in json else {}
364369
gvars = json['vars'] if 'vars' in json else {}
365370
# = global vars, interpolated in:
371+
# - dockerfile
366372
# - args
367373
# - build.args
368374
# - build.tags
369375
# - build.after_deploy_export
370376
for item in images:
371377
list_matrix = product_build_matrix(item['matrix'])
372378
if 'dockerfile' in item['build']:
373-
dfile = check_trim_relative_path(item['build']['dockerfile'])
379+
dfile_templ = check_trim_relative_path(item['build']['dockerfile'])
374380
else:
375-
dfile = 'Dockerfile'
376-
context = check_trim_relative_path(item['build']['context'])
377-
path = '%s/%s' % (context, dfile)
381+
dfile_templ = 'Dockerfile'
382+
context_templ = check_trim_relative_path(item['build']['context'])
378383
raw_tags = item['build']['tags']
379384
args2 = item['build']['args'] if 'args' in item['build'] else {}
380385
raw_args = merge_dict(args1, args2)
@@ -454,6 +459,9 @@ def get_list_dict_dockerfile_matrix_tags_args(json, debug):
454459
if eval_if(script_cond, matrix, gvars):
455460
# otherwise skip the script item
456461
after_deploy_script.append(script_item)
462+
dfile = eval_bashlike(dfile_templ, matrix, gvars) # NOT defaults
463+
context = eval_bashlike(context_templ, matrix, gvars) # idem
464+
path = '%s/%s' % (context, dfile)
457465
newitem = {"context": context, "dockerfile": dfile,
458466
"path": path,
459467
"matrix": matrix, "tags": tags, "args": args,
@@ -1524,12 +1532,14 @@ def main(argv):
15241532
# $ py.test bash_formatter.py
15251533

15261534
def test_get_commit():
1527-
github = {"fetcher": "github", "repo": "coq/coq", "branch": "v8.0"}
1528-
github_expected = "f7777da84893a182f566667426d13dd43f2ee45a"
1535+
github = {"fetcher": "github", "repo": "rocq-prover/rocq",
1536+
"branch": "v8.1"}
1537+
github_expected = "f7cdf553d983a79fe0fbb08403f6a55230016074"
15291538
github_actual = get_commit(github)
15301539
assert github_actual == github_expected
1531-
gitlab = {"fetcher": "gitlab", "repo": "coq/coq", "branch": "v8.0"}
1532-
gitlab_expected = "f7777da84893a182f566667426d13dd43f2ee45a"
1540+
gitlab = {"fetcher": "gitlab.inria.fr", "repo": "coq/coq",
1541+
"branch": "v8.1"}
1542+
gitlab_expected = "f7cdf553d983a79fe0fbb08403f6a55230016074"
15331543
gitlab_actual = get_commit(gitlab)
15341544
assert gitlab_actual == gitlab_expected
15351545

rocq/stable/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ RUN set -x \
1616
&& opam update -y -u \
1717
&& opam pin add -n -k version rocq-stdlib ${ROCQ_VERSION} \
1818
&& opam pin add -n -k version rocq-prover ${ROCQ_VERSION} \
19-
# We need not pin rocq-core nor rocq-runtime
20-
# as rocq-prover => "rocq-core" {= version}
21-
# and rocq-core => "rocq-runtime" {= version}
19+
&& opam pin add -n -k version rocq-core ${ROCQ_VERSION} \
20+
&& opam pin add -n -k version rocq-runtime ${ROCQ_VERSION} \
2221
&& opam pin add -n -k version coqide-server ${ROCQ_VERSION} \
2322
# We don't install coq-core nor coq as they're transitional pkgs whose install time is negligible
2423
&& opam install -y -v -j "${NJOBS}" rocq-prover coqide-server ${ROCQ_EXTRA_OPAM} \

0 commit comments

Comments
 (0)