Skip to content

Patched version #41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 134 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
134 commits
Select commit Hold shift + click to select a range
2c90a07
update readme to reflect branch and v2.X deprecation to "support"
justincorrigible Dec 10, 2021
4db4168
ensure dates are handled as UTC when tz is missing
justincorrigible Jan 10, 2022
6841710
v2.16.1
justincorrigible Jan 10, 2022
fad1eba
restore npm publish ability
justincorrigible Jan 11, 2022
1f99c1e
resolve bug in nested aggregations (#744)
adipaul1981 Feb 2, 2022
8bea4e5
update jenkins for legacy packages
justincorrigible Feb 2, 2022
9a33d6a
v2.16.2
justincorrigible Feb 2, 2022
99567f0
update jenkins to enable deployments to QA
justincorrigible Feb 4, 2022
c151722
add readme note about ENV needed for admin-ui docker image
justincorrigible Feb 23, 2022
5098eb1
refactor build and deployment pipelines
justincorrigible Mar 5, 2022
17b9ed6
v2.17.0
justincorrigible Mar 6, 2022
05887c1
fix jenkins copypasta, nuke ad-hoc changes before publish
justincorrigible Mar 6, 2022
28ae806
add slack notifications
justincorrigible Mar 9, 2022
f17de71
add additional numeric ES types
justincorrigible Mar 22, 2022
880a1a3
add export table column extended customisation
justincorrigible Jun 30, 2022
1c21653
v2.18.0
justincorrigible Jun 30, 2022
f568b9f
fix RangeAgg “min”
justincorrigible Jul 12, 2022
8883f7e
v2.18.1
justincorrigible Jul 12, 2022
ba9f747
restore hack for Long GraphQL support
justincorrigible Aug 11, 2022
19521a7
v2.18.2
justincorrigible Aug 11, 2022
6ba6fad
add array fields handling
justincorrigible Aug 19, 2022
4a5b519
v2.19.0
justincorrigible Aug 20, 2022
480d69b
increase DinD memory limit
justincorrigible Aug 20, 2022
efcea8b
improve date range agg
justincorrigible Aug 22, 2022
15d0711
allow customisation of empty TSV values from UI
justincorrigible Aug 22, 2022
046d5d4
improve exporter customisation logic
justincorrigible Aug 22, 2022
1d49de9
v2.19.1
justincorrigible Aug 22, 2022
7126e38
make date range agg use today as max
justincorrigible Aug 25, 2022
553130a
v2.19.2
justincorrigible Aug 25, 2022
1ed6409
add check for localStorage in SSR
justincorrigible Oct 13, 2022
5a9b57e
fix typing issues caused by outdated deps
justincorrigible Nov 2, 2022
c0fcce4
v2.19.3
justincorrigible Nov 2, 2022
a262da6
patch for the current env
william-jiang-lai Jan 17, 2023
c66ef84
Rename table.js to Table.js
jianglai3303 Jan 24, 2023
665d925
Add arranger server with filtering
afmam Jan 26, 2023
bafe6a3
Update server filter README
afmam Jan 26, 2023
5d9f5e9
Fix new lines
afmam Jan 26, 2023
bc6f1df
Add .env.schema
afmam Jan 26, 2023
950f80b
Fix new line
afmam Jan 26, 2023
e840dd6
Merge pull request #1 from PilotDataPlatform/PILOT-1985
jianglai3303 Jan 26, 2023
b455b0c
Add download endpoint for file export
afmam Jan 26, 2023
2f3183e
fix new line & update index
afmam Jan 27, 2023
d17ef41
Add admin graphql endpoint
afmam Jan 27, 2023
cc8298a
Merge pull request #4 from PilotDataPlatform/PILOT-2161b
jianglai3303 Feb 1, 2023
914f015
Merge pull request #3 from PilotDataPlatform/PILOT-2171
jianglai3303 Feb 1, 2023
25f50e5
setup local environment and env variables
Feb 7, 2023
151f10b
Merge pull request #5 from PilotDataPlatform/playground
jianglai3303 Feb 7, 2023
1c60901
PILOT-2296: Add Dockerfile and CI for deployment (#8)
afmam Mar 3, 2023
830c217
Update admin server cicd pipeline
Mar 8, 2023
3dd24f0
Trigger admin server cicd
Mar 8, 2023
51b9131
Fix bugs
Mar 8, 2023
93a3a81
Fix bugs
Mar 8, 2023
b18480f
Update admin server image name
Mar 8, 2023
15cb862
Trigger CICD
Mar 8, 2023
fbfbc46
Update CICD pipeline for admin ui
Mar 8, 2023
084e53d
Update CICD pipeline for server filter
Mar 8, 2023
7264309
PILOT-2463 Migrate service arranger image to gitlab
Mar 15, 2023
706cb8f
Update image url
Mar 15, 2023
7914da9
Trigger CICD
Mar 15, 2023
3271340
Trigger server filter CICD
Mar 15, 2023
afe9fd5
Update workflow nagme and trigger CICD for server filter
Mar 15, 2023
e182d82
Add auth token to download data stream
afmam Mar 29, 2023
ba1cb97
Update getAllData to pass params
afmam Mar 29, 2023
2b1fb8a
Update download filter to add identifiers
afmam Mar 29, 2023
cb1ab51
Update download filter logic for sqon ids
afmam Mar 29, 2023
66115a9
Merge pull request #9 from PilotDataPlatform/PILOT-2668
jianglai3303 Mar 30, 2023
a7faa26
Update download endpoint to accept JSON body
afmam Mar 30, 2023
26f66b0
Update auth filter to support RBAC
afmam Mar 31, 2023
9647aa5
Merge pull request #10 from PilotDataPlatform/PILOT-2680
jianglai3303 Mar 31, 2023
88564e6
Update role filtering logic
afmam Mar 31, 2023
529b7fc
Update download endpoint to use new auth filter
afmam Mar 31, 2023
e047f74
Add missing new line to export file logic
afmam Mar 31, 2023
e86c977
Update user role check logic to extract role name
afmam Mar 31, 2023
62c5a16
Merge pull request #11 from PilotDataPlatform/PILOT-2202
jianglai3303 Apr 3, 2023
cfc6c92
Implement memoization for server side filter
afmam Apr 4, 2023
134f1eb
Add new line to authFilter
afmam Apr 4, 2023
76a2666
Update package-lock.json with node 14.21.0
afmam Apr 4, 2023
3986e43
Update container registry and jenkins url
afmam Apr 10, 2023
d5b06a5
Merge pull request #12 from PilotDataPlatform/PILOT-2202
jianglai3303 Apr 10, 2023
1272e33
Merge pull request #13 from PilotDataPlatform/PILOT-2713
Samantha77 Apr 10, 2023
6a9382b
Trigger CICD
afmam Apr 10, 2023
5bd62d7
Trigger CICD
afmam Apr 10, 2023
93db838
Revise sqon returned during error handling
afmam Apr 11, 2023
42f50b1
Merge pull request #14 from PilotDataPlatform/PILOT-2716
jianglai3303 Apr 11, 2023
64c833a
Add CORS header to response
afmam Apr 21, 2023
520249d
Merge pull request #15 from PilotDataPlatform/PILOT-2735
jianglai3303 Apr 21, 2023
c33c613
PILOT-2593: Replace deprecated github actions and commands
dafelipe130 May 17, 2023
56dff7f
Merge pull request #21 from PilotDataPlatform/PILOT-2593-replace-depr…
andricDu May 17, 2023
c7f403b
Add facet selections to download filter
afmam Jun 12, 2023
d5c5240
Merge pull request #22 from PilotDataPlatform/PILOT-3069
jianglai3303 Jun 12, 2023
b411abb
PILOT-3065: Replace sha id with semver for app tagging
dafelipe130 Jun 12, 2023
50db2a8
Merge pull request #23 from PilotDataPlatform/PILOT-3065-replace-sha-…
dafelipe130 Jun 12, 2023
a8b3459
Update download endpoint to check sqon existence
afmam Jun 16, 2023
1ddbbae
Merge pull request #24 from PilotDataPlatform/PILOT-3069
jianglai3303 Jun 16, 2023
078f211
Trigger rebuild of server filter
afmam Sep 28, 2023
b6cbc91
Add sqon support for project folders
afmam Nov 20, 2023
7f6941d
Remove test code
afmam Nov 20, 2023
e4e8ee1
Update project folder class
afmam Nov 20, 2023
ae1421d
Update zone labels for auth call
afmam Nov 27, 2023
c150424
Merge pull request #33 from PilotDataPlatform/PILOT-3972
jianglai3303 Jan 11, 2024
92f936a
Update RBAC logic for project folders
afmam Jan 19, 2024
66a8f6d
Fix check for namefolder in particular zone
afmam Jan 22, 2024
2b1170f
Remove unused method
afmam Jan 22, 2024
691e15a
Merge pull request #34 from PilotDataPlatform/PILOT-bugfixtest
jianglai3303 Jan 22, 2024
cc0b51a
Update logic to simplify project folder query
afmam Feb 21, 2024
a3258ba
Update auth filter for project admin
afmam Feb 22, 2024
a8495cf
Merge pull request #35 from PilotDataPlatform/PILOT-3972-refactor
jianglai3303 Feb 22, 2024
a500882
Add server filter for nextflow
afmam Feb 26, 2024
263b6f1
Revert package lock changes
afmam Feb 27, 2024
fa29f82
Update storybook to call admin api independently
afmam Feb 27, 2024
422bed4
Update config values
afmam Feb 27, 2024
9488c6e
Merge pull request #36 from PilotDataPlatform/PILOT-4624
jianglai3303 Feb 28, 2024
be381ba
Replace namefolder prefix with users
afmam Apr 22, 2024
ffea7ec
Merge pull request #37 from PilotDataPlatform/PILOT-4969-1
jianglai3303 Apr 26, 2024
10842fc
Add parent path query param to metadata call
afmam Apr 30, 2024
92b4058
Merge pull request #38 from PilotDataPlatform/PILOT-5112
jianglai3303 Apr 30, 2024
60d0b03
[PILOT-5250] Added new deployment pipeline
vbezbakh-indocsystems May 23, 2024
c6677d3
[PILOT-5250] Additional changes
vbezbakh-indocsystems May 23, 2024
ac0096e
[PILOT-5250] Changed pilot pipeline for arranger admin server
vbezbakh-indocsystems Jun 5, 2024
abc2e76
[PILOT-5250] Additional changes
vbezbakh-indocsystems Jun 5, 2024
eb23a2c
[PILOT-5250] Additional changes
vbezbakh-indocsystems Jun 5, 2024
6a51838
[PILOT-5250] Additional changes
vbezbakh-indocsystems Jun 5, 2024
5811351
[PILOT-5250] Added deployment trigger for arranger admin server
vbezbakh-indocsystems Jun 5, 2024
c43c56c
[PILOT-5250] Additional changes
vbezbakh-indocsystems Jun 5, 2024
bc31111
[PILOT-5250] Additional changes
vbezbakh-indocsystems Jun 5, 2024
4ae6dce
[PILOT-5250] Additional changes
vbezbakh-indocsystems Jun 5, 2024
6ffa0a4
[PILOT-5250] Additional changes
vbezbakh-indocsystems Jun 5, 2024
cb54645
[PILOT-5250] Additional changes
vbezbakh-indocsystems Jun 5, 2024
e4bc6eb
[PILOT-5250] Added CODEOWNERS and modified arranger admin ui and serv…
vbezbakh-indocsystems Jun 5, 2024
b5f323a
[PILOT-5250] Additional changes
vbezbakh-indocsystems Jun 5, 2024
0f0d530
[PILOT-5250] Additional changes
vbezbakh-indocsystems Jun 5, 2024
3254f0c
[PILOT-5250] Additional changes
vbezbakh-indocsystems Jun 5, 2024
339fb92
Merge pull request #39 from PilotDataPlatform/PILOT-5250
vbezbakh-indocsystems Jun 5, 2024
cc12d5b
[PILOT-5663] Added trivy step (#40)
vbezbakh-indocsystems Jul 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
Dockerfile
docker-compose.yml
.git
**/node_modules
**/dist
docker
!docker/ui/**
!docker/test/**
.gitignore
.github
Dockerfile*
kubernetes
Jenkinsfile

# Misc
.DS_Store
.env.local
.MISC

node_modules
10 changes: 9 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,15 @@ module.exports = {
],
plugins: ['flowtype', 'prettier', 'jsx-a11y'],
rules: {
'prettier/prettier': [1, { trailingComma: 'all', singleQuote: true }],
'prettier/prettier': [
1,
{
printWidth: 100,
trailingComma: 'all',
semi: true,
singleQuote: true,
},
],
'flowtype/define-flow-type': 1,
'jsx-a11y/href-no-hash': 'off',
},
Expand Down
Empty file added .github/.trivyignore
Empty file.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Code owners for the .github directory
/.github/ @PilotDataPlatform/indoc-devops
132 changes: 132 additions & 0 deletions .github/workflows/build-and-publish-admin-server.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
name: Build and Publish admin server

on:
push:
branches: [patched-version]
paths:
- 'modules/admin/**'
jobs:
extract-branch-name:
runs-on: ubuntu-20.04
outputs:
branch: ${{steps.extract_branch.outputs.branch}}
steps:
- name: Extract Branch Name
id: extract_branch
shell: bash
run: echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
get-version:
runs-on: ubuntu-20.04
outputs:
app_version: ${{steps.get-version.outputs.app_version}}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Get Version
id: get-version
shell: bash
run: |
BRANCH=${GITHUB_REF#refs/heads/}
BASE_VERSION=`sed -n 's/^ *"version":.*"\([^"]*\)".*/\1/p' package.json`
if [ $BRANCH == "patched-version" ]; then
echo "app_version=$BASE_VERSION-`git rev-parse --short HEAD`" >> $GITHUB_OUTPUT
else
echo "app_version=$BASE_VERSION" >> $GITHUB_OUTPUT
fi

build-and-push-docker-image:
needs: [extract-branch-name, get-version]
if: ${{ needs.extract-branch-name.outputs.branch == 'patched-version'}}
name: Build admin server Docker image and push to repositories
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Login to Github Packages
uses: docker/login-action@v2
with:
registry: pilotdataplatform.azurecr.io
username: ${{ secrets.ACR_CLIENT }}
password: ${{ secrets.ACR_SECRET }}
- name: Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
# list of Docker images to use as base name for tags
images: |
pilotdataplatform.azurecr.io/arranger/arranger-admin-server
# generate Docker tags based on the following events/attributes
sep-tags: ','
tags: |
type=raw,prefix=arranger-admin-server-,suffix=,value=${{needs.get-version.outputs.app_version}}
# - name: Image digest
# run: echo ${{ steps.meta.outputs.tags }}
- name: Build image and push to GitHub Container Registry
uses: docker/build-push-action@v4
with:
# relative path to the place where source code with Dockerfile is located
context: .
# Note: tags has to be all lower-case
tags: ${{ steps.meta.outputs.tags }}
# build on feature branches, push only on main branch
push: ${{ github.event_name != 'pull_request' }}
# Sets the target stage to build
target: arranger-admin-server

Trigger:
needs: [build-and-push-docker-image, extract-branch-name, get-version]
#if: ${{ (github.event.workflow_run.conclusion == 'success' && needs.extract-branch-name.outputs.branch == 'patched-version') || (needs.extract-branch-name.outputs.branch == 'main') }}
if: ${{ (needs.extract-branch-name.outputs.branch == 'patched-version') || (needs.extract-branch-name.outputs.branch == 'main') }}
name: Trigger jenkins job
runs-on: ubuntu-latest
steps:
- name: Set branch-based environment variables
uses: iamtheyammer/[email protected]
with:
bevOverwrite: true
ENV: |
main:staging
patched-version:dev
CI_EXTERNAL_URL: |
main:https://ci-external.staging.pilot.indocresearch.com
patched-version:https://ci-external.dev.pilot.indocresearch.com
CI_API_TOKEN: |
main:${{ secrets.CI_API_TOKEN_STG }}
patched-version:${{ secrets.CI_API_TOKEN_DEV }}
- name: echo commit sha
# run: full_commit_SHA="${{ github.event.workflow_run.head_sha }}" && short_commit_SHA=$(echo "${full_commit_SHA:0:7}") && echo "SHA=$short_commit_SHA" >> $GITHUB_ENV
# getting commit_SHA for when this job has been trigger by push (not workflow_run)
run: full_commit_SHA="${{ github.sha }}" && short_commit_SHA=$(echo "${full_commit_SHA:0:7}") && echo "SHA=$short_commit_SHA" >> $GITHUB_ENV
- name: trigger the jenkins pipeline with curl
run: |
target_release=arranger-admin-server
env=${ENV}
echo "The CI external URL is ${CI_EXTERNAL_URL}"
curl --silent -i -X POST -m 60 -L -o output.txt --user jenkins:${CI_API_TOKEN} ${CI_EXTERNAL_URL}/job/Infra/job/UpdateAppVersion/buildWithParameters --data TF_TARGET_ENV=$env --data TARGET_RELEASE=$target_release --data NEW_APP_VERSION="${{needs.get-version.outputs.app_version}}"
location=$(cat output.txt | grep location | cut -d " " -f2 | sed 's/\r//')
link=${location}api/json && echo $link && echo -n "location_link=$link" >> $GITHUB_ENV
- name: getting the json
run: |
sleep 10
curl --silent -o output.json --user jenkins:${CI_API_TOKEN} -X GET "${{ env.location_link }}"
- name: getting the build number
uses: sergeysova/jq-action@v2
id: build_number
with:
cmd: |
cd /github/workspace
build_num=$(jq .executable.number output.json -r)
echo $build_num && echo "build_number=$build_num" >> $GITHUB_ENV
- name: getting the result of the pipeline
run: |
timer=0;
timeout=300;
step=5;
echo "${CI_EXTERNAL_URL}/job/Infra/job/UpdateAppVersion/${{ env.build_number }}/api/json"
result=$(curl --silent --user jenkins:${CI_API_TOKEN} -X GET "${CI_EXTERNAL_URL}/job/Infra/job/UpdateAppVersion/${{ env.build_number }}/api/json" | grep -Eo '"result"[^,]*' | grep -Eo '[^:]*$' | tr -d '"')
while [[ "$result" != "SUCCESS" && "$result" != "FAILURE" && $timer -lt $timeout ]]; do result=$(curl --silent --user jenkins:${CI_API_TOKEN} -X GET "${CI_EXTERNAL_URL}/job/Infra/job/UpdateAppVersion/${{ env.build_number }}/api/json" | grep -Eo '"result"[^,]*' | grep -Eo '[^:]*$' | tr -d '"') && sleep $step && ((timer=timer+step)) && echo "result=$result in $timer seconds"; done
if [ "$result" != "SUCCESS" ]; then exit 1; fi

132 changes: 132 additions & 0 deletions .github/workflows/build-and-publish-admin-ui.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
name: Build and Publish admin ui

on:
push:
branches: [patched-version]
paths:
- 'modules/admin-ui/**'
jobs:
extract-branch-name:
runs-on: ubuntu-20.04
outputs:
branch: ${{steps.extract_branch.outputs.branch}}
steps:
- name: Extract Branch Name
id: extract_branch
shell: bash
run: echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
get-version:
runs-on: ubuntu-20.04
outputs:
app_version: ${{steps.get-version.outputs.app_version}}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Get Version
id: get-version
shell: bash
run: |
BRANCH=${GITHUB_REF#refs/heads/}
BASE_VERSION=`sed -n 's/^ *"version":.*"\([^"]*\)".*/\1/p' package.json`
if [ $BRANCH == "patched-version" ]; then
echo "app_version=$BASE_VERSION-`git rev-parse --short HEAD`" >> $GITHUB_OUTPUT
else
echo "app_version=$BASE_VERSION" >> $GITHUB_OUTPUT
fi

build-and-push-docker-image:
needs: [extract-branch-name, get-version]
if: ${{ needs.extract-branch-name.outputs.branch == 'patched-version'}}
name: Build admin ui Docker image and push to repositories
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Login to Github Packages
uses: docker/login-action@v2
with:
registry: pilotdataplatform.azurecr.io
username: ${{ secrets.ACR_CLIENT }}
password: ${{ secrets.ACR_SECRET }}
- name: Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
# list of Docker images to use as base name for tags
images: |
pilotdataplatform.azurecr.io/arranger/arranger-admin-ui
# generate Docker tags based on the following events/attributes
sep-tags: ','
tags: |
type=raw,prefix=arranger-admin-ui-,suffix=,value=${{needs.get-version.outputs.app_version}}
# - name: Image digest
# run: echo ${{ steps.meta.outputs.tags }}
- name: Build image and push to GitHub Container Registry
uses: docker/build-push-action@v4
with:
# relative path to the place where source code with Dockerfile is located
context: .
# Note: tags has to be all lower-case
tags: ${{ steps.meta.outputs.tags }}
# build on feature branches, push only on main branch
push: ${{ github.event_name != 'pull_request' }}
# Sets the target stage to build
target: arranger-admin-ui

Trigger:
needs: [build-and-push-docker-image, extract-branch-name, get-version]
#if: ${{ (github.event.workflow_run.conclusion == 'success' && needs.extract-branch-name.outputs.branch == 'patched-version') || (needs.extract-branch-name.outputs.branch == 'main') }}
if: ${{ (needs.extract-branch-name.outputs.branch == 'patched-version') || (needs.extract-branch-name.outputs.branch == 'main') }}
name: Trigger jenkins job
runs-on: ubuntu-latest
steps:
- name: Set branch-based environment variables
uses: iamtheyammer/[email protected]
with:
bevOverwrite: true
ENV: |
main:staging
patched-version:dev
CI_EXTERNAL_URL: |
main:https://ci-external.staging.pilot.indocresearch.com
patched-version:https://ci-external.dev.pilot.indocresearch.com
CI_API_TOKEN: |
main:${{ secrets.CI_API_TOKEN_STG }}
patched-version:${{ secrets.CI_API_TOKEN_DEV }}
- name: echo commit sha
# run: full_commit_SHA="${{ github.event.workflow_run.head_sha }}" && short_commit_SHA=$(echo "${full_commit_SHA:0:7}") && echo "SHA=$short_commit_SHA" >> $GITHUB_ENV
# getting commit_SHA for when this job has been trigger by push (not workflow_run)
run: full_commit_SHA="${{ github.sha }}" && short_commit_SHA=$(echo "${full_commit_SHA:0:7}") && echo "SHA=$short_commit_SHA" >> $GITHUB_ENV
- name: trigger the jenkins pipeline with curl
run: |
target_release=arranger-admin-ui
env=${ENV}
echo "The CI external URL is ${CI_EXTERNAL_URL}"
curl --silent -i -X POST -m 60 -L -o output.txt --user jenkins:${CI_API_TOKEN} ${CI_EXTERNAL_URL}/job/Infra/job/UpdateAppVersion/buildWithParameters --data TF_TARGET_ENV=$env --data TARGET_RELEASE=$target_release --data NEW_APP_VERSION="${{needs.get-version.outputs.app_version}}"
location=$(cat output.txt | grep location | cut -d " " -f2 | sed 's/\r//')
link=${location}api/json && echo $link && echo -n "location_link=$link" >> $GITHUB_ENV
- name: getting the json
run: |
sleep 10
curl --silent -o output.json --user jenkins:${CI_API_TOKEN} -X GET "${{ env.location_link }}"
- name: getting the build number
uses: sergeysova/jq-action@v2
id: build_number
with:
cmd: |
cd /github/workspace
build_num=$(jq .executable.number output.json -r)
echo $build_num && echo "build_number=$build_num" >> $GITHUB_ENV
- name: getting the result of the pipeline
run: |
timer=0;
timeout=300;
step=5;
echo "${CI_EXTERNAL_URL}/job/Infra/job/UpdateAppVersion/${{ env.build_number }}/api/json"
result=$(curl --silent --user jenkins:${CI_API_TOKEN} -X GET "${CI_EXTERNAL_URL}/job/Infra/job/UpdateAppVersion/${{ env.build_number }}/api/json" | grep -Eo '"result"[^,]*' | grep -Eo '[^:]*$' | tr -d '"')
while [[ "$result" != "SUCCESS" && "$result" != "FAILURE" && $timer -lt $timeout ]]; do result=$(curl --silent --user jenkins:${CI_API_TOKEN} -X GET "${CI_EXTERNAL_URL}/job/Infra/job/UpdateAppVersion/${{ env.build_number }}/api/json" | grep -Eo '"result"[^,]*' | grep -Eo '[^:]*$' | tr -d '"') && sleep $step && ((timer=timer+step)) && echo "result=$result in $timer seconds"; done
if [ "$result" != "SUCCESS" ]; then exit 1; fi

Loading
Loading