Skip to content

Commit

Permalink
Merge pull request #9974 from smartcontractkit/release/2.3.0
Browse files Browse the repository at this point in the history
release/2.3.0 -> master
  • Loading branch information
chainchad authored Aug 2, 2023
2 parents 04b07d7 + 7680667 commit f054691
Show file tree
Hide file tree
Showing 1,141 changed files with 81,286 additions and 42,086 deletions.
2 changes: 1 addition & 1 deletion .github/actions/build-test-image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ runs:
file: ./integration-tests/test.Dockerfile
build-args: |
BASE_IMAGE=${{ inputs.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ inputs.QA_AWS_REGION }}.amazonaws.com/test-base-image
IMAGE_VERSION=v0.32.3
IMAGE_VERSION=v0.32.9
SUITES="${{ inputs.suites }}"
AWS_REGION: ${{ inputs.QA_AWS_REGION }}
AWS_ROLE_TO_ASSUME: ${{ inputs.QA_AWS_ROLE_TO_ASSUME }}
Expand Down
8 changes: 8 additions & 0 deletions .github/actions/goreleaser-build-sign-publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ inputs:
cosign-password:
description: The password to decrypt the cosign private key needed to sign the image
required: false
outputs:
goreleaser-metadata:
description: "Build result metadata"
value: ${{ steps.goreleaser.outputs.metadata }}
goreleaser-artifacts:
description: "Build result artifacts"
value: ${{ steps.goreleaser.outputs.artifacts }}
runs:
using: composite
steps:
Expand Down Expand Up @@ -86,6 +93,7 @@ runs:
with:
registry: ${{ inputs.docker-registry }}
- name: Goreleaser release
id: goreleaser
shell: bash
env:
ENABLE_COSIGN: ${{ inputs.enable-cosign }}
Expand Down
3 changes: 3 additions & 0 deletions .github/actions/goreleaser-build-sign-publish/action_utils
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ goreleaser_release() {
rm -rf cosign.pub
rm -rf cosign.key
fi

echo "metadata=$(cat dist/metadata.json)" >> "$GITHUB_OUTPUT"
echo "artifacts=$(cat dist/artifacts.json)" >> "$GITHUB_OUTPUT"
}

"$@"
2 changes: 1 addition & 1 deletion .github/actions/setup-hardhat/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ inputs:
required: true
description: A cache namespace to add
cache-version:
default: "5"
default: "6"
description: Change to bust cache
description: Setup pnpm for contracts
runs:
Expand Down
51 changes: 51 additions & 0 deletions .github/actions/version-file-bump/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: version-file-bump
description: "Ensure that the VERSION file has been bumped since the last release."
inputs:
github-token:
description: "Github access token"
default: ${{ github.token }}
required: true
outputs:
result:
value: ${{ steps.compare.outputs.result }}
description: 'Result of the comparison'
runs:
using: composite
steps:
- name: Get latest release version
id: get-latest-version
shell: bash
run: |
untrimmed_ver=$(
curl --header "Authorization: token ${{ inputs.github-token }}" \
--request GET \
"https://api.github.com/repos/${{ github.repository }}/releases/latest?draft=false&prerelease=false" \
| jq -r .name
)
latest_version="${untrimmed_ver:1}"
echo "latest_version=${latest_version}" | tee -a "$GITHUB_OUTPUT"
- name: Get current version
id: get-current-version
shell: bash
run: |
current_version=$(head -n1 ./VERSION)
echo "current_version=${current_version}" | tee -a "$GITHUB_OUTPUT"
- name: Compare semantic versions
uses: smartcontractkit/chainlink-github-actions/[email protected]
id: compare
with:
version1: ${{ steps.get-current-version.outputs.current_version }}
operator: eq
version2: ${{ steps.get-latest-version.outputs.latest_version }}
- name: Fail if version not bumped
# XXX: The reason we are not checking if the current is greater than the
# latest release is to account for hot fixes which may have been branched
# from a previous tag.
shell: bash
env:
VERSION_NOT_BUMPED: ${{ steps.compare.outputs.result }}
run: |
if [[ "${VERSION_NOT_BUMPED:-}" = "true" ]]; then
echo "Version file not bumped since last release. Please bump the ./VERSION file in the root of the repo and commit the change."
exit 1
fi
9 changes: 5 additions & 4 deletions .github/workflows/automation-benchmark-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
description: Chainlink image version to use
required: true
type: string
default: 1.10.0
default: 2.0.0
chainlinkImage:
description: Chainlink image repo to use
required: true
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
done
done <<< "$EVM_HTTP_URLS"
- name: Checkout the repo
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
ref: ${{ env.REF_NAME }}
- name: Build Test Image
Expand All @@ -107,12 +107,13 @@ jobs:
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }}
QA_AWS_ACCOUNT_NUMBER: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}
- name: Run Tests
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@ab595504ae9cf10c60eb8d2c5ce025284e58b210 # v2.1.5
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@bc6e3b5cf369b76e361d372ceb7d144525635ce0 # v2.2.0
env:
DETACH_RUNNER: true
TEST_SUITE: benchmark
TEST_ARGS: -test.timeout 720h
ENV_JOB_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-tests:${{ github.sha }}
INTERNAL_DOCKER_REPO: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com
with:
test_command_to_run: cd integration-tests && go test -timeout 30m -v -run ^TestAutomationBenchmark$ ./benchmark -count=1
test_download_vendor_packages_command: make gomod
Expand All @@ -127,7 +128,7 @@ jobs:
- name: Collect Metrics
if: always()
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@8163dcea2f01a0a8fec84b284406ff7af1d2e1c0
uses: smartcontractkit/push-gha-metrics-action@90fcbaac8ebf86da9c4d55dba24f6fe3029f0e0b
with:
basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }}
hostname: ${{ secrets.GRAFANA_CLOUD_HOST }}
Expand Down
201 changes: 201 additions & 0 deletions .github/workflows/automation-ondemand-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
name: Automation On Demand Tests
on:
workflow_dispatch:
inputs:
chainlinkVersion:
description: Chainlink image version to use
required: false
type: string
chainlinkImage:
description: Chainlink image repo to use (Leave empty to build from head/ref)
required: false
type: string

