Skip to content

Commit

Permalink
fixup! fixup! test devbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
elchead committed Jan 2, 2024
1 parent 9c7be95 commit 584c3fe
Showing 1 changed file with 7 additions and 22 deletions.
29 changes: 7 additions & 22 deletions .github/workflows/e2e-test-provider-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,15 @@ jobs:
nixTools: terraform

- name: Build Constellation provider # CLI is needed for the upgrade assert and container push is needed for the microservice upgrade
working-directory: ${{ github.workspace }}
shell: bash
run: |
mkdir build
cd build
bazel run //:devbuild --cli_edition=enterprise
- name: Remove local Terraform registry
if: inputs.providerVersion == ''
- name: Remove local Terraform registry # otherwise the local registry would be used instead of the public registry
if: inputs.providerVersion != ''
shell: bash
run: |
bazel build //bazel/settings:tag
Expand Down Expand Up @@ -287,28 +288,12 @@ jobs:
terraform init
terraform destroy -auto-approve
- name: Remove or add to local Terraform registry
- name: Build Constellation provider # add local registry if release version was used before
if: inputs.providerVersion != ''
working-directory: ${{ github.workspace }}/build
shell: bash
id: upgrade_tf_provider
run: |
bazel build //bazel/settings:tag
repository_root=$(git rev-parse --show-toplevel)
out_rel=$(bazel cquery --output=files //bazel/settings:tag)
build_version=$(cat "$(realpath "${repository_root}/${out_rel}")")
terraform_provider_dir="${HOME}/.terraform.d/plugins/registry.terraform.io/edgelesssys/constellation/${build_version#v}/linux_amd64/"
# remove local registry if it was used and public registry should be used now
if [[ "${{ inputs.providerVersion }}" == "" ]]; then
rm -rf "${terraform_provider_dir}"
fi
# add to local registry if it was not used and local registry should be used now
if [[ "${{ inputs.providerVersion }}" != "" ]]; then
mkdir -p "${terraform_provider_dir}"
mv build/terraform-provider-constellation "${terraform_provider_dir}/terraform-provider-constellation_${build_version}"
fi
echo "build_version=${build_version}" | tee -a "$GITHUB_OUTPUT"
bazel run //:devbuild --cli_edition=enterprise
- name: Update cluster configuration # for duplicate variable declaration, the last one is used
working-directory: ${{ github.workspace }}/cluster
Expand Down

0 comments on commit 584c3fe

Please sign in to comment.