Skip to content

Commit

Permalink
remove upgrade logic
Browse files Browse the repository at this point in the history
  • Loading branch information
elchead committed Dec 20, 2023
1 parent 335ba13 commit 5c7da0d
Showing 1 changed file with 0 additions and 71 deletions.
71 changes: 0 additions & 71 deletions .github/workflows/e2e-test-provider-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,6 @@ on:
providerVersion:
description: "Constellation Terraform provider version to use (without v prefix). Empty value means build from source."
type: string
toImage:
description: Image (shortpath) the cluster is upgraded to, or empty for main/nightly.
type: string
required: false
toKubernetes:
description: Kubernetes version to target for the upgrade, empty for no upgrade.
type: string
required: false
toProviderVersion:
description: Provider version and microservice version to target for the upgrade, empty for no upgrade.
type: string
required: false
workflow_call:
inputs:
ref:
Expand All @@ -53,18 +41,6 @@ on:
providerVersion:
description: "Constellation Terraform provider version to use. Empty value means build from source."
type: string
toImage:
description: Image (shortpath) the cluster is upgraded to, or empty for main/nightly.
type: string
required: false
toKubernetes:
description: Kubernetes version to target for the upgrade, empty for target's default version.
type: string
required: false
toProviderVersion:
description: Provider version and microservice version to target for the upgrade, empty for no upgrade.
type: string
required: false

jobs:
provider-example-test:
Expand Down Expand Up @@ -286,60 +262,13 @@ jobs:
TF_LOG=INFO terraform apply -auto-approve
fi
- name: Update cluster configuration
working-directory: ${{ github.workspace }}/cluster
shell: bash
run: |
if [[ "${{ inputs.toImage }}" != "" ]]; then
cat >> _override.tf <<EOF
locals {
version = "${{ inputs.toImage }}"
}
EOF
fi
if [[ "${{ inputs.toProviderVersion }}" != "" ]]; then
cat >> _override.tf <<EOF
terraform {
required_providers {
constellation = {
source = "edgelesssys/constellation"
version = "${{ inputs.toProviderVersion }}"
}
}
}
EOF
fi
# TODO rename version to image_version
- name: Upgrade Terraform Cluster
working-directory: ${{ github.workspace }}/cluster
shell: bash
run: |
terraform init --upgrade
TF_LOG=INFO terraform apply -auto-approve
- name: Assert upgrade successful
working-directory: ${{ github.workspace }}/cluster
env:
IMAGE: ${{ inputs.toImage }}
KUBERNETES: ${{ inputs.toKubernetes }}
MICROSERVICES: ${{ inputs.toProviderVersion }}
WORKERNODES: 2
CONTROLNODES: 2
run: |
terraform output -raw kubeconfig > constellation-admin.conf
if [[ -n ${MICROSERVICES} ]]; then
MICROSERVICES_FLAG="--target-microservices=$MICROSERVICES"
fi
if [[ -n ${KUBERNETES} ]]; then
KUBERNETES_FLAG="--target-kubernetes=$KUBERNETES"
fi
# cfg must be in same dir as KUBECONFIG
./constellation config generate ${{ inputs.cloudProvider }}
KUBECONFIG=${{ github.workspace }}/cluster/constellation-admin.conf bazel run //e2e/provider-upgrade:provider-upgrade_test -- --want-worker $WORKERNODES --want-control $CONTROLNODES --target-image "$IMAGE" "$KUBERNETES_FLAG" "$MICROSERVICES_FLAG" --cli ${{ github.workspace }}/cluster/constellation
- name: Destroy Terraform Cluster
# outcome is part of the steps context (https://docs.github.com/en/actions/learn-github-actions/contexts#steps-context)
if: always() && steps.apply_terraform.outcome != 'skipped'
Expand Down

0 comments on commit 5c7da0d

Please sign in to comment.