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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing "Standard" docker.io auth retrieval [BT-226] #6326

Merged
merged 1 commit into from Apr 28, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -6,7 +6,7 @@ import cromwell.backend._
import cromwell.backend.standard.callcaching._
import cromwell.core.Dispatcher.BackendDispatcher
import cromwell.core.path.Path
import cromwell.core.{CallOutputs, Dispatcher}
import cromwell.core.{BackendDockerConfiguration, CallOutputs, Dispatcher}
import wom.expression.IoFunctionSet
import wom.graph.CommandCallNode

Expand Down Expand Up @@ -216,4 +216,10 @@ trait StandardLifecycleActorFactory extends BackendLifecycleActorFactory {

initializationData.runtimeAttributesBuilder.definitions.toSet
}

override def dockerHashCredentials(workflowDescriptor: BackendWorkflowDescriptor,
initializationDataOption: Option[BackendInitializationData],
): List[Any] = {
BackendDockerConfiguration.build(configurationDescriptor.backendConfig).dockerCredentials.toList
}
}
@@ -0,0 +1,15 @@
name: hello_private_repo
testFormat: runtwiceexpectingcallcaching
backends: [LocalDockerSecure]

files {
workflow: hello_private_repo/hello_private_repo.wdl
inputs: hello_private_repo/hello_private_repo.inputs.json
}

metadata {
workflowName: hello_private_repo
status: Succeeded
"calls.hello_private_repo.hello.callCaching.result": "Cache Hit: <<CACHE_HIT_UUID>>:hello_private_repo.hello:-1"
}

@@ -0,0 +1,3 @@
{
"hello_private_repo.addressee": "m'Lord"
}
@@ -0,0 +1,27 @@
version 1.0

task hello {
input {
String addressee
}
command {
echo "Hello ~{addressee}!"
}
output {
String salutation = read_string(stdout())
}
runtime {
backend: "LocalDockerSecure"
docker: "broadinstitute/cromwell-docker-test:private-repo"
}
}

workflow hello_private_repo {
input {
String addressee
}
call hello { input: addressee = addressee }
output {
String salutation = hello.salutation
}
}
1 change: 1 addition & 0 deletions src/ci/resources/local_application.conf
Expand Up @@ -27,6 +27,7 @@ backend {
include "dockerhub_provider_config_v1.inc.conf"
}
}
include "local_provider_docker_secure.conf"
LocalBourneShell {
actor-factory = "cromwell.backend.impl.sfs.config.ConfigBackendLifecycleActorFactory"
config {
Expand Down
20 changes: 20 additions & 0 deletions src/ci/resources/local_provider_docker_secure.conf.ctmpl
@@ -0,0 +1,20 @@
LocalDockerSecure {
# The content of this config object is currently identical to that of the 'Local' backend
# specified in 'local_application.conf'. There is currently no actual 'ctmpl' processing
# required within this file.
#
# For authorized Travis users this .conf.ctmpl file will be rendered to a .conf file and
# included into 'local_application.conf', enabling the 'hello_private_repo' Centaur test
# to find its requested backend.
#
# For unauthorized Travis users the 'LocalDockerSecure' backend will not be defined
# and the 'hello_private_repo' test will be skipped because Centaur will not find a
# matching backend.
actor-factory = "cromwell.backend.impl.sfs.config.ConfigBackendLifecycleActorFactory"
config {
include "local_provider_config.inc.conf"

# Have the engine (maybe) authenticate to docker.io. See BT-141 for more info.
include "dockerhub_provider_config_v1.inc.conf"
}
}