Skip to content

Commit

Permalink
Merge pull request #173 from smartcontractkit/merge-core
Browse files Browse the repository at this point in the history
Merge with core
  • Loading branch information
mateusz-sekara authored Sep 29, 2023
2 parents 9639d1a + b6a7395 commit 49016fb
Show file tree
Hide file tree
Showing 263 changed files with 12,447 additions and 6,718 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ jobs:
id: sonarqube_report_paths
shell: bash
run: |
echo "sonarqube_tests_report_paths=$(find go_core_tests_*_logs -name output.txt | paste -sd "," -)" >> $GITHUB_OUTPUT
echo "sonarqube_coverage_report_paths=$(find go_core_tests_*_logs -name coverage.txt | paste -sd "," -)" >> $GITHUB_OUTPUT
echo "sonarqube_tests_report_paths=$(find go_core_tests_logs -name output.txt | paste -sd "," -)" >> $GITHUB_OUTPUT
echo "sonarqube_coverage_report_paths=$(find go_core_tests_logs -name coverage.txt | paste -sd "," -)" >> $GITHUB_OUTPUT
- name: SonarQube Scan
uses: sonarsource/sonarqube-scan-action@69c1a75940dec6249b86dace6b630d3a2ae9d2a7 # v2.0.1
with:
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/helm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Helm Publish

on:
pull_request:
types: [ labeled ]

