Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ping/_composition: use latest release in interop-latest #37

Merged
merged 1 commit into from Sep 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 7 additions & 19 deletions ping/_compositions/go-rust-interop-latest.toml
@@ -1,5 +1,5 @@
[metadata]
name = "go-rust-cross-version"
name = "go-rust-cross-version-{{ or $.Env.InteropTarget "-" }}-{{ or $.Env.GitReference "" }}"

[global]
plan = "libp2p/ping"
Expand All @@ -14,38 +14,26 @@
go_proxy_url = "https://proxy.golang.org"

{{ with (load_resource "./go.toml") }}
{{ with .master }}
{{ with (index .groups 0) }}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marten-seemann No worries, I requested your review regarding the feature itself,

nothing much to see in the code, quick overview:

This PR replaces the use of the master version with the latest release registered in .groups (loaded from the go.toml file)

[[groups]]
id = "go-master"
id = "go-latest-{{ .Id }}"
instances = { count = 1 }
builder = "docker:go"

[groups.build]
selectors = ['{{ .Selector }}']

[[groups.build.dependencies]]
module = "github.com/libp2p/go-libp2p"
version = "master"

[groups.build_config]
path = "./go/"
build_base_image = 'golang:{{ .GoVersion }}-buster'
modfile = "{{ .Modfile }}"

[groups.build_config.dockerfile_extensions]
# deal with dependency changes in master until we create the new vx.y.z instance
pre_build = """
RUN cd ${PLAN_DIR} && \
go mod download github.com/libp2p/go-libp2p && \
go mod tidy -compat={{ .GoVersion }}
"""
{{ end }}

{{ if eq $.Env.InteropTarget "go" }}
{{ if $.Env.GitReference }}
{{ with .custom }}
[[groups]]
id = "custom-go"
id = "go-custom-{{ $.Env.GitReference }}"
instances = { count = 1 }
builder = "docker:go"

Expand Down Expand Up @@ -77,9 +65,9 @@
{{ end }}

{{ with (load_resource "./rust.toml") }}
{{ with .master }}
{{ with (index .groups 0) }}
[[groups]]
id = "rust-master"
id = "rust-latest-{{ .Id }}"
instances = { count = 1 }
builder = "docker:generic"

Expand All @@ -94,7 +82,7 @@
{{ if $.Env.GitReference }}
{{ with .custom }}
[[groups]]
id = "custom-rust"
id = "rust-custom-{{ $.Env.GitReference }}"
instances = { count = 1 }
builder = "docker:generic"

Expand Down