-
Notifications
You must be signed in to change notification settings - Fork 16
Harness pipeline #609
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
Open
chillaq
wants to merge
71
commits into
development
Choose a base branch
from
harness-pipeline
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Harness pipeline #609
Changes from 70 commits
Commits
Show all changes
71 commits
Select commit
Hold shift + click to select a range
252c195
Merge pull request #607 from splitio/development
chillaq 7a652f3
Create pipeline ruby-client
chillaq 6e40b2c
Update pipeline ruby-client
chillaq 2bfaaa1
Update pipeline ruby-client
chillaq d0e270e
Update pipeline ruby-client
chillaq 2a2bf39
remove ci
chillaq 85612cf
Create pipeline ruby-client
chillaq 9e2029b
Update pipeline ruby-client
chillaq 18aeb95
Update pipeline ruby-client
chillaq 84801ef
Update pipeline ruby-client
chillaq c7c7fc3
Update pipeline ruby-client
chillaq 857ffc9
Update pipeline ruby-client
chillaq 8b26a2b
Update pipeline ruby-client
chillaq fabea8c
Update pipeline ruby-client
chillaq c628117
Update pipeline ruby-client
chillaq 795602e
Update pipeline ruby-client
chillaq cf4e449
Update pipeline ruby-client
chillaq aa662fc
Update pipeline ruby-client
chillaq 36fbd2b
Update pipeline ruby-client
chillaq 519cd94
Update pipeline ruby-client
chillaq 77ca6a7
Update pipeline ruby-client
chillaq a0bea20
Update pipeline ruby-client
chillaq 51b7937
Update pipeline ruby-client
chillaq ce6c1a2
Update pipeline ruby-client
chillaq 72daf17
Update pipeline ruby-client
chillaq f161f7b
Update pipeline ruby-client
chillaq 684f714
Update pipeline ruby-client
chillaq 08ccd04
Update pipeline ruby-client
chillaq 896e1fd
Update pipeline ruby-client
chillaq 0cdcbfd
Update pipeline ruby-client
chillaq 8d456dd
Update pipeline ruby-client
chillaq b8d2367
Update pipeline ruby-client
chillaq b99ed5b
Update pipeline ruby-client
chillaq 3f53121
Update pipeline ruby-client
chillaq f05d864
Update pipeline ruby-client
chillaq eb57d8f
Update pipeline ruby-client
chillaq 77c8001
Update pipeline ruby-client
chillaq 4ab4799
Update pipeline ruby-client
chillaq 945a1cb
Update pipeline ruby-client
chillaq 9cebeb1
Update pipeline ruby-client
chillaq a121d08
Update pipeline ruby-client
chillaq 9469f70
Update pipeline ruby-client
chillaq d34f858
Update pipeline ruby-client
chillaq 2be1c1e
Update pipeline ruby-client
chillaq c8f31c7
Update pipeline ruby-client
chillaq cb9394d
Update pipeline ruby-client
chillaq 7571bb8
Update pipeline ruby-client
chillaq 240a43f
Update pipeline ruby-client
chillaq b6bec3b
Update pipeline ruby-client
chillaq c69f193
Update pipeline ruby-client
chillaq d378a28
Update pipeline ruby-client
chillaq cd7fad6
Update pipeline ruby-client
chillaq 28a1844
Update pipeline ruby-client
chillaq 645e130
Update pipeline ruby-client
chillaq f9afcff
Update pipeline ruby-client
chillaq 91f98d7
Update pipeline ruby-client
chillaq 76b9f2f
Update pipeline ruby-client
chillaq 51c9bf0
Update pipeline ruby-client
chillaq 3147a6b
Update pipeline ruby-client
chillaq d538fd3
Update pipeline ruby-client
chillaq 200e8d5
Create inputset ruby
chillaq 9440c4d
Update pipeline ruby-client
chillaq 6a6dcb7
Update pipeline ruby-client
chillaq 52929c5
Update pipeline ruby-client
chillaq 0e1fa76
fix test
chillaq 93100be
Merge branch 'harness-pipeline' of https://github.com/splitio/ruby-cl…
chillaq edc1579
fix test
chillaq c3a4757
added encoding to test
chillaq 4fa3df1
Update pipeline ruby-client
chillaq cded796
Update pipeline ruby-client
chillaq fd2797e
Update .harness/orgs/PROD/projects/Harness_Split/pipelines/rubyclient…
chillaq File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
181 changes: 181 additions & 0 deletions
181
.harness/orgs/PROD/projects/Harness_Split/pipelines/rubyclient.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,181 @@ | ||
| pipeline: | ||
| name: ruby-client | ||
| identifier: rubyclient | ||
| projectIdentifier: Harness_Split | ||
| orgIdentifier: PROD | ||
| tags: {} | ||
| properties: | ||
| ci: | ||
| codebase: | ||
| connectorRef: fmegithubharnessgitops | ||
| repoName: ruby-client | ||
| build: <+input> | ||
| branch: harness-pipeline | ||
| filePath: .harness/orgs/PROD/projects/Harness_Split/pipelines/rubyclient.yaml | ||
| stages: | ||
| - stage: | ||
| name: Build and Test | ||
| identifier: build_and_test | ||
| type: CI | ||
| spec: | ||
| cloneCodebase: true | ||
| caching: | ||
| enabled: true | ||
| override: true | ||
| platform: | ||
| os: Linux | ||
| arch: Amd64 | ||
| runtime: | ||
| type: Cloud | ||
| spec: | ||
| nestedVirtualization: true | ||
| execution: | ||
| steps: | ||
| - step: | ||
| type: Run | ||
| name: Run Tests 2_5_0 | ||
| identifier: Run_Tests_2_5_0 | ||
| spec: | ||
| connectorRef: account.harnessImage | ||
| image: ruby:2.5.0 | ||
| shell: Sh | ||
| command: |- | ||
| echo "running sources" | ||
| sed -i 's/deb.debian.org/archive.debian.org/g' /etc/apt/sources.list | ||
| sed -i 's|security.debian.org|archive.debian.org/debian-security|g' /etc/apt/sources.list | ||
| sed -i '/stretch-updates/d' /etc/apt/sources.list | ||
| echo "running update" | ||
| apt-get update | ||
| #echo "install build" | ||
| apt-get install -y build-essential --allow-unauthenticated | ||
|
|
||
| echo "install redis" | ||
| apt-get install -y redis-server --allow-unauthenticated | ||
| redis-server /etc/redis/redis.conf & | ||
|
|
||
| # Install dependencies using Bundle | ||
| cd /harness | ||
| export GEM_HOME=/usr/local/lib/ruby/gems/2.5.0 | ||
|
|
||
| echo "update system gem" | ||
| gem update --system 3.2.3 | ||
|
|
||
| echo "install bundle" | ||
| #gem env | ||
| gem uninstall bundler | ||
| gem install bundler -v 2.2.3 | ||
|
|
||
| echo "link bundle" | ||
| rm /usr/local/bin/bundle | ||
| ln -s /usr/local/lib/ruby/gems/2.5.0/gems/bundler-2.2.3/exe/bundle /usr/local/bin/bundle | ||
| gem install public_suffix -v 1.5.3 | ||
|
|
||
| echo "run bundle install" | ||
| bundle install | ||
|
|
||
| echo "running tests" | ||
| bundle exec rake | ||
| timeout: 30m | ||
| contextType: Pipeline | ||
| - step: | ||
| type: Run | ||
| name: Run Tests 3_2_2 | ||
| identifier: setup_ruby | ||
| spec: | ||
| connectorRef: account.harnessImage | ||
| image: ruby:3.2.2-alpine | ||
| shell: Sh | ||
| command: |- | ||
| apk update | ||
| apk add git build-base | ||
| apk add redis | ||
| redis-server /etc/redis.conf & | ||
|
|
||
| # Install dependencies using Bundle | ||
| cd /harness | ||
|
|
||
| echo "running bundle install" | ||
| bundle install | ||
|
|
||
| echo "running rake compile" | ||
| rake compile:murmurhash | ||
|
|
||
| bundle exec rubocop | ||
|
|
||
| echo "running tests" | ||
| bundle exec rake | ||
| timeout: 30m | ||
| - step: | ||
| type: Run | ||
| name: Install and Run SonarQube Scanner | ||
| identifier: install_sonarqube_scanner | ||
| spec: | ||
| connectorRef: account.harnessImage | ||
| image: sonarsource/sonar-scanner-cli | ||
| shell: Bash | ||
| command: | | ||
| cd /harness | ||
| if [ "<+codebase.prNumber>" != "" ]; then | ||
| echo "Pull Request Analysis" | ||
| sonar-scanner -X \ | ||
| -Dsonar.host.url=https://sonar.harness.io \ | ||
| -Dsonar.token=<+secrets.getValue('sonarqube-token')> \ | ||
| -Dsonar.projectKey=ruby-client \ | ||
| -Dsonar.scanner.skipJreProvisioning=true \ | ||
| -Dsonar.pullrequest.key=<+codebase.prNumber> \ | ||
| -Dsonar.pullrequest.branch=<+codebase.sourceBranch> \ | ||
| -Dsonar.pullrequest.base=<+codebase.targetBranch> \ | ||
| -Dsonar.scanner.skipSystemTruststore=true | ||
| else | ||
| echo "Branch Analysis" | ||
| sonar-scanner \ | ||
| -Dsonar.host.url=https://sonar.harness.io \ | ||
| -Dsonar.token=<+secrets.getValue('sonarqube-token')> \ | ||
| -Dsonar.projectKey=ruby-client \ | ||
| -Dsonar.scanner.skipJreProvisioning=true \ | ||
| -Dsonar.branch.name=<+codebase.branch> \ | ||
| -Dsonar.scanner.skipSystemTruststore=true | ||
| fi | ||
| envVariables: | ||
| SONAR_TOKEN: <+pipeline.variables.sonarqube_token> | ||
| outputVariables: | ||
| - name: SONAR_SCANNER_PATH | ||
| timeout: 10m | ||
| - step: | ||
| type: Run | ||
| name: Post Quality Gate to GitHub | ||
| identifier: Post_Quality_Gate_to_GitHub | ||
| spec: | ||
| shell: Sh | ||
| command: |- | ||
| # Get SonarQube quality gate status | ||
| curl -u <+secrets.getValue('sonarqube-token')>: \ | ||
| -s "https://sonar.harness.io/api/qualitygates/project_status?projectKey=ruby-client&pullRequest=${<+codebase.prNumber>}" | ||
|
|
||
| curl -u <+secrets.getValue('sonarqube-token')>: -s 'https://sonar.harness.io/api/qualitygates/project_status?projectKey=ruby-client&pullRequest=${<+codebase.prNumber>}' | jq -r .projectStatus.status | ||
|
|
||
| QUALITY_GATE_STATUS=$(curl -u <+secrets.getValue('sonarqube-token')>: -s 'https://sonar.harness.io/api/qualitygates/project_status?projectKey=ruby-client&pullRequest=${<+codebase.prNumber>}' | jq -r .projectStatus.status) | ||
|
|
||
| echo "QUALITY_GATE_STATUS: $QUALITY_GATE_STATUS" | ||
|
|
||
| # Set GitHub status based on quality gate | ||
| if [ "$QUALITY_GATE_STATUS" = "OK" ]; then | ||
| STATE="success" | ||
| DESCRIPTION="SonarQube Quality Gate passed" | ||
| else | ||
| STATE="failure" | ||
| DESCRIPTION="SonarQube Quality Gate failed" | ||
| fi | ||
|
|
||
| # Post status to GitHub | ||
| curl -X POST \ | ||
| -H "Authorization: token ${<+secrets.getValue('github-devops-token')>}" \ | ||
| -H "Content-Type: application/json" \ | ||
| -d "{ | ||
| \"state\": \"${STATE}\", | ||
| \"description\": \"${DESCRIPTION}\", | ||
| \"context\": \"sonarqube/qualitygate\", | ||
| \"target_url\": \"https://sonar.harness.io/dashboard?id=ruby-client&pullRequest=${<+codebase.prNumber>}\" | ||
| }" \ | ||
| "https://api.github.com/repos/splitio/ruby-client/statuses/<+codebase.commitSha>" | ||
| description: This pipeline was generated by Harness AI on 2026-02-05 18:40:52 UTC by Bilal Al-Shahwany. | ||
14 changes: 14 additions & 0 deletions
14
.harness/orgs/PROD/projects/Harness_Split/pipelines/rubyclient/input_sets/ruby.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| inputSet: | ||
| name: ruby | ||
| identifier: ruby | ||
| orgIdentifier: PROD | ||
| projectIdentifier: Harness_Split | ||
| pipeline: | ||
| identifier: rubyclient | ||
| properties: | ||
| ci: | ||
| codebase: | ||
| build: | ||
| type: PR | ||
| spec: | ||
| number: <+trigger.prNumber> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.