Skip to content

Commit

Permalink
Initial move of integration-tests/deployment to /deployment as a sepa…
Browse files Browse the repository at this point in the history
…rate module.

This updates the dependencies, and makes the integration-tests depend on both chainlink and the deployments package.

A few things to fix.  The go.mod entry for deployments is off, because there is no version currently checked-in. It's overridden in a replace statement, but I'm not sure if there are any contexts in which that goes wrong. It just seems weird to keep an incorrect version number there.
  • Loading branch information
cgruber committed Oct 22, 2024
1 parent 83c3a32 commit 36d7a81
Show file tree
Hide file tree
Showing 110 changed files with 2,949 additions and 166 deletions.
5 changes: 5 additions & 0 deletions .changeset/hot-mice-yell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

Relocation of the deployment directory into a direct subdir of the root. #internal
6 changes: 3 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ core/scripts/gateway @smartcontractkit/dev-services

# Deployment tooling
# Initially the common structures owned by CCIP
/integration-tests/deployment @smartcontractkit/ccip @smartcontractkit/keystone
/integration-tests/deployment/ccip @smartcontractkit/ccip
/integration-tests/deployment/keystone @smartcontractkit/keystone
/deployment @smartcontractkit/ccip @smartcontractkit/keystone
/deployment/ccip @smartcontractkit/ccip
/deployment/keystone @smartcontractkit/keystone
# TODO: As more products add their deployment logic here, add the team as an owner

# CI/CD
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/ci-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ jobs:
with:
filters: |
changes:
- 'integration-tests/deployment/**'
- 'deployment/**'
- '!integration-tests/**'
- 'integration-tests/deployment/**'
- name: Ignore Filter On Workflow Dispatch
if: ${{ github.event_name == 'workflow_dispatch' }}
id: ignore-filter
Expand Down
6 changes: 3 additions & 3 deletions core/scripts/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.22.8
// Make sure we're working with the latest chainlink libs
replace github.com/smartcontractkit/chainlink/v2 => ../../

replace github.com/smartcontractkit/chainlink/integration-tests => ../../integration-tests
replace github.com/smartcontractkit/chainlink/deployment => ../../deployment

require (
github.com/docker/docker v27.3.1+incompatible
Expand All @@ -25,8 +25,8 @@ require (
github.com/shopspring/decimal v1.4.0
github.com/smartcontractkit/chainlink-automation v0.8.0
github.com/smartcontractkit/chainlink-common v0.3.1-0.20241021103500-39a6e78c0286
github.com/smartcontractkit/chainlink/integration-tests v0.0.0-00010101000000-000000000000
github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000
github.com/smartcontractkit/chainlink/deployment v0.0.0-00010101000000-000000000000
github.com/smartcontractkit/chainlink/v2 v2.17.0
github.com/smartcontractkit/libocr v0.0.0-20241007185508-adbe57025f12
github.com/spf13/cobra v1.8.1
github.com/spf13/viper v1.19.0
Expand Down
2 changes: 1 addition & 1 deletion core/scripts/keystone/src/01_deploy_contracts_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/ethereum/go-ethereum/common"

helpers "github.com/smartcontractkit/chainlink/core/scripts/common"
ksdeploy "github.com/smartcontractkit/chainlink/integration-tests/deployment/keystone"
ksdeploy "github.com/smartcontractkit/chainlink/deployment/keystone"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/forwarder"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/ocr3_capability"
)
Expand Down
2 changes: 1 addition & 1 deletion core/scripts/keystone/src/88_gen_jobspecs.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strings"

helpers "github.com/smartcontractkit/chainlink/core/scripts/common"
ksdeploy "github.com/smartcontractkit/chainlink/integration-tests/deployment/keystone"
ksdeploy "github.com/smartcontractkit/chainlink/deployment/keystone"
)

type spec []string
Expand Down
2 changes: 1 addition & 1 deletion core/scripts/keystone/src/88_gen_ocr3_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package src

import (
helpers "github.com/smartcontractkit/chainlink/core/scripts/common"
ksdeploy "github.com/smartcontractkit/chainlink/integration-tests/deployment/keystone"
ksdeploy "github.com/smartcontractkit/chainlink/deployment/keystone"
)