env:
ENV_JOB_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-tests:${{ github.sha }}
CHAINLINK_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink

jobs:
build-chainlink:
environment: integration
permissions:
id-token: write
contents: read
strategy:
matrix:
image:
- name: ""
dockerfile: core/chainlink.Dockerfile
tag-suffix: ""
- name: (plugins)
dockerfile: plugins/chainlink.Dockerfile
tag-suffix: -plugins
name: Build Chainlink Image ${{ matrix.image.name }}
runs-on: ubuntu20.04-16cores-64GB
steps:
- name: Collect Metrics
if: inputs.chainlinkImage == ''
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 Chainlink Image ${{ matrix.image.name }}
continue-on-error: true
- name: Checkout the repo
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
ref: ${{ github.head_ref || github.ref_name }}
- name: Check if image exists
if: inputs.chainlinkImage == ''
id: check-image
uses: smartcontractkit/chainlink-github-actions/docker/image-exists@bc6e3b5cf369b76e361d372ceb7d144525635ce0 #v2.2.0
with:
repository: chainlink
tag: ${{ github.sha }}${{ matrix.image.tag-suffix }}
AWS_REGION: ${{ secrets.QA_AWS_REGION }}
AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
- name: Build Image
if: steps.check-image.outputs.exists == 'false' && inputs.chainlinkImage == ''
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-image@bc6e3b5cf369b76e361d372ceb7d144525635ce0 # v2.2.0
with:
cl_repo: smartcontractkit/chainlink
cl_ref: ${{ github.sha }}
cl_dockerfile: ${{ matrix.image.dockerfile }}
push_tag: ${{ env.CHAINLINK_IMAGE }}:${{ github.sha }}${{ matrix.image.tag-suffix }}
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }}
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
- name: Print Chainlink Image Built
if: inputs.chainlinkImage == ''
run: |
echo "### chainlink node image tag used for this test run :link:" >>$GITHUB_STEP_SUMMARY
echo "\`${GITHUB_SHA}\`" >>$GITHUB_STEP_SUMMARY
build-test-image:
environment: integration
permissions:
id-token: write
contents: read
name: Build Test Image
runs-on: ubuntu20.04-16cores-64GB
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 Test Image
continue-on-error: true
- name: Checkout the repo
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
ref: ${{ github.head_ref || github.ref_name }}
- name: Build Test Image
uses: ./.github/actions/build-test-image
with:
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }}
QA_AWS_ACCOUNT_NUMBER: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}