jobs:
helm_release:
if: ${{ github.event.label.name == 'helm_release' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Release helm chart
uses: J12934/helm-gh-pages-action@master
with:
charts-folder: charts
deploy-branch: helm-release
access-token: ${{ secrets.HELM_PUSH_TOKEN }}
28 changes: 24 additions & 4 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ jobs:
# - run: echo "this exists so we don't have to run anything else if the build is skipped"
# if: needs.changes.outputs.src == 'false' || needs.solana-test-image-exists.outputs.exists == 'true'
#
# solana-smoke-tests:
# solana-smoke-tests-matrix:
# if: ${{ !contains(join(github.event.pull_request.labels.*.name, ' '), 'skip-smoke-tests') }}
# environment: integration
# permissions:
Expand All @@ -695,7 +695,7 @@ jobs:
# strategy:
# matrix:
# image:
# - name: ""
# - name: (base)
# tag-suffix: ""
# - name: (plugins)
# tag-suffix: -plugins
Expand Down Expand Up @@ -753,6 +753,26 @@ jobs:
# path: /tmp/gotest.log
# retention-days: 7
# continue-on-error: true
#
# ### Used to check the required checks box when the matrix completes
# solana-smoke-tests:
# if: always()
# runs-on: ubuntu-latest
# name: Solana Smoke Tests
# needs: [solana-smoke-tests-matrix]
# steps:
# - name: Check smoke test matrix status
# if: needs.solana-smoke-tests-matrix.result != 'success'
# run: exit 1
# - name: Collect Metrics
# if: always()
# id: collect-gha-metrics
# uses: smartcontractkit/push-gha-metrics-action@d2c2b7bdc9012651230b2608a1bcb0c48538b6ec
# with:
# basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }}
# hostname: ${{ secrets.GRAFANA_CLOUD_HOST }}
# this-job-name: Solana Smoke Tests
# continue-on-error: true
# ### End Solana Section
#
# ### Start Live Testnet Section
Expand Down Expand Up @@ -828,7 +848,7 @@ jobs:
#
# testnet-smoke-tests-notify:
# name: Live Testnet Start Slack Thread
# if: ${{ github.event_name == 'schedule' || (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) && needs.*.result != 'skipped' }}
# if: ${{ always() && needs.testnet-smoke-tests-matrix.result != 'skipped' && needs.testnet-smoke-tests-matrix.result != 'cancelled' }}
# environment: integration
# outputs:
# thread_ts: ${{ steps.slack.outputs.thread_ts }}
Expand Down Expand Up @@ -880,7 +900,7 @@ jobs:
#
# testnet-smoke-tests-results:
# name: Post Live Testnet Smoke Test Results
# if: ${{ github.event_name == 'schedule' || (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) && needs.*.result != 'skipped' }}
# if: ${{ always() && needs.testnet-smoke-tests-matrix.result != 'skipped' && needs.testnet-smoke-tests-matrix.result != 'cancelled' }}
# environment: integration
# permissions:
# checks: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-gh-workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- name: Check out Code
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Run actionlint
uses: reviewdog/action-actionlint@67ec075cacebd361442f6e3ef7671f74c6548909 # v1.38.0
uses: reviewdog/action-actionlint@17ea0452ae2cd009a22ca629732a9ce7f49a55e6 # v1.39.0
- name: Collect Metrics
if: always()
id: collect-gha-metrics
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/solidity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,17 +136,19 @@ jobs:
run:
working-directory: contracts
needs: [changes]
if: needs.changes.outputs.changes == 'true'
name: Prettier Formatting
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Setup NodeJS
if: needs.changes.outputs.changes == 'true'
uses: ./.github/actions/setup-nodejs
- name: Run prettier check
if: needs.changes.outputs.changes == 'true'
run: pnpm prettier:check
- name: Collect Metrics
if: needs.changes.outputs.changes == 'true'
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@d2c2b7bdc9012651230b2608a1bcb0c48538b6ec
with:
Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
golang 1.20.4
golang 1.21.1
mockery 2.28.1
nodejs 16.16.0
postgres 13.3
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ regarding Chainlink social accounts, news, and networking.

## Build Chainlink

1. [Install Go 1.20](https://golang.org/doc/install), and add your GOPATH's [bin directory to your PATH](https://golang.org/doc/code.html#GOPATH)
1. [Install Go 1.21.1](https://golang.org/doc/install), and add your GOPATH's [bin directory to your PATH](https://golang.org/doc/code.html#GOPATH)
- Example Path for macOS `export PATH=$GOPATH/bin:$PATH` & `export GOPATH=/Users/$USER/go`
2. Install [NodeJS v16](https://nodejs.org/en/download/package-manager/) & [pnpm via npm](https://pnpm.io/installation#using-npm).
- It might be easier long term to use [nvm](https://nodejs.org/en/download/package-manager/#nvm) to switch between node versions for different projects. For example, assuming $NODE_VERSION was set to a valid version of NodeJS, you could run: `nvm install $NODE_VERSION && nvm use $NODE_VERSION`
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.5.0-ccip1.2.0
2.6.0-ccip1.2.0
4 changes: 2 additions & 2 deletions charts/chainlink-cluster/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v1
name: chainlink-cluster
description: Chainlink nodes cluster
version: 0.1.0
appVersion: '0.1.0'
version: 0.1.3
appVersion: '2.6.0'
39 changes: 33 additions & 6 deletions charts/chainlink-cluster/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# Chainlink cluster
Example CL nodes cluster for system level tests

Enter the shell
Install `kubefwd` (no nixpkg for it yet, planned)
```
brew install txn2/tap/kubefwd
```

Enter the shell (from the root project dir)
```
nix develop
```
Expand All @@ -20,9 +25,6 @@ export DEVSPACE_IMAGE="${aws_account}.dkr.ecr.us-west-2.amazonaws.com/chainlink-
```
Enter the shell and deploy
```
nix develop
cd charts/chainlink-cluster
# set your unique namespace if it's a new cluster
devspace use namespace cl-cluster
devspace deploy
Expand Down Expand Up @@ -76,11 +78,36 @@ After that all the changes will be synced automatically
Check `.profiles` to understand what is uploaded in profiles `runner` and `node`

# Helm
If you would like to use `helm` directly, please uncomment data in `values.yaml`
## Install
If you would like to use `helm` directly, please uncomment data in `values-raw-helm.yaml`
## Install from local files
```
helm install -f values-raw-helm.yaml cl-cluster .
```
Forward all apps (in another terminal)
```
sudo kubefwd svc
```
Then you can connect and run your tests

## Install from release
Add the repository
```
helm repo add chainlink-cluster https://raw.githubusercontent.com/smartcontractkit/chainlink/helm-release/
helm repo update
```
Set default namespace
```
kubectl create ns cl-cluster
kubectl config set-context --current --namespace cl-cluster
```

Install
```
helm install -f values-raw-helm.yaml cl-cluster chainlink-cluster/chainlink-cluster --version v0.1.2
```

## Create a new release
Bump version in `Chart.yml` add your changes and add `helm_release` label to any PR to trigger a release

## Helm Test
```
Expand Down
1 change: 1 addition & 0 deletions charts/chainlink-cluster/devspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ deployments:
image: ${DEVSPACE_IMAGE}
stateful: false
geth:
version: v1.12.0
wsrpc-port: 8546
httprpc-port: 8544
networkid: 1337
Expand Down
8 changes: 4 additions & 4 deletions charts/chainlink-cluster/templates/chainlink-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ spec:
name: {{ $.Release.Name }}-{{ $cfg.name }}-cm
containers:
- name: chainlink-db
image: {{ default "postgres" $.Values.db.image }}:{{ default "11.15" $.Values.db.version }}
image: {{ default "postgres:11.15" $.Values.db.image }}
command:
- docker-entrypoint.sh
args:
Expand Down Expand Up @@ -164,15 +164,15 @@ spec:
limits:
memory: {{ default "1024Mi" $.Values.chainlink.resources.limits.memory }}
cpu: {{ default "500m" $.Values.chainlink.resources.limits.cpu }}
{{- with $.Values.nodeSelector }}
{{ else }}
{{ end }}
{{- with $.Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{ toYaml . | indent 8 }}
{{- end }}
{{- with $.Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{ toYaml . | indent 8 }}
{{- end }}
{{- with $.Values.tolerations }}
tolerations:
Expand Down
5 changes: 2 additions & 3 deletions charts/chainlink-cluster/templates/geth-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ kind: Deployment
metadata:
name: geth
spec:
replicas: {{ .Values.replicas }}
selector:
matchLabels:
app: geth
Expand Down Expand Up @@ -102,11 +101,11 @@ spec:
{{ end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
Expand Down
21 changes: 10 additions & 11 deletions charts/chainlink-cluster/templates/mockserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,18 @@ spec:
limits:
memory: {{ default "1024Mi" $.Values.chainlink.resources.limits.memory }}
cpu: {{ default "500m" $.Values.chainlink.resources.limits.cpu }}
{{- with $.Values.nodeSelector }}
{{ else }}
{{ end }}
{{- with .Values.nodeSelector }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
{{ end }}
{{ toYaml . | indent 8 }}
{{- end }}
---
2 changes: 1 addition & 1 deletion charts/chainlink-cluster/templates/runner-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ spec:
limits:
memory: {{ default "1024Mi" $.Values.runner.resources.limits.memory }}
cpu: {{ default "500m" $.Values.runner.resources.limits.cpu }}
{{- with $.Values.nodeSelector }}
{{ else }}
{{ end }}
{{- with $.Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
Expand Down
Loading

0 comments on commit 49016fb

Please sign in to comment.