func mustReadConfig(fileName string) (output ksdeploy.TopLevelConfigSource) {
Expand Down
2 changes: 1 addition & 1 deletion core/scripts/keystone/src/99_fetch_keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/urfave/cli"

helpers "github.com/smartcontractkit/chainlink/core/scripts/common"
ksdeploy "github.com/smartcontractkit/chainlink/integration-tests/deployment/keystone"
ksdeploy "github.com/smartcontractkit/chainlink/deployment/keystone"
ubig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big"
"github.com/smartcontractkit/chainlink/v2/core/cmd"
"github.com/smartcontractkit/chainlink/v2/core/web/presenters"
Expand Down
81 changes: 81 additions & 0 deletions deployment/.golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
run:
timeout: 15m
linters:
enable:
- exhaustive
- exportloopref
- revive
- goimports
- gosec
- misspell
- rowserrcheck
- errorlint
linters-settings:
exhaustive:
default-signifies-exhaustive: true
goimports:
local-prefixes: github.com/smartcontractkit/chainlink
golint:
min-confidence: 0.999
gosec:
excludes:
- G101
govet:
enable:
- shadow
revive:
confidence: 0.8
rules:
- name: blank-imports
- name: context-as-argument
- name: context-keys-type
- name: dot-imports
- name: error-return
- name: error-strings
- name: error-naming
- name: if-return
- name: increment-decrement
# - name: var-naming // doesn't work with some generated names
- name: var-declaration
- name: package-comments
- name: range
- name: receiver-naming
- name: time-naming
- name: unexported-return
- name: indent-error-flow
- name: errorf
- name: empty-block
- name: superfluous-else
#- name: unused-parameter
- name: unreachable-code
- name: redefines-builtin-id
- name: waitgroup-by-value
- name: unconditional-recursion
- name: struct-tag
- name: string-format
- name: string-of-int
- name: range-val-address
- name: range-val-in-closure
- name: modifies-value-receiver
- name: modifies-parameter
- name: identical-branches
- name: get-return
# - name: flag-parameter // probably one we should work on doing better at in the future
# - name: early-return // probably one we should work on doing better at in the future
- name: defer
- name: constant-logical-expr
- name: confusing-naming
- name: confusing-results
- name: bool-literal-in-expr
- name: atomic
issues:
exclude-rules:
- path: memory/(.+)\.go
linters:
- revive
- text: "^G404: Use of weak random number generator"
linters:
- gosec
- linters:
- govet
text: "declaration of \"err\" shadows"
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

"github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3"

"github.com/smartcontractkit/chainlink/integration-tests/deployment"
"github.com/smartcontractkit/chainlink/deployment"
"github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/types"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/ccip_home"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/fee_quoter"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (

"github.com/smartcontractkit/chainlink-testing-framework/lib/utils/testcontext"

"github.com/smartcontractkit/chainlink/integration-tests/deployment"
"github.com/smartcontractkit/chainlink/deployment"

"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/offramp"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/router"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/ethereum/go-ethereum/common"

"github.com/smartcontractkit/chainlink/integration-tests/deployment"
"github.com/smartcontractkit/chainlink/deployment"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/offramp"

"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/fee_quoter"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/stretchr/testify/require"

"github.com/smartcontractkit/chainlink-testing-framework/lib/utils/testcontext"
"github.com/smartcontractkit/chainlink/integration-tests/deployment"
"github.com/smartcontractkit/chainlink/deployment"
"github.com/smartcontractkit/chainlink/v2/core/logger"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package changeset
import (
"github.com/smartcontractkit/ccip-owner-contracts/pkg/proposal/timelock"

"github.com/smartcontractkit/chainlink/integration-tests/deployment"
ccipdeployment "github.com/smartcontractkit/chainlink/integration-tests/deployment/ccip"
"github.com/smartcontractkit/chainlink/deployment"
ccipdeployment "github.com/smartcontractkit/chainlink/deployment/ccip"
)

// Separated changset because cap reg is an env var for CL nodes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package changeset
import (
"github.com/smartcontractkit/ccip-owner-contracts/pkg/proposal/timelock"

"github.com/smartcontractkit/chainlink/integration-tests/deployment"
"github.com/smartcontractkit/chainlink/deployment"

ccipdeployment "github.com/smartcontractkit/chainlink/integration-tests/deployment/ccip"
ccipdeployment "github.com/smartcontractkit/chainlink/deployment/ccip"
)

// We expect the change set input to be unique per change set.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import (

cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3"
"github.com/smartcontractkit/chainlink-ccip/pluginconfig"
"github.com/smartcontractkit/chainlink/deployment"

"github.com/stretchr/testify/require"

"github.com/smartcontractkit/chainlink-testing-framework/lib/utils/testcontext"

jobv1 "github.com/smartcontractkit/chainlink-protos/job-distributor/v1/job"

"github.com/smartcontractkit/chainlink/integration-tests/deployment"
ccdeploy "github.com/smartcontractkit/chainlink/integration-tests/deployment/ccip"
ccdeploy "github.com/smartcontractkit/chainlink/deployment/ccip"
"github.com/smartcontractkit/chainlink/v2/core/logger"
)

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/rmn_home"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/aggregator_v3_interface"

"github.com/smartcontractkit/chainlink/integration-tests/deployment"
"github.com/smartcontractkit/chainlink/deployment"

"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/ccip_home"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/maybe_revert_message_receiver"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"github.com/smartcontractkit/libocr/offchainreporting2plus/ocr3confighelper"
ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types"

"github.com/smartcontractkit/chainlink/integration-tests/deployment"
"github.com/smartcontractkit/chainlink/deployment"

cctypes "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/types"
"github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"github.com/stretchr/testify/require"
"go.uber.org/zap/zapcore"

"github.com/smartcontractkit/chainlink/integration-tests/deployment"
"github.com/smartcontractkit/chainlink/integration-tests/deployment/memory"
"github.com/smartcontractkit/chainlink/deployment"
"github.com/smartcontractkit/chainlink/deployment/memory"

"github.com/smartcontractkit/chainlink/v2/core/logger"
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ccipdeployment

import (
"github.com/smartcontractkit/chainlink/integration-tests/deployment"
"github.com/smartcontractkit/chainlink/deployment"
"github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/validate"
"github.com/smartcontractkit/chainlink/v2/core/services/relay"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
chainsel "github.com/smartcontractkit/chain-selectors"
"github.com/stretchr/testify/require"

"github.com/smartcontractkit/chainlink/integration-tests/deployment"
"github.com/smartcontractkit/chainlink/deployment"
)

var (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/smartcontractkit/ccip-owner-contracts/pkg/proposal/mcms"
"github.com/smartcontractkit/ccip-owner-contracts/pkg/proposal/timelock"

"github.com/smartcontractkit/chainlink/integration-tests/deployment"
"github.com/smartcontractkit/chainlink/deployment"
"github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/types"
)

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ import (
"github.com/pkg/errors"
chainsel "github.com/smartcontractkit/chain-selectors"

"github.com/smartcontractkit/chainlink/integration-tests/deployment"
"github.com/smartcontractkit/chainlink/integration-tests/deployment/ccip/view/v1_0"
"github.com/smartcontractkit/chainlink/deployment"
"github.com/smartcontractkit/chainlink/deployment/ccip/view/v1_0"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/ccip_config"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/commit_store"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/rmn_home"

"github.com/smartcontractkit/chainlink/integration-tests/deployment/ccip/view"
"github.com/smartcontractkit/chainlink/integration-tests/deployment/ccip/view/v1_2"
"github.com/smartcontractkit/chainlink/integration-tests/deployment/ccip/view/v1_5"
"github.com/smartcontractkit/chainlink/integration-tests/deployment/ccip/view/v1_6"
"github.com/smartcontractkit/chainlink/deployment/ccip/view"
"github.com/smartcontractkit/chainlink/deployment/ccip/view/v1_2"
"github.com/smartcontractkit/chainlink/deployment/ccip/view/v1_5"
"github.com/smartcontractkit/chainlink/deployment/ccip/view/v1_6"

"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/ccip_home"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/fee_quoter"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

"github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3"

"github.com/smartcontractkit/chainlink/integration-tests/deployment"
"github.com/smartcontractkit/chainlink/deployment"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/offramp"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ import (

jobv1 "github.com/smartcontractkit/chainlink-protos/job-distributor/v1/job"

"github.com/smartcontractkit/chainlink/integration-tests/deployment"
"github.com/smartcontractkit/chainlink/integration-tests/deployment/memory"
"github.com/smartcontractkit/chainlink/deployment"
"github.com/smartcontractkit/chainlink/deployment/memory"
"github.com/smartcontractkit/chainlink/integration-tests/docker/test_env"
"github.com/smartcontractkit/chainlink/integration-tests/testconfig"

"github.com/smartcontractkit/chainlink-common/pkg/logger"

"github.com/smartcontractkit/chainlink/integration-tests/deployment/devenv"
"github.com/smartcontractkit/chainlink/deployment/devenv"

"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/mock_v3_aggregator_contract"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/router"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package view

import (
"github.com/smartcontractkit/chainlink/integration-tests/deployment/ccip/view/v1_0"
"github.com/smartcontractkit/chainlink/integration-tests/deployment/ccip/view/v1_2"
"github.com/smartcontractkit/chainlink/integration-tests/deployment/ccip/view/v1_5"
"github.com/smartcontractkit/chainlink/integration-tests/deployment/ccip/view/v1_6"
"github.com/smartcontractkit/chainlink/deployment/ccip/view/v1_0"
"github.com/smartcontractkit/chainlink/deployment/ccip/view/v1_2"
"github.com/smartcontractkit/chainlink/deployment/ccip/view/v1_5"
"github.com/smartcontractkit/chainlink/deployment/ccip/view/v1_6"
)

type ChainView struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
chainsel "github.com/smartcontractkit/chain-selectors"

nodev1 "github.com/smartcontractkit/chainlink-protos/job-distributor/v1/node"
"github.com/smartcontractkit/chainlink/integration-tests/deployment"
"github.com/smartcontractkit/chainlink/deployment"
)

type NopsView struct {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/ethereum/go-ethereum/common"

"github.com/smartcontractkit/chainlink/integration-tests/deployment/ccip/view/types"
"github.com/smartcontractkit/chainlink/deployment/ccip/view/types"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/rmn_proxy_contract"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/ethereum/go-ethereum/common"

"github.com/smartcontractkit/chainlink/integration-tests/deployment/ccip/view/types"
"github.com/smartcontractkit/chainlink/deployment/ccip/view/types"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/router"
)

Expand Down
Loading

0 comments on commit 36d7a81

Please sign in to comment.