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

Add chromium container #1

Merged
merged 2 commits into from
Jan 9, 2019
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
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ Adding a requirement of a major version of a dependency is breaking a contract.
Dropping a requirement of a major version of a dependency is a new contract.

## [Unreleased]
[Unreleased]: https://bitbucket.org/atlassian/docker-infrastructure/branches/compare/master%0Dinitial-commit
[Unreleased]: https://bitbucket.org/atlassian/docker-infrastructure/branches/compare/master%0Drelease-0.1.0

## [0.1.0] - 2018-12-13
[0.1.0]: https://bitbucket.org/atlassian/virtual-users/branches/compare/release-0.1.0%0Dinitial-commit

### Added
- Jira Core formula.
- Shared network.
- Dockerised Chrome browser.
5 changes: 5 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,17 @@ configurations.all {
when (requested.module.toString()) {
"org.slf4j:slf4j-api" -> useVersion("1.8.0-alpha2")
"org.jetbrains:annotations" -> useVersion("13.0")
"commons-codec:commons-codec" -> useVersion("1.10")
"com.google.code.findbugs:jsr305" -> useVersion("1.3.9")
"org.apache.httpcomponents:httpclient" -> useVersion("4.5.5")
"org.apache.httpcomponents:httpcore" -> useVersion("4.4.9")
}
}
}
}

