Skip to content

Commit

Permalink
updated stageTime-informer 24.0220.1414 for tag version v0.1.94
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-hermann-sva committed Feb 20, 2024
1 parent aac8d74 commit 722becb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
16 changes: 8 additions & 8 deletions internal/producer.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,19 +158,19 @@ func checkForNextStage(stageID, revisionRunID string, nextStage int) bool {
// fmt.Println("CURRENT STAGE:", countCurrentStage)
// fmt.Println("COUNT STAGES:", revisionRunFromRedis.CountStages)

// if revisionRunFromRedis.CountStages > countCurrentStage {
// if revisionRunFromRedis.CountStages > countCurrentStage {

// if pipelineRunLabels["status"] != "SUCCEEDED" {
// if pipelineRunLabels["status"] != "SUCCEEDED" {

// fmt.Println("NEXT STAGE LETS GOOO")
// fmt.Println("NEXT STAGE LETS GOOO")

// currentStageID := stageStatusFromRedis.StageID
// nextStageIDBuilder := strings.LastIndex(currentStageID, "-")
// currentStageID := stageStatusFromRedis.StageID
// nextStageIDBuilder := strings.LastIndex(currentStageID, "-")

// nextStageID := replaceLastOccurrenceInSubstring(stageStatusFromRedis.StageID[:nextStageIDBuilder]+"+"+sthingsBase.ConvertIntegerToString(countCurrentStage+1), "-", "+")
// nextStageID := replaceLastOccurrenceInSubstring(stageStatusFromRedis.StageID[:nextStageIDBuilder]+"+"+sthingsBase.ConvertIntegerToString(countCurrentStage+1), "-", "+")

// fmt.Println("NEXT STAGE!?", nextStageID)
// SendStageToMessageQueue(nextStageID)
// fmt.Println("NEXT STAGE!?", nextStageID)
// SendStageToMessageQueue(nextStageID)

// } else {
// fmt.Println("REVISION RUN FINISHED", pipelineRunLabels["stagetime/stage"])
Expand Down
8 changes: 8 additions & 0 deletions internal/verification.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package internal

import (
"fmt"
"strings"

sthingsBase "github.com/stuttgart-things/sthingsBase"
)
Expand Down Expand Up @@ -64,6 +65,13 @@ func verifyInformerStatus(kind, function string, obj interface{}) {
// NO NEW STAGE AND CONTINUE = REVISION RUN WAS SUCCESFUL
if !nextStage {
setRevisionRunStatus(pipelineRunLabels["stagetime/commit"], stageID, true)
} else {
nextStageIDBuilder := strings.LastIndex(stageID, "-")

nextStageID := replaceLastOccurrenceInSubstring(stageID[:nextStageIDBuilder]+"+"+sthingsBase.ConvertIntegerToString(currentStageNumber+1), "-", "+")

fmt.Println("NEXT STAGE!?", nextStageID)
SendStageToMessageQueue(nextStageID)
}
}

Expand Down

0 comments on commit 722becb

Please sign in to comment.