Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Jperf425WorkaroundMysqlDatabase(
}

/**
* Copy-pasted verbatim from [infrastructure:4.11.0](https://github.com/atlassian/infrastructure/blob/release-4.11.0/src/main/kotlin/com/atlassian/performance/tools/infrastructure/Docker.kt)
* Copy-pasted verbatim from [infrastructure](https://github.com/atlassian/infrastructure/blob/master/src/main/kotlin/com/atlassian/performance/tools/infrastructure/Docker.kt)
Copy link
Contributor

Choose a reason for hiding this comment

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

master is a moving target, but this copy-paste is static.

Copy link
Author

Choose a reason for hiding this comment

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

Well, the usefulness of this comment is limited to the point where you have to update the Docker copy, I don't think including the version number makes it more useful.

Copy link
Contributor

@dagguh dagguh May 12, 2020

Choose a reason for hiding this comment

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

What's the usefulness of imprecision? Whenever master moves forward, this comment is no longer accurate. The bigger the gap from the actual source to master, the more it misleads. Especially if master goes to 5.x.y and e.g. nukes the internal class Docker out of existence. Or, hey infra has added a support for XYZ, but we already are allegedly copied from master, so we don't have to resync it, right?

* It's here just to interject the Docker install and MySQL setup with a Docker start.
*/
private class CopyPastedDocker {
Expand All @@ -48,15 +48,15 @@ private class CopyPastedDocker {
),
timeout = Duration.ofMinutes(2)
)
ssh.execute("sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 7EA0A9C3F273FCD8")

val release = ssh.execute("lsb_release -cs").output
val repository = "deb [arch=amd64] https://download.docker.com/linux/ubuntu $release stable"
ssh.execute("sudo add-apt-repository \"$repository\"")
ssh.execute("curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -")
val version = "17.09.0~ce-0~ubuntu"
ssh.execute("sudo add-apt-repository 'deb [arch=amd64] https://download.docker.com/linux/ubuntu $release stable'")
val version = "5:19.03.8~3-0~ubuntu-$release"
ubuntu.install(
ssh = ssh,
packages = listOf("docker-ce=$version"),
timeout = Duration.ofSeconds(180)
timeout = Duration.ofMinutes(5)
)
}
}