diff --git a/.buildkite/ci-checkov.sh b/.buildkite/ci-checkov.sh deleted file mode 100755 index a4d1a9372..000000000 --- a/.buildkite/ci-checkov.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env bash -# Set this to fail on the install -set -euxo pipefail - -# List of checks we do not want to run here -# This is a living list and will see additions and mostly removals over time. -SKIP_CHECKS="CKV_GCP_22,CKV_GCP_66,CKV_GCP_13,CKV_GCP_71,CKV_GCP_61,CKV_GCP_21,CKV_GCP_65,CKV_GCP_67,CKV_GCP_20,CKV_GCP_69,CKV_GCP_12,CKV_GCP_24,CKV_GCP_25,CKV_GCP_64,CKV_GCP_68,CKV2_AWS_5,CKV2_GCP_3,CKV2_GCP_5,CKV_AWS_23,CKV_GCP_70,CKV_GCP_62,CKV_GCP_62,CKV_GCP_62,CKV_GCP_62,CKV_GCP_29,CKV_GCP_39" - -set +x -# In case no terraform code is present -echo "--- Starting Checkov..." -echo "Note: If there is no output below here then no terraform code was found to scan. All good!" -echo "===========================================================================================" - -# Set not to fail on non-zero exit code -set +e -# Run checkov -checkov --skip-check $SKIP_CHECKS --quiet --framework terraform --compact -d . - -# Options -# --quiet: Only show failing tests -# --compact: Do not show code snippets -# --framework: Only scan terraform code - -# Capture the error code -CHECKOV_EXIT_CODE="$?" - -# We check the exit code and display a warning if anything was found -if [[ "$CHECKOV_EXIT_CODE" != 0 ]]; then - echo "^^^ +++" - echo "Possible Terraform security issues found. " - echo "Please refer to the Sourcegraph handbook for guidance: https://handbook.sourcegraph.com/product-engineering/engineering/cloud/security/checkov" -fi diff --git a/.buildkite/pipeline.yaml b/.buildkite/pipeline.yaml index 8d2ca3568..1071cc02b 100644 --- a/.buildkite/pipeline.yaml +++ b/.buildkite/pipeline.yaml @@ -1,6 +1,6 @@ $schema: "http://json.schemastore.org/buildkite" env: - # Build this image in sourcegraph/infrastructure by running `make e2e` in `gcp/images` + # GCP VM image for the Vagrant smoke test. Build it in sourcegraph/infrastructure by running `make e2e` in `gcp/images` IMAGE: "e2e-db8a40720-2024-08-26t08-44-10z" VAGRANT_RUN_ENV: "CI" steps: @@ -19,17 +19,8 @@ steps: - label: ":rice: docker-compose-test" command: .buildkite/vagrant-run.sh docker-test artifact_paths: ./*.log - env: - TEST_TYPE: "docker-compose-test" agents: { queue: "vagrant" } - # This runs the Checkov Terraform Code scanner - # https://www.checkov.io/ - - command: .buildkite/ci-checkov.sh - label: ":lock: security - checkov" - agents: { queue: "standard" } - soft_fail: true - # Please keep in mind that the release manifest uses specific branch names when creating releases. # Therefore, if you update them, or if you decide to change how we detect what kind of build we're dealing # with, please update this file as well. diff --git a/.gitignore b/.gitignore index da8ad566b..9cf3cdc72 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,5 @@ +.env .envrc - -node_modules/ - .vagrant *.log -/.env - -/right.dhall +node_modules/ diff --git a/.nvmrc b/.nvmrc deleted file mode 100644 index c92af7fbd..000000000 --- a/.nvmrc +++ /dev/null @@ -1 +0,0 @@ -13.5.0 \ No newline at end of file diff --git a/.tool-versions b/.tool-versions index 4df9eb887..815b64596 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,6 +1,4 @@ nodejs 16.7.0 yarn 1.22.4 -shellcheck 0.7.1 golang 1.19.8 github-cli 2.46.0 -asdf:bosmak/asdf-checkov latest diff --git a/test/Vagrantfile b/test/Vagrantfile index 34db323a6..09bd66030 100644 --- a/test/Vagrantfile +++ b/test/Vagrantfile @@ -61,7 +61,6 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| #!/usr/bin/env bash cat << EOF >> /root/.profile export GIT_BRANCH=#{ENV['BUILDKITE_BRANCH']} -export TEST_TYPE=#{ENV['TEST_TYPE']} export DOCKER_USERNAME=#{ENV['DOCKER_USERNAME']} export DOCKER_PASSWORD=#{ENV['DOCKER_PASSWORD']} EOF diff --git a/test/smoke-test.sh b/test/smoke-test.sh index 079ccb6c0..5aac87dca 100755 --- a/test/smoke-test.sh +++ b/test/smoke-test.sh @@ -11,13 +11,11 @@ configure_docker() { gcloud auth configure-docker us-central1-docker.pkg.dev,us-docker.pkg.dev } +expect_containers="25" + deploy_sourcegraph() { cd $(dirname "${BASH_SOURCE[0]}")/.. - #Deploy sourcegraph - if [[ "$TEST_TYPE" == "docker-compose-test" ]]; then - docker-compose --file docker-compose/docker-compose.yaml up -d -t 600 - expect_containers="25" - fi + docker-compose --file docker-compose/docker-compose.yaml up -d -t 600 echo "Giving containers 90s to start..." sleep 90