Skip to content

Commit

Permalink
pass through consumer and provider vars to cdc container
Browse files Browse the repository at this point in the history
  • Loading branch information
robwhitby committed Jul 14, 2021
1 parent c0781a5 commit 5f95fae
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 1 deletion.
5 changes: 5 additions & 0 deletions e2e/actions/consumer-integration-test/workflowExpected.yml
Expand Up @@ -58,13 +58,18 @@ jobs:
--entrypoint "${CONSUMER_SCRIPT}" \
-e DEPENDENCY_NAME=${PROVIDER_NAME} \
-e ${PROVIDER_HOST_KEY}=${PROVIDER_HOST} \
-e CDC_CONSUMER_NAME=${CONSUMER_NAME} \
-e CDC_CONSUMER_VERSION=${REVISION} \
-e CDC_PROVIDER_NAME=${PROVIDER_NAME} \
-e CDC_PROVIDER_VERSION=${GIT_REVISION} \
-e K -e K1 \
\
${DOCKER_COMPOSE_SERVICE:-code}
env:
CONSUMER_GIT_KEY: ${{ secrets.EE_GITHUB_PRIVATE_KEY }}
CONSUMER_GIT_URI: git@github.com:springernature/c-consumer
CONSUMER_HOST: c-host
CONSUMER_NAME: c-consumer
CONSUMER_PATH: ""
CONSUMER_SCRIPT: c-script
DOCKER_COMPOSE_SERVICE: potato
Expand Down
5 changes: 5 additions & 0 deletions e2e/actions/deploy-cf/workflowExpected.yml
Expand Up @@ -252,13 +252,18 @@ jobs:
--entrypoint "${CONSUMER_SCRIPT}" \
-e DEPENDENCY_NAME=${PROVIDER_NAME} \
-e ${PROVIDER_HOST_KEY}=${PROVIDER_HOST} \
-e CDC_CONSUMER_NAME=${CONSUMER_NAME} \
-e CDC_CONSUMER_VERSION=${REVISION} \
-e CDC_PROVIDER_NAME=${PROVIDER_NAME} \
-e CDC_PROVIDER_VERSION=${GIT_REVISION} \
-e TEST_ROUTE \
\
${DOCKER_COMPOSE_SERVICE:-code}
env:
CONSUMER_GIT_KEY: ${{ secrets.EE_GITHUB_PRIVATE_KEY }}
CONSUMER_GIT_URI: git@github.com:springernature/repo
CONSUMER_HOST: consumer.host
CONSUMER_NAME: repo/app
CONSUMER_PATH: app
CONSUMER_SCRIPT: ci/run-external-and-cdcs-dev
DOCKER_COMPOSE_SERVICE: ""
Expand Down
6 changes: 5 additions & 1 deletion e2e/concourse/consumer-integration-test/pipelineExpected.yml
Expand Up @@ -30,6 +30,7 @@ jobs:
CONSUMER_GIT_KEY: ((halfpipe-github.private_key))
CONSUMER_GIT_URI: git@github.com:springernature/c-consumer
CONSUMER_HOST: c-host
CONSUMER_NAME: c-consumer
CONSUMER_PATH: ""
CONSUMER_SCRIPT: c-script
DOCKER_COMPOSE_SERVICE: potato
Expand Down Expand Up @@ -88,6 +89,10 @@ jobs:
--entrypoint "${CONSUMER_SCRIPT}" \
-e DEPENDENCY_NAME=${PROVIDER_NAME} \
-e ${PROVIDER_HOST_KEY}=${PROVIDER_HOST} \
-e CDC_CONSUMER_NAME=${CONSUMER_NAME} \
-e CDC_CONSUMER_VERSION=${REVISION} \
-e CDC_PROVIDER_NAME=${PROVIDER_NAME} \
-e CDC_PROVIDER_VERSION=${GIT_REVISION} \
-e ARTIFACTORY_PASSWORD -e ARTIFACTORY_URL -e ARTIFACTORY_USERNAME -e K -e K1 -e RUNNING_IN_CI \
-v /var/halfpipe/cache:/var/halfpipe/cache -v /var/halfpipe/shared-cache:/var/halfpipe/shared-cache \
${DOCKER_COMPOSE_SERVICE:-code}
Expand All @@ -112,4 +117,3 @@ resources:
private_key: ((halfpipe-github.private_key))
uri: git@github.com:springernature/halfpipe.git
type: git

1 change: 1 addition & 0 deletions renderers/actions/consumer_integration_tests.go
Expand Up @@ -38,6 +38,7 @@ func convertConsumerIntegrationTestToRunTask(task manifest.ConsumerIntegrationTe
"CONSUMER_SCRIPT": task.Script,
"CONSUMER_GIT_KEY": githubSecrets.GitHubPrivateKey,
"CONSUMER_HOST": task.ConsumerHost,
"CONSUMER_NAME": task.Consumer,
"PROVIDER_NAME": providerName,
"PROVIDER_HOST_KEY": providerHostKey,
"PROVIDER_HOST": task.ProviderHost,
Expand Down
1 change: 1 addition & 0 deletions renderers/concourse/consumer_integration_tests.go
Expand Up @@ -40,6 +40,7 @@ func convertConsumerIntegrationTestToRunTask(task manifest.ConsumerIntegrationTe
Privileged: true,
Vars: manifest.Vars{
"CONSUMER_GIT_URI": consumerGitURI,
"CONSUMER_NAME": task.Consumer,
"CONSUMER_PATH": consumerGitPath,
"CONSUMER_SCRIPT": task.Script,
"CONSUMER_GIT_KEY": "((halfpipe-github.private_key))",
Expand Down
4 changes: 4 additions & 0 deletions renderers/shared/consumer_integration_tests.go
Expand Up @@ -51,6 +51,10 @@ docker-compose run --no-deps \
--entrypoint "${CONSUMER_SCRIPT}" \
-e DEPENDENCY_NAME=${PROVIDER_NAME} \
-e ${PROVIDER_HOST_KEY}=${PROVIDER_HOST} \
-e CDC_CONSUMER_NAME=${CONSUMER_NAME} \
-e CDC_CONSUMER_VERSION=${REVISION} \
-e CDC_PROVIDER_NAME=${PROVIDER_NAME} \
-e CDC_PROVIDER_VERSION=${GIT_REVISION} \
%s \
%s \
${DOCKER_COMPOSE_SERVICE:-code}
Expand Down

0 comments on commit 5f95fae

Please sign in to comment.