Skip to content

Commit

Permalink
workflow restructure
Browse files Browse the repository at this point in the history
Signed-off-by: Dhruv-J <[email protected]>
  • Loading branch information
Dhruv-J committed Jul 16, 2023
1 parent 3357e58 commit 3765cd8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,11 @@ jobs:
- name: Tar log files
if: ${{ failure() }}
run: tar -czf log.tar.gz log
- name: collect coverage files from node
run: |
touch .coverage/kind-e2e-coverage.txt
go tool covdata merge -i=./.coverage/clickhouse-monitor-coverage,.coverage/theia-manager.coverage -o .coverage/merged
go tool covdata textfmt -i=./.coverage/merged -o .coverage/kind-e2e-coverage.txt
- name: Codecov
uses: codecov/codecov-action@v3
with:
Expand Down Expand Up @@ -246,11 +251,6 @@ jobs:
- test-upgrade-from-N-1
runs-on: [ubuntu-latest]
steps:
- name: collect coverage files from node
run: |
touch .coverage/kind-e2e-coverage.txt
go tool covdata merge -i=.coverage/clickhouse-monitor-coverage,.coverage/theia-manager.coverage -o .coverage/merged
go tool covdata textfmt -i=.coverage/merged -o .coverage/kind-e2e-coverage.txt
- name: Delete spark-jobs
if: ${{ needs.build-spark-jobs-image.result == 'success' }}
uses: geekyeggo/delete-artifact@v2
Expand Down
11 changes: 2 additions & 9 deletions ci/kind/test-e2e-kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ function setup_cluster {
}

function run_test {
echo "STARTEDSTARTED_RUNNING"
TMP_DIR=$(mktemp -d $(dirname $0)/tmp.XXXXXXXX)
curl -o $TMP_DIR/antrea.yml https://raw.githubusercontent.com/antrea-io/antrea/main/build/yamls/antrea.yml
# cp ~/go/src/github.com/antrea/build/yamls/antrea.yml $TMP_DIR/flow-aggregator
Expand All @@ -161,33 +160,27 @@ function run_test {
sed -i -e "s/activeFlowExportTimeout: \"5s\"/activeFlowExportTimeout: \"2s\"/g" $TMP_DIR/antrea.yml
sed -i -e "s/idleFlowExportTimeout: \"15s\"/idleFlowExportTimeout: \"1s\"/g" $TMP_DIR/antrea.yml

curl -o $TMP_DIR/flow-aggregator.yml https://raw.githubusercontent.com/antrea-io/antrea/main/build/yamls/flow-aggregator.yml
# cp ~/go/src/github.com/antrea/build/yamls/flow-aggregator.yml $TMP_DIR/flow-aggregator.yml
#curl -o $TMP_DIR/flow-aggregator.yml https://raw.githubusercontent.com/antrea-io/antrea/main/build/yamls/flow-aggregator.yml
cp ~/go/src/github.com/antrea/build/yamls/flow-aggregator.yml $TMP_DIR/flow-aggregator.yml
sed -i -e "s|image: projects.registry.vmware.com/antrea/flow-aggregator:latest|image: antrea/flow-aggregator:latest|g" $TMP_DIR/flow-aggregator.yml
perl -i -p0e 's/ # Enable is the switch to enable exporting flow records to ClickHouse.\n enable: false/ # Enable is the switch to enable exporting flow records to ClickHouse.\n enable: true/' $TMP_DIR/flow-aggregator.yml
sed -i -e "s/ activeFlowRecordTimeout: 60s/ activeFlowRecordTimeout: 3500ms/g" $TMP_DIR/flow-aggregator.yml
sed -i -e "s/ inactiveFlowRecordTimeout: 90s/ inactiveFlowRecordTimeout: 6s/g" $TMP_DIR/flow-aggregator.yml
sed -i -e "s/ podLabels: false/ podLabels: true/g" $TMP_DIR/flow-aggregator.yml
sed -i -e "s/ commitInterval: \"8s\"/ commitInterval: \"1s\"/g" $TMP_DIR/flow-aggregator.yml

echo "1MID_RUNNING"

docker exec -i kind-control-plane dd of=/root/antrea.yml < $TMP_DIR/antrea.yml
docker exec -i kind-control-plane dd of=/root/flow-aggregator.yml < $TMP_DIR/flow-aggregator.yml
docker exec -i kind-control-plane dd of=/root/clickhouse-operator-install-bundle.yaml < $CH_OPERATOR_YML
$FLOW_VISIBILITY_CMD | docker exec -i kind-control-plane dd of=/root/flow-visibility.yml
$FLOW_VISIBILITY_WITH_SPARK_CMD | docker exec -i kind-control-plane dd of=/root/flow-visibility-with-spark.yml
$FLOW_VISIBILITY_CH_ONLY_CMD | docker exec -i kind-control-plane dd of=/root/flow-visibility-ch-only.yml

echo "2MID_RUNNING"

docker exec -i kind-control-plane dd of=/root/theia < $THEIACTL_BIN

rm -rf $TMP_DIR
sleep 1

echo "3MID_RUNNING"

if $coverage; then
mkdir -p .coverage/clickhouse-monitor-coverage/
mkdir -p .coverage/theia-manager-coverage/
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -1585,7 +1585,7 @@ func (data *TestData) copyNodeFiles(nodeName, fileName, covDir, covPrefix string
if err != nil {
fmt.Println(fmt.Sprintf("_______________ copyNodeFiles: error creating absolute file path: %v", err))
}
covFile := filepath.Join(covdirabs, fmt.Sprintf("%s-%s-%s", nodeName, fileName, suffix))
covFile := filepath.Join(covdirabs, fmt.Sprintf("%s-%s", fileName, suffix))
fmt.Println("_______________ copyNodeFiles covFile: " + covFile)
f, err := os.Create(covFile)
if err != nil {
Expand Down

0 comments on commit 3765cd8

Please sign in to comment.