dependencies {
api("org.seleniumhq.selenium:selenium-support:3.11.0")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion")
implementation("org.testcontainers:testcontainers:1.9.1")
implementation("org.testcontainers:selenium:1.9.1")
Expand Down
19 changes: 18 additions & 1 deletion gradle/dependency-locks/compileClasspath.lockfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,32 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
com.google.code.findbugs:jsr305:3.0.2
com.google.code.findbugs:jsr305:1.3.9
com.google.code.gson:gson:2.8.2
com.google.errorprone:error_prone_annotations:2.1.3
com.google.guava:guava:23.6-jre
com.google.j2objc:j2objc-annotations:1.1
com.kohlschutter.junixsocket:junixsocket-common:2.0.4
com.kohlschutter.junixsocket:junixsocket-native-common:2.0.4
com.squareup.okhttp3:okhttp:3.9.1
com.squareup.okio:okio:1.13.0
commons-codec:commons-codec:1.10
commons-logging:commons-logging:1.2
javax.annotation:javax.annotation-api:1.3.1
javax.xml.bind:jaxb-api:2.3.0
junit:junit:4.12
net.bytebuddy:byte-buddy:1.7.9
net.java.dev.jna:jna-platform:4.5.1
net.java.dev.jna:jna:4.5.1
org.apache.commons:commons-compress:1.16.1
org.apache.commons:commons-exec:1.3
org.apache.httpcomponents:httpclient:4.5.5
org.apache.httpcomponents:httpcore:4.4.9
org.apache.logging.log4j:log4j-api:2.10.0
org.apache.logging.log4j:log4j-core:2.10.0
org.apache.logging.log4j:log4j-slf4j-impl:2.10.0
org.checkerframework:checker-compat-qual:2.0.0
org.codehaus.mojo:animal-sniffer-annotations:1.14
org.hamcrest:hamcrest-core:1.3
org.jetbrains.kotlin:kotlin-stdlib-common:1.2.70
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.70
Expand All @@ -24,6 +38,9 @@ org.rnorth.duct-tape:duct-tape:1.0.7
org.rnorth.visible-assertions:visible-assertions:2.1.1
org.rnorth:tcp-unix-socket-proxy:1.0.2
org.scijava:native-lib-loader:2.0.2
org.seleniumhq.selenium:selenium-api:3.11.0
org.seleniumhq.selenium:selenium-remote-driver:3.11.0
org.seleniumhq.selenium:selenium-support:3.11.0
org.slf4j:slf4j-api:1.8.0-alpha2
org.slf4j:slf4j-ext:1.7.25
org.testcontainers:selenium:1.9.1
Expand Down
19 changes: 18 additions & 1 deletion gradle/dependency-locks/default.lockfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,32 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
com.google.code.findbugs:jsr305:3.0.2
com.google.code.findbugs:jsr305:1.3.9
com.google.code.gson:gson:2.8.2
com.google.errorprone:error_prone_annotations:2.1.3
com.google.guava:guava:23.6-jre
com.google.j2objc:j2objc-annotations:1.1
com.kohlschutter.junixsocket:junixsocket-common:2.0.4
com.kohlschutter.junixsocket:junixsocket-native-common:2.0.4
com.squareup.okhttp3:okhttp:3.9.1
com.squareup.okio:okio:1.13.0
commons-codec:commons-codec:1.10
commons-logging:commons-logging:1.2
javax.annotation:javax.annotation-api:1.3.1
javax.xml.bind:jaxb-api:2.3.0
junit:junit:4.12
net.bytebuddy:byte-buddy:1.7.9
net.java.dev.jna:jna-platform:4.5.1
net.java.dev.jna:jna:4.5.1
org.apache.commons:commons-compress:1.16.1
org.apache.commons:commons-exec:1.3
org.apache.httpcomponents:httpclient:4.5.5
org.apache.httpcomponents:httpcore:4.4.9
org.apache.logging.log4j:log4j-api:2.10.0
org.apache.logging.log4j:log4j-core:2.10.0
org.apache.logging.log4j:log4j-slf4j-impl:2.10.0
org.checkerframework:checker-compat-qual:2.0.0
org.codehaus.mojo:animal-sniffer-annotations:1.14
org.hamcrest:hamcrest-core:1.3
org.jetbrains.kotlin:kotlin-stdlib-common:1.2.70
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.70
Expand All @@ -24,6 +38,9 @@ org.rnorth.duct-tape:duct-tape:1.0.7
org.rnorth.visible-assertions:visible-assertions:2.1.1
org.rnorth:tcp-unix-socket-proxy:1.0.2
org.scijava:native-lib-loader:2.0.2
org.seleniumhq.selenium:selenium-api:3.11.0
org.seleniumhq.selenium:selenium-remote-driver:3.11.0
org.seleniumhq.selenium:selenium-support:3.11.0
org.slf4j:slf4j-api:1.8.0-alpha2
org.slf4j:slf4j-ext:1.7.25
org.testcontainers:selenium:1.9.1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,32 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
com.google.code.findbugs:jsr305:3.0.2
com.google.code.findbugs:jsr305:1.3.9
com.google.code.gson:gson:2.8.2
com.google.errorprone:error_prone_annotations:2.1.3
com.google.guava:guava:23.6-jre
com.google.j2objc:j2objc-annotations:1.1
com.kohlschutter.junixsocket:junixsocket-common:2.0.4
com.kohlschutter.junixsocket:junixsocket-native-common:2.0.4
com.squareup.okhttp3:okhttp:3.9.1
com.squareup.okio:okio:1.13.0
commons-codec:commons-codec:1.10
commons-logging:commons-logging:1.2
javax.annotation:javax.annotation-api:1.3.1
javax.xml.bind:jaxb-api:2.3.0
junit:junit:4.12
net.bytebuddy:byte-buddy:1.7.9
net.java.dev.jna:jna-platform:4.5.1
net.java.dev.jna:jna:4.5.1
org.apache.commons:commons-compress:1.16.1
org.apache.commons:commons-exec:1.3
org.apache.httpcomponents:httpclient:4.5.5
org.apache.httpcomponents:httpcore:4.4.9
org.apache.logging.log4j:log4j-api:2.10.0
org.apache.logging.log4j:log4j-core:2.10.0
org.apache.logging.log4j:log4j-slf4j-impl:2.10.0
org.checkerframework:checker-compat-qual:2.0.0
org.codehaus.mojo:animal-sniffer-annotations:1.14
org.hamcrest:hamcrest-core:1.3
org.jetbrains.kotlin:kotlin-stdlib-common:1.2.70
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.70
Expand All @@ -24,6 +38,9 @@ org.rnorth.duct-tape:duct-tape:1.0.7
org.rnorth.visible-assertions:visible-assertions:2.1.1
org.rnorth:tcp-unix-socket-proxy:1.0.2
org.scijava:native-lib-loader:2.0.2
org.seleniumhq.selenium:selenium-api:3.11.0
org.seleniumhq.selenium:selenium-remote-driver:3.11.0
org.seleniumhq.selenium:selenium-support:3.11.0
org.slf4j:slf4j-api:1.8.0-alpha2
org.slf4j:slf4j-ext:1.7.25
org.testcontainers:selenium:1.9.1
Expand Down
19 changes: 18 additions & 1 deletion gradle/dependency-locks/runtimeClasspath.lockfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,32 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
com.google.code.findbugs:jsr305:3.0.2
com.google.code.findbugs:jsr305:1.3.9
com.google.code.gson:gson:2.8.2
com.google.errorprone:error_prone_annotations:2.1.3
com.google.guava:guava:23.6-jre
com.google.j2objc:j2objc-annotations:1.1
com.kohlschutter.junixsocket:junixsocket-common:2.0.4
com.kohlschutter.junixsocket:junixsocket-native-common:2.0.4
com.squareup.okhttp3:okhttp:3.9.1
com.squareup.okio:okio:1.13.0
commons-codec:commons-codec:1.10
commons-logging:commons-logging:1.2
javax.annotation:javax.annotation-api:1.3.1
javax.xml.bind:jaxb-api:2.3.0
junit:junit:4.12
net.bytebuddy:byte-buddy:1.7.9
net.java.dev.jna:jna-platform:4.5.1
net.java.dev.jna:jna:4.5.1
org.apache.commons:commons-compress:1.16.1
org.apache.commons:commons-exec:1.3
org.apache.httpcomponents:httpclient:4.5.5
org.apache.httpcomponents:httpcore:4.4.9
org.apache.logging.log4j:log4j-api:2.10.0
org.apache.logging.log4j:log4j-core:2.10.0
org.apache.logging.log4j:log4j-slf4j-impl:2.10.0
org.checkerframework:checker-compat-qual:2.0.0
org.codehaus.mojo:animal-sniffer-annotations:1.14
org.hamcrest:hamcrest-core:1.3
org.jetbrains.kotlin:kotlin-stdlib-common:1.2.70
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.70
Expand All @@ -24,6 +38,9 @@ org.rnorth.duct-tape:duct-tape:1.0.7
org.rnorth.visible-assertions:visible-assertions:2.1.1
org.rnorth:tcp-unix-socket-proxy:1.0.2
org.scijava:native-lib-loader:2.0.2
org.seleniumhq.selenium:selenium-api:3.11.0
org.seleniumhq.selenium:selenium-remote-driver:3.11.0
org.seleniumhq.selenium:selenium-support:3.11.0
org.slf4j:slf4j-api:1.8.0-alpha2
org.slf4j:slf4j-ext:1.7.25
org.testcontainers:selenium:1.9.1
Expand Down
15 changes: 14 additions & 1 deletion gradle/dependency-locks/testCompileClasspath.lockfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,33 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
com.google.code.findbugs:jsr305:3.0.2
com.google.code.findbugs:jsr305:1.3.9
com.google.code.gson:gson:2.8.2
com.google.errorprone:error_prone_annotations:2.1.3
com.google.guava:guava:23.6-jre
com.google.j2objc:j2objc-annotations:1.1
com.kohlschutter.junixsocket:junixsocket-common:2.0.4
com.kohlschutter.junixsocket:junixsocket-native-common:2.0.4
com.squareup.okhttp3:okhttp:3.9.1
com.squareup.okio:okio:1.13.0
commons-codec:commons-codec:1.10
commons-logging:commons-logging:1.2
javax.annotation:javax.annotation-api:1.3.1
javax.xml.bind:jaxb-api:2.3.0
junit:junit:4.12
net.bytebuddy:byte-buddy:1.7.9
net.java.dev.jna:jna-platform:4.5.1
net.java.dev.jna:jna:4.5.1
org.apache.commons:commons-compress:1.16.1
org.apache.commons:commons-exec:1.3
org.apache.httpcomponents:httpclient:4.5.5
org.apache.httpcomponents:httpcore:4.4.9
org.apache.logging.log4j:log4j-api:2.10.0
org.apache.logging.log4j:log4j-core:2.10.0
org.apache.logging.log4j:log4j-slf4j-impl:2.10.0
org.assertj:assertj-core:3.11.0
org.checkerframework:checker-compat-qual:2.0.0
org.codehaus.mojo:animal-sniffer-annotations:1.14
org.hamcrest:hamcrest-core:1.3
org.jetbrains.kotlin:kotlin-stdlib-common:1.2.70
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.70
Expand All @@ -29,6 +39,9 @@ org.rnorth.duct-tape:duct-tape:1.0.7
org.rnorth.visible-assertions:visible-assertions:2.1.1
org.rnorth:tcp-unix-socket-proxy:1.0.2
org.scijava:native-lib-loader:2.0.2
org.seleniumhq.selenium:selenium-api:3.11.0
org.seleniumhq.selenium:selenium-remote-driver:3.11.0
org.seleniumhq.selenium:selenium-support:3.11.0
org.slf4j:slf4j-api:1.8.0-alpha2
org.slf4j:slf4j-ext:1.7.25
org.testcontainers:selenium:1.9.1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,33 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
com.google.code.findbugs:jsr305:3.0.2
com.google.code.findbugs:jsr305:1.3.9
com.google.code.gson:gson:2.8.2
com.google.errorprone:error_prone_annotations:2.1.3
com.google.guava:guava:23.6-jre
com.google.j2objc:j2objc-annotations:1.1
com.kohlschutter.junixsocket:junixsocket-common:2.0.4
com.kohlschutter.junixsocket:junixsocket-native-common:2.0.4
com.squareup.okhttp3:okhttp:3.9.1
com.squareup.okio:okio:1.13.0
commons-codec:commons-codec:1.10
commons-logging:commons-logging:1.2
javax.annotation:javax.annotation-api:1.3.1
javax.xml.bind:jaxb-api:2.3.0
junit:junit:4.12
net.bytebuddy:byte-buddy:1.7.9
net.java.dev.jna:jna-platform:4.5.1
net.java.dev.jna:jna:4.5.1
org.apache.commons:commons-compress:1.16.1
org.apache.commons:commons-exec:1.3
org.apache.httpcomponents:httpclient:4.5.5
org.apache.httpcomponents:httpcore:4.4.9
org.apache.logging.log4j:log4j-api:2.10.0
org.apache.logging.log4j:log4j-core:2.10.0
org.apache.logging.log4j:log4j-slf4j-impl:2.10.0
org.assertj:assertj-core:3.11.0
org.checkerframework:checker-compat-qual:2.0.0
org.codehaus.mojo:animal-sniffer-annotations:1.14
org.hamcrest:hamcrest-core:1.3
org.jetbrains.kotlin:kotlin-stdlib-common:1.2.70
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.70
Expand All @@ -29,6 +39,9 @@ org.rnorth.duct-tape:duct-tape:1.0.7
org.rnorth.visible-assertions:visible-assertions:2.1.1
org.rnorth:tcp-unix-socket-proxy:1.0.2
org.scijava:native-lib-loader:2.0.2
org.seleniumhq.selenium:selenium-api:3.11.0
org.seleniumhq.selenium:selenium-remote-driver:3.11.0
org.seleniumhq.selenium:selenium-support:3.11.0
org.slf4j:slf4j-api:1.8.0-alpha2
org.slf4j:slf4j-ext:1.7.25
org.testcontainers:selenium:1.9.1
Expand Down
15 changes: 14 additions & 1 deletion gradle/dependency-locks/testRuntimeClasspath.lockfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,33 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
com.google.code.findbugs:jsr305:3.0.2
com.google.code.findbugs:jsr305:1.3.9
com.google.code.gson:gson:2.8.2
com.google.errorprone:error_prone_annotations:2.1.3
com.google.guava:guava:23.6-jre
com.google.j2objc:j2objc-annotations:1.1
com.kohlschutter.junixsocket:junixsocket-common:2.0.4
com.kohlschutter.junixsocket:junixsocket-native-common:2.0.4
com.squareup.okhttp3:okhttp:3.9.1
com.squareup.okio:okio:1.13.0
commons-codec:commons-codec:1.10
commons-logging:commons-logging:1.2
javax.annotation:javax.annotation-api:1.3.1
javax.xml.bind:jaxb-api:2.3.0
junit:junit:4.12
net.bytebuddy:byte-buddy:1.7.9
net.java.dev.jna:jna-platform:4.5.1
net.java.dev.jna:jna:4.5.1
org.apache.commons:commons-compress:1.16.1
org.apache.commons:commons-exec:1.3
org.apache.httpcomponents:httpclient:4.5.5
org.apache.httpcomponents:httpcore:4.4.9
org.apache.logging.log4j:log4j-api:2.10.0
org.apache.logging.log4j:log4j-core:2.10.0
org.apache.logging.log4j:log4j-slf4j-impl:2.10.0
org.assertj:assertj-core:3.11.0
org.checkerframework:checker-compat-qual:2.0.0
org.codehaus.mojo:animal-sniffer-annotations:1.14
org.hamcrest:hamcrest-core:1.3
org.jetbrains.kotlin:kotlin-stdlib-common:1.2.70
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.70
Expand All @@ -29,6 +39,9 @@ org.rnorth.duct-tape:duct-tape:1.0.7
org.rnorth.visible-assertions:visible-assertions:2.1.1
org.rnorth:tcp-unix-socket-proxy:1.0.2
org.scijava:native-lib-loader:2.0.2
org.seleniumhq.selenium:selenium-api:3.11.0
org.seleniumhq.selenium:selenium-remote-driver:3.11.0
org.seleniumhq.selenium:selenium-support:3.11.0
org.slf4j:slf4j-api:1.8.0-alpha2
org.slf4j:slf4j-ext:1.7.25
org.testcontainers:selenium:1.9.1
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
package com.atlassian.performance.tools.dockerinfrastructure

import org.testcontainers.DockerClientFactory
import org.testcontainers.dockerclient.DockerClientProviderStrategy
import java.util.*
import java.util.concurrent.atomic.AtomicBoolean

/**
* Test containers 1.9.1 doesn't work with Bitbucket pipelines.
* Test containers start a docker with Ryuk. Ryuk needs to mount the docker socket, and this is forbidden in Bitbucket pipelines.
* Ryuk isn't a critical feature. It makes after test docker container cleanup more robust.
* This class is a hack to disable the feature.
* Sorry for the hack, but I neither understand how to fix Ryuk problems, neither want to fork and release forked test-containers.
Copy link

Choose a reason for hiding this comment

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

Soon, we will make it possible to disable Ryuk if you env allows it :) See testcontainers/testcontainers-java#1023

Good that you have a workaround meanwhile!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great to hear that. Disabling Ryuk will still be a workaround, but more straightforward and managed on the product's side. Are there any plans to make Ryuk work on BB pipelines?

Copy link

Choose a reason for hiding this comment

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

Well, it used to work but then there was some change on BB side and it got broken.
We track the current state of BitBucket here:
testcontainers/testcontainers-java#700 (comment)

Copy link

Choose a reason for hiding this comment

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

*
* See:
* https://github.com/testcontainers/testcontainers-java/issues/712
*
* Please remove it after the issue resolved, and keep the class updated when upgrading test-containers.
*/
internal object Ryuk {
private val initialized = AtomicBoolean(false)

internal fun disable() {
val dockerClientFactory = DockerClientFactory.instance()
synchronized(dockerClientFactory) {
if (this.initialized.get().not()) {
val configurationStrategies = ArrayList<DockerClientProviderStrategy>()
ServiceLoader.load(DockerClientProviderStrategy::class.java).forEach { cs -> configurationStrategies.add(cs) }
val strategy = DockerClientProviderStrategy.getFirstValidStrategy(configurationStrategies)
val client = strategy.getClient()
val version = client.versionCmd().exec()
val activeApiVersion = DockerClientFactory::class.java.getDeclaredField("activeApiVersion")
activeApiVersion.isAccessible = true
activeApiVersion.set(dockerClientFactory, version.getApiVersion())

val dockerInfo = client.infoCmd().exec()
val activeExecutionDriver = DockerClientFactory::class.java.getDeclaredField("activeExecutionDriver")
activeExecutionDriver.isAccessible = true
activeExecutionDriver.set(dockerClientFactory, dockerInfo.getExecutionDriver())

val initialized = DockerClientFactory::class.java.getDeclaredField("initialized")
initialized.isAccessible = true
initialized.set(dockerClientFactory, true)
this.initialized.set(true)
}
}
}
}
Loading