automation-on-demand-tests:
environment: integration
permissions:
checks: write
pull-requests: write
id-token: write
contents: read
needs: [ build-chainlink, build-test-image ]
env:
CHAINLINK_COMMIT_SHA: ${{ github.sha }}
CHAINLINK_ENV_USER: ${{ github.actor }}
TEST_LOG_LEVEL: debug
strategy:
fail-fast: false
matrix:
tests:
- name: chaos
suite: chaos
nodes: 5
os: ubuntu-latest
pyroscope_env: ci-automation-on-demand-chaos
network: SIMULATED
command: -run ^TestAutomationChaos$ ./chaos
- name: reorg
suite: reorg
nodes: 1
os: ubuntu-latest
pyroscope_env: ci-automation-on-demand-reorg
network: SIMULATED_NONDEV
command: -run ^TestAutomationReorg$ ./reorg
- name: upgrade
suite: smoke
nodes: 1
os: ubuntu-latest
pyroscope_env: ci-automation-on-demand-upgrade
network: SIMULATED
command: -run ^TestAutomationNodeUpgrade$ ./smoke
runs-on: ${{ matrix.tests.os }}
name: Automation On Demand ${{ matrix.tests.name }} Test
steps:
- name: Checkout the repo
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
ref: ${{ github.head_ref || github.ref_name }}
- name: Determine build to use
id: determine-build
shell: bash
run: |
if [[ "${{ inputs.chainlinkImage }}" == "" ]]; then
echo "image=${{ env.CHAINLINK_IMAGE }}" >>$GITHUB_OUTPUT
echo "version=${{ github.sha }}" >>$GITHUB_OUTPUT
echo "upgrade_version=${{ github.sha }}" >>$GITHUB_OUTPUT
else
echo "image=${{ inputs.chainlinkImage }}" >>$GITHUB_OUTPUT
echo "version=${{ inputs.chainlinkVersion }}" >>$GITHUB_OUTPUT
echo "upgrade_version=${{ inputs.chainlinkVersion }}" >>$GITHUB_OUTPUT
fi
if [[ "${{ matrix.tests.name }}" == "upgrade" ]]; then
echo "image=${{ env.CHAINLINK_IMAGE }}" >>$GITHUB_OUTPUT
echo "version=develop" >>$GITHUB_OUTPUT
fi
- name: Run Tests
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@bc6e3b5cf369b76e361d372ceb7d144525635ce0 #v2.2.0
env:
PYROSCOPE_SERVER: ${{ matrix.tests.pyroscope_env == '' && '' || !startsWith(github.ref, 'refs/tags/') && '' || secrets.QA_PYROSCOPE_INSTANCE }} # Avoid sending blank envs https://github.com/orgs/community/discussions/25725
PYROSCOPE_ENVIRONMENT: ${{ matrix.tests.pyroscope_env }}
PYROSCOPE_KEY: ${{ secrets.QA_PYROSCOPE_KEY }}
SELECTED_NETWORKS: ${{ matrix.tests.network }}
TEST_SUITE: ${{ matrix.tests.suite }}
TEST_UPGRADE_VERSION: ${{ steps.determine-build.outputs.upgrade_version }}
TEST_UPGRADE_IMAGE: ${{ env.CHAINLINK_IMAGE }}
with:
test_command_to_run: make test_need_operator_assets && cd ./integration-tests && go test -timeout 30m -count=1 -json -test.parallel=${{ matrix.tests.nodes }} ${{ matrix.tests.command }} 2>&1 | tee /tmp/gotest.log | gotestfmt
test_download_vendor_packages_command: cd ./integration-tests && go mod download
cl_repo: ${{ steps.determine-build.outputs.image }}
cl_image_tag: ${{ steps.determine-build.outputs.version }}
artifacts_location: ./integration-tests/${{ matrix.tests.suite }}/logs
publish_check_name: Automation On Demand Results ${{ matrix.tests.name }}
token: ${{ secrets.GITHUB_TOKEN }}
go_mod_path: ./integration-tests/go.mod
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }}
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }}
- name: Upload test log
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
if: failure()
with:
name: test-log-${{ matrix.tests.name }}
path: /tmp/gotest.log
retention-days: 7
continue-on-error: true
- name: Collect Metrics
if: always()
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: Automation On Demand ${{ matrix.tests.name }} Test
test-results-file: '{"testType":"go","filePath":"/tmp/gotest.log"}'
continue-on-error: true
6 changes: 3 additions & 3 deletions .github/workflows/bash-cicd-scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
bash-cicd-scripts-src: ${{ steps.bash-cicd-scripts.outputs.src }}
steps:
- name: Checkout the repo
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
id: bash-cicd-scripts
with:
Expand All @@ -25,7 +25,7 @@ jobs:
needs: [changes]
steps:
- name: Checkout the repo
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Run ShellCheck
if: needs.changes.outputs.bash-cicd-scripts-src == 'true'
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # v2.0.0
Expand All @@ -40,7 +40,7 @@ jobs:
shell: bash
steps:
- name: Checkout the repo
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Install shellspec
if: needs.changes.outputs.bash-cicd-scripts-src == 'true'
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-publish-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
name: push-chainlink-develop ${{ matrix.image.name }}
steps:
- name: Checkout repository
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3

- name: Build, sign and publish chainlink image
uses: ./.github/actions/build-sign-publish-chainlink
Expand All @@ -40,7 +40,7 @@ jobs:
- name: Collect Metrics
if: always()
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@8163dcea2f01a0a8fec84b284406ff7af1d2e1c0
uses: smartcontractkit/push-gha-metrics-action@90fcbaac8ebf86da9c4d55dba24f6fe3029f0e0b
with:
basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }}
hostname: ${{ secrets.GRAFANA_CLOUD_HOST }}
Expand Down
Loading

0 comments on commit f054691

Please sign in to comment.