Skip to content

Commit

Permalink
avoid to launch dockerize for all project
Browse files Browse the repository at this point in the history
  • Loading branch information
ndr-brt committed Jul 18, 2024
1 parent 75cab12 commit 29d29f2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
15 changes: 11 additions & 4 deletions .github/actions/run-deployment-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ description: "Build and publish a Docker Image to DockerHub"
inputs:
imagename:
required: true
description: "name of the docker image, e.g. edc-runtime-memory"
description: "list of docker image names separated by whitespace, e.g. 'edc-runtime-memory edc-runtime-other'"

image_tag:
required: false
Expand All @@ -38,7 +38,7 @@ inputs:

rootDir:
required: true
description: "The directory that contains the docker file, e.g. edc-controlplane/edc-runtime-memory"
description: "list of directories of the modules to be dockerized, separated by whitespace, e.g. 'edc-controlplane/edc-runtime-memory edc-dataplane/edc-dataplane-memory'"

k8sversion:
required: false
Expand Down Expand Up @@ -69,12 +69,19 @@ runs:
- name: Build docker images
shell: bash
run: |-
./gradlew -p ${{ inputs.rootDir }} dockerize
modules=(${{ inputs.rootDir }})
for module in "${modules[@]}"
do
./gradlew -p $module dockerize
done
- name: Load images into KinD
shell: bash
run: |
kind get clusters | xargs -n1 kind load docker-image ${{ inputs.imagename }}:${{ inputs.image_tag }} --name
images=(${{ inputs.imagename }})
versioned=( "${images[@]/%/:${{ inputs.image_tag }}}" )
versioned_images=$(IFS=' ' ; echo "${versioned[*]}")
kind get clusters | xargs -n1 kind load docker-image $versioned_images --name
###################################################
# Install the test infrastructure
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deployment-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
name: "Run deployment test using KinD and Helm"
with:
imagename: "edc-controlplane-postgresql-hashicorp-vault edc-dataplane-hashicorp-vault"
rootDir: "."
rootDir: "edc-controlplane/edc-controlplane-postgresql-hashicorp-vault edc-dataplane/edc-dataplane-hashicorp-vault"
k8sversion: ${{ matrix.k8s-version }}
helm_command: |-
helm install tx-prod charts/tractusx-connector \
Expand Down Expand Up @@ -125,7 +125,7 @@ jobs:
name: "Run deployment test using KinD and Helm"
with:
imagename: "edc-controlplane-postgresql-azure-vault edc-dataplane-azure-vault"
rootDir: "."
rootDir: "edc-controlplane/edc-controlplane-postgresql-azure-vault edc-dataplane/edc-dataplane-azure-vault"
helm_command: |-
az keyvault secret set --vault-name ${{ secrets.AZURE_VAULT_NAME }} --name aes-keys --value "$(cat aes.key)" > /dev/null
az keyvault secret set --vault-name ${{ secrets.AZURE_VAULT_NAME }} --name client-secret --value "$(cat client.secret)" > /dev/null
Expand Down

0 comments on commit 29d29f2

Please sign in to comment.