Skip to content

Commit 3d5649f

Browse files
authored
Merge pull request #23 from datavisyn/revert-22-new_deplyoment_timeout
Revert "added timeout to build product"
2 parents de44a5b + baf238b commit 3d5649f

File tree

3 files changed

+7
-27
lines changed

3 files changed

+7
-27
lines changed

.github/workflows/build-product.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@ name: build-product
22

33
on:
44
workflow_call:
5-
inputs:
6-
timeout:
7-
description: "Timeout in minutes for each job"
8-
type: string
9-
default: 30
105
secrets:
116
DATAVISYN_BOT_REPO_TOKEN:
127
required: false
@@ -63,7 +58,6 @@ jobs:
6358
create_workspace: ${{ steps.get-parameters.outputs.create_workspace }}
6459
stage: ${{ steps.get-parameters.outputs.stage }}
6560
runs-on: ubuntu-20.04
66-
timeout-minutes: ${{ fromJSON(github.event.inputs.timeout) }}
6761
steps:
6862
# checkout specific repository
6963
- uses: actions/checkout@v3
@@ -106,7 +100,6 @@ jobs:
106100
image_tag2: ${{ needs.prepare-build.outputs.image_tag2 }}
107101
build_time: ${{ needs.prepare-build.outputs.build_time }}
108102
stage: ${{ needs.prepare-build.outputs.stage }}
109-
timeout: ${{ inputs.timeout }}
110103
secrets: inherit
111104
build-workspace:
112105
needs: prepare-build
@@ -122,11 +115,9 @@ jobs:
122115
image_tag2: ${{ needs.prepare-build.outputs.image_tag2 }}
123116
build_time: ${{ needs.prepare-build.outputs.build_time }}
124117
stage: ${{ needs.prepare-build.outputs.stage }}
125-
timeout: ${{ inputs.timeout }}
126118
secrets: inherit
127119
post-build:
128120
needs: [prepare-build, build-single, build-workspace]
129-
timeout-minutes: ${{ fromJSON(github.event.inputs.timeout) }}
130121
if: ${{ always() && (needs.build-single.result == 'success' || needs.build-single.result == 'skipped') && (needs.build-workspace.result == 'success' || needs.build-workspace.result == 'skipped') && !(needs.build-workspace.result == 'skipped' && needs.build-single.result == 'skipped')}}
131122
runs-on: ubuntu-20.04
132123
steps:
@@ -148,7 +139,6 @@ jobs:
148139
# Add always() as otherwise the job is being skipped: https://docs.github.com/en/actions/learn-github-actions/expressions#status-check-functions
149140
if: ${{ always() && needs.post-build.result == 'success' && fromJSON(needs.prepare-build.outputs.trigger_automatic_deployment) }}
150141
runs-on: ubuntu-20.04
151-
timeout-minutes: ${{ fromJSON(github.event.inputs.timeout) }}
152142
strategy:
153143
matrix:
154144
customer: ${{ fromJSON(needs.prepare-build.outputs.customers) }}

.github/workflows/build-single-product-part.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,6 @@ on:
4444
description: "stage for the image (develop or production) depending on the branch name"
4545
required: true
4646
type: string
47-
timeout:
48-
description: "Timeout in minutes for each job"
49-
type: string
50-
default: 30
5147
env:
5248
TIME_ZONE: "Europe/Vienna"
5349
NODE_VERSION: "16.16"
@@ -64,7 +60,6 @@ permissions:
6460
jobs:
6561
build-components:
6662
runs-on: ubuntu-20.04
67-
timeout-minutes: ${{ fromJSON(github.event.inputs.timeout) }}
6863
steps:
6964
# checkout specific repository
7065
- uses: actions/checkout@v3

.github/workflows/build-workspace-product-part.yml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,6 @@ on:
4444
description: "stage for the image (develop or production) depending on the branch name"
4545
required: true
4646
type: string
47-
timeout:
48-
description: "Timeout in minutes for each job"
49-
type: string
50-
default: 30
5147
env:
5248
VISYN_SCRIPTS_VERSION: "develop"
5349
TIME_ZONE: "Europe/Vienna"
@@ -65,7 +61,6 @@ permissions:
6561
jobs:
6662
build-components:
6763
runs-on: ubuntu-20.04
68-
timeout-minutes: ${{ fromJSON(github.event.inputs.timeout) }}
6964
steps:
7065
# checkout specific repository
7166
- uses: actions/checkout@v3
@@ -196,20 +191,20 @@ jobs:
196191
product_version=$(jq -rc '.version' ./package.json)
197192
echo "product_version=$product_version"
198193
199-
if [[ "$product_version" == *"SNAPSHOT"* ]]; then
194+
if [[ $product_version == *"SNAPSHOT"* ]]; then
200195
echo "replace SNAPSHOT in version with timestamp"
201-
product_version=${product_version/SNAPSHOT/$(date +%Y%m%d-%H%M%S)}
196+
product_version=$(echo "$product_version" | sed "s/SNAPSHOT/$(date +%Y%m%d-%H%M%S)/g")
202197
echo "product_version=$product_version"
203198
fi
204199
205-
workspace_version=$(jq -rc '.version' ./tmp/"$COMPONENT"/package.json)
200+
workspace_version=$(jq -rc '.version' ./tmp/$COMPONENT/package.json)
206201
echo "workspace_version=$workspace_version"
207202
208-
if [[ "$product_version" != "$workspace_version" ]]; then
203+
if [[ $product_version != $workspace_version ]]; then
209204
echo "update workspace version"
210-
jq --arg version "$product_version" '.version = $version' ./tmp/"$COMPONENT"/package.json > ./tmp/"$COMPONENT"/package.json.tmp
211-
mv ./tmp/"$COMPONENT"/package.json.tmp ./tmp/"$COMPONENT"/package.json
212-
echo "workspace version updated to $(jq -rc '.version' ./tmp/"$COMPONENT"/package.json)"
205+
jq --arg version "$product_version" '.version = $version' ./tmp/$COMPONENT/package.json > ./tmp/$COMPONENT/package.json.tmp
206+
mv ./tmp/$COMPONENT/package.json.tmp ./tmp/$COMPONENT/package.json
207+
echo "workspace version updated to $(jq -rc '.version' ./tmp/$COMPONENT/package.json)"
213208
fi
214209
env:
215210
COMPONENT: ${{ inputs.component }}

0 commit comments

Comments
 (0)