Skip to content

Commit

Permalink
Merge pull request #13 from openinfradev/segmentaion_error_status
Browse files Browse the repository at this point in the history
Segmentaion error status
  • Loading branch information
ktkfree authored Jun 21, 2023
2 parents 46bcabf + f2bffb0 commit adae5eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ on:
push:
branches:
- main
- "release**"
- develop
env:
SERVICE: tks-batch
Expand Down Expand Up @@ -43,17 +42,14 @@ jobs:
git clone "https://${{secrets.BOT_GITHUB_TOKEN}}@github.com/openinfradev/cicd-manifests.git"
TARGET='cicd'
if [[ ${{github.ref}} == *"develop"* ]]; then
TARGET='development'
elif [[ ${{github.ref}} == *"ft"* ]]; then
TARGET='ft'
( cd cicd-manifests/${SERVICE}/overlay/development && kustomize edit set image docker.io/sktcloud/${SERVICE}:${TAG} && git add kustomization.yaml )
( cd cicd-manifests/${SERVICE}/overlay/ft && kustomize edit set image docker.io/sktcloud/${SERVICE}:${TAG} && git add kustomization.yaml )
elif [[ ${{github.ref}} == *"main"* ]]; then
( cd cicd-manifests/${SERVICE}/overlay/cicd && kustomize edit set image docker.io/sktcloud/${SERVICE}:${TAG} && git add kustomization.yaml )
fi
cd cicd-manifests/${SERVICE}/overlay/${TARGET}
kustomize edit set image docker.io/sktcloud/${SERVICE}:${TAG}
git add kustomization.yaml
cd cicd-manifests
git commit --allow-empty -m "Set image tag to ${SERVICE} ${TAG}"
git pull --rebase origin main
git push origin main --force
2 changes: 1 addition & 1 deletion internal/cloud-account/cloud-account.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (x *CloudAccountAccessor) UpdateCreatedIAM(cloudAccountId string, createdIA
log.Info(fmt.Sprintf("UpdateCreatedIAM. cloudAccountId[%s], createdIAM[%t]", cloudAccountId, createdIAM))
res := x.db.Model(CloudAccount{}).
Where("ID = ?", cloudAccountId).
Updates(map[string]interface{}{"CreatedIAM": createdIAM})
Updates(map[string]interface{}{"created_iam": createdIAM})

if res.Error != nil || res.RowsAffected == 0 {
return fmt.Errorf("nothing updated in cloudAccount with id %s", cloudAccountId)
Expand Down

0 comments on commit adae5eb

Please sign in to comment.