Skip to content

Commit

Permalink
Merge branch 'ccip-develop' into CCIP-1039-Publish-test-image-on-each…
Browse files Browse the repository at this point in the history
…-release-with-release-tag
  • Loading branch information
jasonmci authored Oct 12, 2023
2 parents c588cfc + b6ac461 commit caed90f
Show file tree
Hide file tree
Showing 429 changed files with 26,244 additions and 11,826 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: (legacy)
# 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
87 changes: 74 additions & 13 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ name: publish
on:
push:
tags:
- 'v*'
- "v*"
branches:
- ccip-develop
- deployment-test

jobs:
build-and-publish:
# Do not trigger from versioned tags.
if: ${{ ! startsWith(github.ref, 'refs/tags/v') }}
environment: publish
permissions:
id-token: write
Expand Down Expand Up @@ -39,39 +41,98 @@ jobs:
role-duration-seconds: ${{ secrets.AWS_ROLE_DURATION_SECONDS }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Login to ECR
uses: docker/login-action@42d299face0c5c43a0487c477f595ac9cf22f1a7 #v1.12.0
uses: docker/login-action@42d299face0c5c43a0487c477f595ac9cf22f1a7 # v1.12.0
with:
registry: ${{ secrets.AWS_ECR_REPO_URL }}
# We add SemVer build metadata to indicate the core version in a git tag
# like: v0.2.0-beta.0+core2.0.0
# The plus "+" sign is invalid for Docker images so we replace it with a
# hyphen "-". We also remove the leading "v" prefix from the tag.
- name: Docker meta
id: docker_meta
uses: docker/metadata-action@507c2f2dc502c992ad446e3d7a5dfbe311567a96 # v4.3.0
with:
images: ${{ secrets.AWS_ECR_REPO_URL }} # list of Docker images to use as base name for tags
tags: |
type=sha,enable={{is_default_branch}}
type=sha,format=long,enable={{is_default_branch}}
- name: Fetch operator-ui
shell: bash
env:
GH_TOKEN: ${{ github.token }}
run: make operator-ui
- name: Build and push
id: docker_build
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 # v3.2.0
with:
context: .
push: true
file: ./core/chainlink.Dockerfile
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
build-args: |
CHAINLINK_USER=chainlink
build-and-publish-release:
# Trigger only from versioned tags.
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
environment: publish
env:
# Public ECR is only available in us-east-1; not a secret.
AWS_REGION: us-east-1
AWS_ECR_REPO_PUBLIC_REGISTRY: public.ecr.aws
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest
steps:
- name: Collect Metrics
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@8163dcea2f01a0a8fec84b284406ff7af1d2e1c0
with:
basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }}
hostname: ${{ secrets.GRAFANA_CLOUD_HOST }}
this-job-name: build-and-publish-release
continue-on-error: true

- name: Checkout the repo
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@94ab11c41e45d028884a99163086648e898eed25 # v1.6.0
with:
version: latest
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@67fbcbb121271f7775d2e7715933280b06314838 # v1.7.0
with:
role-to-assume: ${{ secrets.AWS_OIDC_IAM_ROLE_PROD_PUBLISH_ARN }}
role-duration-seconds: ${{ secrets.AWS_ROLE_DURATION_SECONDS }}
aws-region: ${{ env.AWS_REGION }}
- name: Login to ECR
uses: docker/login-action@42d299face0c5c43a0487c477f595ac9cf22f1a7 # v1.12.0
with:
registry: ${{ env.AWS_ECR_REPO_PUBLIC_REGISTRY }}
# We use the core SemVer version and then append the the CCIP version in
# a git tag like: v2.5.0-ccip1.1.1
# We also remove the leading "v" prefix from the tag and convert any "+"
# to "-".
- name: Generate Docker image version tag
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
id: generate-docker-image-tag
shell: bash
run: |
# The "#v" removes the "v" prefix from the ref name
GITHUB_REF_NAME="${GITHUB_REF_NAME#v}"
# Replace "+" with "-" to make it a valid Docker tag
# Replace any "+" with "-" to make it a valid Docker tag
GITHUB_REF_NAME="${GITHUB_REF_NAME//+/-}"
OUTPUT="type=raw,value=${GITHUB_REF_NAME},enable=true"
echo "tag=${OUTPUT}" | tee -a "${GITHUB_OUTPUT}"
- name: Docker meta
id: docker_meta
uses: docker/metadata-action@507c2f2dc502c992ad446e3d7a5dfbe311567a96 # v4.3.0
with:
images: ${{ secrets.AWS_ECR_REPO_URL }} # list of Docker images to use as base name for tags
images: ${{ env.AWS_ECR_REPO_PUBLIC_REGISTRY }}/w0i8p0z9/chainlink-ccip
tags: |
type=sha
type=sha,format=long
type=raw,value=latest,enable={{is_default_branch}}
${{ steps.generate-docker-image-tag.outputs.tag }}
- name: Fetch operator-ui
shell: bash
env:
GH_TOKEN: ${{ github.token }}
run: make operator-ui
run: make operator-ui
- name: Build and push
id: docker_build
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 # v3.2.0
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
Loading

0 comments on commit caed90f

Please sign in to comment.