diff --git a/.circleci/.gitattributes b/.circleci/.gitattributes deleted file mode 100644 index 2dd06ee5f7..0000000000 --- a/.circleci/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -config.yml linguist-generated diff --git a/.circleci/.gitignore b/.circleci/.gitignore deleted file mode 100644 index 3018b3a681..0000000000 --- a/.circleci/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.tmp/ diff --git a/.circleci/Makefile b/.circleci/Makefile deleted file mode 100644 index d24027f1d9..0000000000 --- a/.circleci/Makefile +++ /dev/null @@ -1,95 +0,0 @@ -# Set SHELL to 'strict mode' without using .SHELLFLAGS for max compatibility. -# See https://fieldnotes.tech/how-to-shell-for-compatible-makefiles/ -SHELL := /usr/bin/env bash -euo pipefail -c - -# CONFIG is the name of the make target someone -# would invoke to update the main config file (config.yml). -CONFIG ?= ci-config -# VERIFY is the name of the make target someone -# would invoke to verify the config file. -VERIFY ?= ci-verify - -CIRCLECI := circleci --skip-update-check -ifeq ($(DEBUG_CIRCLECI_CLI),YES) -CIRCLECI += --debug -endif - -# For config processing, always refer to circleci.com not self-hosted circleci, -# because self-hosted does not currently support the necessary API. -CIRCLECI_CLI_HOST := https://circleci.com -export CIRCLECI_CLI_HOST - -# Set up some documentation/help message variables. -# We do not attempt to install the CircleCI CLI from this Makefile. -CCI_INSTALL_LINK := https://circleci.com/docs/2.0/local-cli/\#installation -CCI_INSTALL_MSG := Please install CircleCI CLI. See $(CCI_INSTALL_LINK) -CCI_VERSION := $(shell $(CIRCLECI) version 2> /dev/null) -ifeq ($(CCI_VERSION),) -# Attempting to use the CLI fails with installation instructions. -CIRCLECI := echo '$(CCI_INSTALL_MSG)'; exit 1; \# -endif - -SOURCE_DIR := config -SOURCE_YML := $(shell [ ! -d $(SOURCE_DIR) ] || find $(SOURCE_DIR) -name '*.yml') -CONFIG_SOURCE := Makefile $(SOURCE_YML) | $(SOURCE_DIR) -OUT := config.yml -TMP := .tmp/config-processed -CONFIG_PACKED := .tmp/config-packed - -default: help - -help: - @echo "Usage:" - @echo " make $(CONFIG): recompile config.yml from $(SOURCE_DIR)/" - @echo " make $(VERIFY): verify that config.yml is a true mapping from $(SOURCE_DIR)/" - @echo - @echo "Diagnostics:" - @[ -z "$(CCI_VERSION)" ] || echo " circleci-cli version $(CCI_VERSION)" - @[ -n "$(CCI_VERSION)" ] || echo " $(CCI_INSTALL_MSG)" - -$(SOURCE_DIR): - @echo No source directory $(SOURCE_DIR) found.; exit 1 - -# Make sure our .tmp dir exists. -$(shell [ -d .tmp ] || mkdir .tmp) - -.PHONY: $(CONFIG) -$(CONFIG): $(OUT) - -.PHONY: $(VERIFY) -$(VERIFY): config-up-to-date - @$(CIRCLECI) config validate $(OUT) - -define GENERATED_FILE_HEADER -### *** -### WARNING: DO NOT manually EDIT or MERGE this file, it is generated by 'make $(CONFIG)'. -### INSTEAD: Edit or merge the source in $(SOURCE_DIR)/ then run 'make $(CONFIG)'. -### *** -endef -export GENERATED_FILE_HEADER - -# GEN_CONFIG writes the config to a temporary file. If the whole process succeeds, -# it them moves that file to $@. This makes is an atomic operation, so if it fails -# make doesn't consider a half-baked file up to date. -define GEN_CONFIG - @$(CIRCLECI) config pack $(SOURCE_DIR) > $(CONFIG_PACKED) - @echo "$$GENERATED_FILE_HEADER" > $@.tmp || { rm -f $@; exit 1; } - @$(CIRCLECI) config process $(CONFIG_PACKED) >> $@.tmp || { rm -f $@.tmp; exit 1; } - @mv -f $@.tmp $@ -endef - -$(OUT): $(CONFIG_SOURCE) - $(GEN_CONFIG) - @echo "$@ updated" - -$(TMP): $(CONFIG_SOURCE) - $(GEN_CONFIG) - -.PHONY: config-up-to-date -config-up-to-date: $(TMP) # Note this must not depend on $(OUT)! - @if diff -w $(OUT) $<; then \ - echo "Generated $(OUT) is up to date!"; \ - else \ - echo "Generated $(OUT) is out of date, run make $(CONFIG) to update."; \ - exit 1; \ - fi diff --git a/.circleci/README.md b/.circleci/README.md deleted file mode 100644 index 1ec75cafad..0000000000 --- a/.circleci/README.md +++ /dev/null @@ -1,130 +0,0 @@ -# How to use CircleCI multi-file config - -This README and the Makefile should be in your `.circleci` directory, -in the root of your repository. -All path references in this README assume we are in this `.circleci` directory. - -The `Makefile` in this directory generates `./config.yml` in CircleCI 2.0 syntax, -from the tree rooted at `./config/`, which contains files in CircleCI 2.0 or 2.1 syntax. - - -## Quickstart - -The basic workflow is: - -- Edit source files in `./config/` -- When you are done, run `make ci-config` to update `./config.yml` -- Commit this entire `.circleci` directory, including that generated file together. -- Run `make ci-verify` to ensure the current `./config.yml` is up to date with the source. - -When merging this `.circleci` directory: - -- Do not merge the generated `./config.yml` file, instead: -- Merge the source files under `./config/`, and then -- Run `make ci-config` to re-generate the merged `./config.yml` - -And that's it, for more detail, read on! - - -## How does it work, roughly? - -CircleCI supports [generating a single config file from many], -using the `$ circleci config pack` command. -It also supports [expanding 2.1 syntax to 2.0 syntax] -using the `$ circleci config process` command. -We use these two commands, stitched together using the `Makefile` -to implement the workflow. - -[generating a single config file from many]: https://circleci.com/docs/2.0/local-cli/#packing-a-config -[expanding 2.1 syntax to 2.0 syntax]: https://circleci.com/docs/2.0/local-cli/#processing-a-config - - -## Prerequisites - -You will need the [CircleCI CLI tool] installed and working, -at least version `0.1.5607`. -You can [download this tool directly from GitHub Releases]. - -``` -$ circleci version -0.1.5607+f705856 -``` - -[CircleCI CLI tool]: https://circleci.com/docs/2.0/local-cli/ -[download this tool directly from GitHub Releases]: https://github.com/CircleCI-Public/circleci-cli/releases - - -## Updating the config source - -Before making changes, be sure to understand the layout -of the `./config/` file tree, as well as circleci 2.1 syntax. -See the [Syntax and layout] section below. - -To update the config, you should edit, add or remove files -in the `./config/` directory, -and then run `make ci-config`. -If that's successful, -you should then commit every `*.yml` file in the tree rooted in this directory. -That is: you should commit both the source under `./config/` -and the generated file `./config.yml` at the same time, in the same commit. -The included git pre-commit hook will help with this. -Do not edit the `./config.yml` file directly, as you will lose your changes -next time `make ci-config` is run. - -[Syntax and layout]: #syntax-and-layout - - -### Verifying `./config.yml` - -To check whether or not the current `./config.yml` is up to date with the source -and valid, run `$ make ci-verify`. -Note that `$ make ci-verify` should be run in CI, -in case not everyone has the git pre-commit hook set up correctly. - - -#### Example shell session - -```sh -$ make ci-config -config.yml updated -$ git add -A . # The -A makes sure to include deletions/renames etc. -$ git commit -m "ci: blah blah blah" -Changes detected in .circleci/, running 'make -C .circleci ci-verify' ---> Generated config.yml is up to date! ---> Config file at config.yml is valid. -``` - - -### Syntax and layout - -It is important to understand the layout of the config directory. -Read the documentation on [packing a config] for a full understanding -of how multiple YAML files are merged by the circleci CLI tool. - -[packing a config]: https://circleci.com/docs/2.0/local-cli/#packing-a-config - -Here is an example file tree (with comments added afterwards): - -```sh -$ tree . -. -├── Makefile -├── README.md # This file. -├── config # The source code for config.yml is rooted here. -│   ├── @config.yml # Files beginning with @ are treated specially by `circleci config pack` -│   ├── commands # Subdirectories of config become top-level keys. -│   │   └── go_test.yml # Filenames (minus .yml) become top-level keys under -│   │   └── go_build.yml # their parent (in this case "commands"). -│ │ # The contents of go_test.yml therefore are placed at: .commands.go_test: -│   └── jobs # jobs also becomes a top-level key under config... -│   ├── build.yml # ...and likewise filenames become keys under their parent. -│   └── test.yml -└── config.yml # The generated file in 2.0 syntax. -``` - -About those `@` files... Preceding a filename with `@` -indicates to `$ circleci config pack` that the contents of this YAML file -should be at the top-level, rather than underneath a key named after their filename. -This naming convention is unfortunate as it breaks autocompletion in bash, -but there we go. - diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 710994ccba..0000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,330 +0,0 @@ -### *** -### WARNING: DO NOT manually EDIT or MERGE this file, it is generated by 'make ci-config'. -### INSTEAD: Edit or merge the source in config/ then run 'make ci-config'. -### *** -# Orb 'circleci/slack@3.4.2' resolved to 'circleci/slack@3.4.2' -version: 2 -jobs: - test-sql-13-alpine: - machine: - image: ubuntu-2004:202111-01 - resource_class: medium - working_directory: ~/boundary - steps: - - checkout - - run: - command: | - make test-sql POSTGRES_DOCKER_IMAGE_BASE=docker.mirror.hashicorp.services/postgres PG_DOCKER_TAG=13-alpine - name: Run SQL PgTap Tests - trigger-merge-to-downstream: - machine: - image: ubuntu-2004:202111-01 - resource_class: medium - working_directory: ~/boundary - steps: - - checkout - - run: - command: | - ./scripts/trigger-merge-to-downstream ${CIRCLE_BRANCH} - name: Trigger Merge to Downstream - test-api: - machine: - image: ubuntu-2004:202111-01 - resource_class: medium - working_directory: ~/boundary - steps: - - checkout - - run: - command: | - make install-go - source ~/.bashrc - echo 'export GOROOT=$GOROOT' >> "$BASH_ENV" - echo 'export GOPATH=$GOPATH' >> "$BASH_ENV" - echo 'export PATH=$PATH' >> "$BASH_ENV" - echo "$ go version" - go version - name: Install go - - run: - command: | - make test-api - name: Run API Tests - no_output_timeout: 15m - test-sql-11-alpine: - machine: - image: ubuntu-2004:202111-01 - resource_class: medium - working_directory: ~/boundary - steps: - - checkout - - run: - command: | - make test-sql POSTGRES_DOCKER_IMAGE_BASE=docker.mirror.hashicorp.services/postgres PG_DOCKER_TAG=11-alpine - name: Run SQL PgTap Tests - make-gen-deltas: - machine: - image: ubuntu-2004:202111-01 - resource_class: medium - working_directory: ~/boundary - steps: - - checkout - - run: - command: | - make install-go - source ~/.bashrc - echo 'export GOROOT=$GOROOT' >> "$BASH_ENV" - echo 'export GOPATH=$GOPATH' >> "$BASH_ENV" - echo 'export PATH=$PATH' >> "$BASH_ENV" - echo "$ go version" - go version - name: Install go - - run: - command: | - make tools - name: Install tools - - run: - command: | - make gen - echo "Testing git diffs..." - git diff --exit-code - git status --porcelain - test -z "$(git status --porcelain)" - name: Check make gen deltas - test-sdk: - machine: - image: ubuntu-2004:202111-01 - resource_class: medium - working_directory: ~/boundary - steps: - - checkout - - run: - command: | - make install-go - source ~/.bashrc - echo 'export GOROOT=$GOROOT' >> "$BASH_ENV" - echo 'export GOPATH=$GOPATH' >> "$BASH_ENV" - echo 'export PATH=$PATH' >> "$BASH_ENV" - echo "$ go version" - go version - name: Install go - - run: - command: | - make test-sdk - name: Run SDK Tests - no_output_timeout: 15m - test-sql-12-alpine: - machine: - image: ubuntu-2004:202111-01 - resource_class: medium - working_directory: ~/boundary - steps: - - checkout - - run: - command: | - make test-sql POSTGRES_DOCKER_IMAGE_BASE=docker.mirror.hashicorp.services/postgres PG_DOCKER_TAG=12-alpine - name: Run SQL PgTap Tests - build: - machine: - image: ubuntu-2004:202111-01 - resource_class: large - working_directory: ~/boundary - steps: - - checkout - - run: - command: | - make install-go - source ~/.bashrc - echo 'export GOROOT=$GOROOT' >> "$BASH_ENV" - echo 'export GOPATH=$GOPATH' >> "$BASH_ENV" - echo 'export PATH=$PATH' >> "$BASH_ENV" - echo "$ go version" - go version - name: Install go - - run: - command: | - make tools - name: Install tools - - run: - command: | - which pg_isready || sudo apt-get update && sudo apt-get install -y postgresql-client - make DOCKER_ARGS='-d' PG_OPTS='-c shared_buffers=256MB -c max_connections=200000' -C testing/dbtest/docker database-up - until pg_isready -h 127.0.0.1; do docker container inspect boundary-sql-tests &> /dev/null || exit -1; sleep 1; done - name: Initialize Test Database - - run: - command: | - make test-ci - name: Run Acceptance Tests - no_output_timeout: 15m - - run: - command: | - make -C testing/dbtest/docker clean - name: Cleanup - when: always - test-sql-latest: - machine: - image: ubuntu-2004:202111-01 - resource_class: medium - working_directory: ~/boundary - steps: - - checkout - - run: - command: | - make test-sql POSTGRES_DOCKER_IMAGE_BASE=docker.mirror.hashicorp.services/postgres PG_DOCKER_TAG=latest - name: Run SQL PgTap Tests -workflows: - ci: - jobs: - - build - - test-api - - test-sdk - - test-sql-latest - - test-sql-11-alpine - - test-sql-12-alpine - - test-sql-13-alpine - - make-gen-deltas - trigger-merge-to-downstream: - jobs: - - trigger-merge-to-downstream: - filters: - branches: - only: - - main - - /release\/.*/ - version: 2 - -# Original config.yml file: -# commands: -# install-go: -# description: | -# Ensure the right version of Go is installed and set PATH, GOPATH, GOROOT -# steps: -# - run: -# command: | -# make install-go -# source ~/.bashrc -# echo 'export GOROOT=$GOROOT' >> \"$BASH_ENV\" -# echo 'export GOPATH=$GOPATH' >> \"$BASH_ENV\" -# echo 'export PATH=$PATH' >> \"$BASH_ENV\" -# echo \"$ go version\" -# go version -# name: Install go -# install-tools: -# description: | -# Install tools using the Makefile -# steps: -# - run: -# command: | -# make tools -# name: Install tools -# executors: -# go-machine: -# machine: -# image: ubuntu-2004:202111-01 -# resource_class: large -# working_directory: ~/boundary -# go-machine-medium: -# machine: -# image: ubuntu-2004:202111-01 -# resource_class: medium -# working_directory: ~/boundary -# jobs: -# build: -# executor: go-machine -# steps: -# - checkout -# - install-go -# - install-tools -# - run: -# command: | -# which pg_isready || sudo apt-get update && sudo apt-get install -y postgresql-client -# make DOCKER_ARGS='-d' PG_OPTS='-c shared_buffers=256MB -c max_connections=200000' -C testing/dbtest/docker database-up -# until pg_isready -h 127.0.0.1; do docker container inspect boundary-sql-tests &> /dev/null || exit -1; sleep 1; done -# name: Initialize Test Database -# - run: -# command: | -# make test-ci -# name: Run Acceptance Tests -# no_output_timeout: 15m -# - run: -# command: | -# make -C testing/dbtest/docker clean -# name: Cleanup -# when: always -# make-gen-deltas: -# executor: go-machine-medium -# steps: -# - checkout -# - install-go -# - install-tools -# - run: -# command: | -# make gen -# echo \"Testing git diffs...\" -# git diff --exit-code -# git status --porcelain -# test -z \"$(git status --porcelain)\" -# name: Check make gen deltas -# test-api: -# executor: go-machine-medium -# steps: -# - checkout -# - install-go -# - run: -# command: | -# make test-api -# name: Run API Tests -# no_output_timeout: 15m -# test-sdk: -# executor: go-machine-medium -# steps: -# - checkout -# - install-go -# - run: -# command: | -# make test-sdk -# name: Run SDK Tests -# no_output_timeout: 15m -# test-sql: -# executor: go-machine-medium -# parameters: -# postgres-version: -# type: string -# steps: -# - checkout -# - run: -# command: | -# make test-sql POSTGRES_DOCKER_IMAGE_BASE=docker.mirror.hashicorp.services/postgres PG_DOCKER_TAG=<< parameters.postgres-version >> -# name: Run SQL PgTap Tests -# trigger-merge-to-downstream: -# executor: go-machine-medium -# steps: -# - checkout -# - run: -# command: | -# ./scripts/trigger-merge-to-downstream ${CIRCLE_BRANCH} -# name: Trigger Merge to Downstream -# orbs: -# slack: circleci/slack@3.4.2 -# version: 2.1 -# workflows: -# ci: -# jobs: -# - build -# - test-api -# - test-sdk -# - test-sql: -# matrix: -# parameters: -# postgres-version: -# - latest -# - 11-alpine -# - 12-alpine -# - 13-alpine -# - make-gen-deltas -# trigger-merge-to-downstream: -# jobs: -# - trigger-merge-to-downstream: -# filters: -# branches: -# only: -# - main -# - /release\\/.*/ \ No newline at end of file diff --git a/.circleci/config/@config.yml b/.circleci/config/@config.yml deleted file mode 100644 index ad4c238296..0000000000 --- a/.circleci/config/@config.yml +++ /dev/null @@ -1,4 +0,0 @@ -version: 2.1 - -orbs: - slack: circleci/slack@3.4.2 diff --git a/.circleci/config/commands/install-go.yml b/.circleci/config/commands/install-go.yml deleted file mode 100644 index 4be4861ae7..0000000000 --- a/.circleci/config/commands/install-go.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -description: > - Ensure the right version of Go is installed and set PATH, GOPATH, GOROOT -steps: - - run: - name: "Install go" - command: | - make install-go - source ~/.bashrc - echo 'export GOROOT=$GOROOT' >> "$BASH_ENV" - echo 'export GOPATH=$GOPATH' >> "$BASH_ENV" - echo 'export PATH=$PATH' >> "$BASH_ENV" - echo "$ go version" - go version diff --git a/.circleci/config/commands/install-tools.yml b/.circleci/config/commands/install-tools.yml deleted file mode 100644 index 025a405b40..0000000000 --- a/.circleci/config/commands/install-tools.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -description: > - Install tools using the Makefile -steps: - - run: - name: "Install tools" - command: | - make tools diff --git a/.circleci/config/executors/@executors.yml b/.circleci/config/executors/@executors.yml deleted file mode 100644 index f777de0f47..0000000000 --- a/.circleci/config/executors/@executors.yml +++ /dev/null @@ -1,10 +0,0 @@ -go-machine: - machine: - image: 'ubuntu-2004:202111-01' - resource_class: large - working_directory: ~/boundary -go-machine-medium: - machine: - image: 'ubuntu-2004:202111-01' - resource_class: medium - working_directory: ~/boundary diff --git a/.circleci/config/jobs/build.yml b/.circleci/config/jobs/build.yml deleted file mode 100644 index fa4afd8c69..0000000000 --- a/.circleci/config/jobs/build.yml +++ /dev/null @@ -1,21 +0,0 @@ -executor: go-machine -steps: -- checkout -- install-go -- install-tools -- run: - name: "Initialize Test Database" - command: | - which pg_isready || sudo apt-get update && sudo apt-get install -y postgresql-client - make DOCKER_ARGS='-d' PG_OPTS='-c shared_buffers=256MB -c max_connections=200000' -C testing/dbtest/docker database-up - until pg_isready -h 127.0.0.1; do docker container inspect boundary-sql-tests &> /dev/null || exit -1; sleep 1; done -- run: - name: "Run Acceptance Tests" - no_output_timeout: 15m - command: | - make test-ci -- run: - name: "Cleanup" - when: always - command: | - make -C testing/dbtest/docker clean diff --git a/.circleci/config/jobs/make-gen-deltas.yml b/.circleci/config/jobs/make-gen-deltas.yml deleted file mode 100644 index cb8b7c191f..0000000000 --- a/.circleci/config/jobs/make-gen-deltas.yml +++ /dev/null @@ -1,13 +0,0 @@ -executor: go-machine-medium -steps: -- checkout -- install-go -- install-tools -- run: - name: "Check make gen deltas" - command: | - make gen - echo "Testing git diffs..." - git diff --exit-code - git status --porcelain - test -z "$(git status --porcelain)" diff --git a/.circleci/config/jobs/test-api.yml b/.circleci/config/jobs/test-api.yml deleted file mode 100644 index f0e28bf033..0000000000 --- a/.circleci/config/jobs/test-api.yml +++ /dev/null @@ -1,9 +0,0 @@ -executor: go-machine-medium -steps: -- checkout -- install-go -- run: - name: "Run API Tests" - no_output_timeout: 15m - command: | - make test-api diff --git a/.circleci/config/jobs/test-sdk.yml b/.circleci/config/jobs/test-sdk.yml deleted file mode 100644 index 441cd9e82d..0000000000 --- a/.circleci/config/jobs/test-sdk.yml +++ /dev/null @@ -1,9 +0,0 @@ -executor: go-machine-medium -steps: -- checkout -- install-go -- run: - name: "Run SDK Tests" - no_output_timeout: 15m - command: | - make test-sdk diff --git a/.circleci/config/jobs/test-sql.yml b/.circleci/config/jobs/test-sql.yml deleted file mode 100644 index 671be2394f..0000000000 --- a/.circleci/config/jobs/test-sql.yml +++ /dev/null @@ -1,10 +0,0 @@ -executor: go-machine-medium -parameters: - postgres-version: - type: string -steps: -- checkout -- run: - name: "Run SQL PgTap Tests" - command: | - make test-sql POSTGRES_DOCKER_IMAGE_BASE=docker.mirror.hashicorp.services/postgres PG_DOCKER_TAG=<< parameters.postgres-version >> diff --git a/.circleci/config/jobs/trigger-merge-to-downstream.yml b/.circleci/config/jobs/trigger-merge-to-downstream.yml deleted file mode 100644 index d778c56a85..0000000000 --- a/.circleci/config/jobs/trigger-merge-to-downstream.yml +++ /dev/null @@ -1,7 +0,0 @@ -executor: go-machine-medium -steps: -- checkout -- run: - name: "Trigger Merge to Downstream" - command: | - ./scripts/trigger-merge-to-downstream ${CIRCLE_BRANCH} diff --git a/.circleci/config/workflows/ci.yml b/.circleci/config/workflows/ci.yml deleted file mode 100644 index 7a16877804..0000000000 --- a/.circleci/config/workflows/ci.yml +++ /dev/null @@ -1,9 +0,0 @@ -jobs: - - build - - test-api - - test-sdk - - test-sql: - matrix: - parameters: - postgres-version: ["latest", "11-alpine", "12-alpine", "13-alpine"] - - make-gen-deltas diff --git a/.circleci/config/workflows/trigger-merge-to-downstream.yml b/.circleci/config/workflows/trigger-merge-to-downstream.yml deleted file mode 100644 index f15843c1cf..0000000000 --- a/.circleci/config/workflows/trigger-merge-to-downstream.yml +++ /dev/null @@ -1,7 +0,0 @@ -jobs: - - trigger-merge-to-downstream: - filters: - branches: - only: - - main - - /release\/.*/ diff --git a/.circleci/pre-commit b/.circleci/pre-commit deleted file mode 100755 index b7c63e8981..0000000000 --- a/.circleci/pre-commit +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -# Check .circleci/config.yml is up to date and valid, and that all changes are -# included together in this commit. - -# Fail early if we accidentally used '.yaml' instead of '.yml' -if ! git diff --name-only --cached --exit-code -- '.circleci/***.yaml'; then - echo "ERROR: File(s) with .yaml extension detected. Please rename them .yml instead." - exit 1 -fi - -# Succeed early if no changes to yml files in .circleci/ are currently staged. -# make ci-verify is slow so we really don't want to run it unnecessarily. -if git diff --name-only --cached --exit-code -- '.circleci/***.yml'; then - exit 0 -fi - -# Make sure to add no explicit output before this line, as it would just be noise -# for those making non-circleci changes. -echo "==> Verifying config changes in .circleci/" -echo "--> OK: All files are .yml not .yaml" - -# Ensure commit includes _all_ files in .circleci/ -# So not only are the files up to date, but we are also committing them in one go. -if ! git diff --name-only --exit-code -- '.circleci/***.yml'; then - echo "ERROR: Some .yml diffs in .circleci/ are staged, others not." - echo "Please commit the entire .circleci/ directory together, or omit it altogether." - exit 1 -fi - -# Even untracked yml or yaml files will get baked into the output. -# This is a loose check on _any_ untracked files in .circleci/ for simplicity. -if [ -n "$(git ls-files --others --exclude-standard '.circleci/')" ]; then - echo "ERROR: You have untracked files in .circleci/ please add or delete them." - exit 1 -fi - -echo "--> OK: All .yml files in .circleci are staged." -if ! make -C .circleci ci-verify; then - echo "ERROR: make ci-verify failed" - exit 1 -fi -echo "--> OK: make ci-verify succeeded." diff --git a/.copywrite.hcl b/.copywrite.hcl index 6cd9325f29..1411fc6533 100644 --- a/.copywrite.hcl +++ b/.copywrite.hcl @@ -5,7 +5,6 @@ project { copyright_year = 2023 header_ignore = [ - ".circleci/**", ".github/**", ".golangci.yml", ".release/linux/**", diff --git a/.gitattributes b/.gitattributes index 4eec2aab6a..e69de29bb2 100755 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +0,0 @@ -/.circleci/config/@build-release.yml -/packagespec.mk linguist-generated diff --git a/Makefile b/Makefile index 0d130e7c9c..c06399ba51 100644 --- a/Makefile +++ b/Makefile @@ -279,12 +279,6 @@ test-database-down: generate-database-dumps: @$(MAKE) -C testing/dbtest/docker generate-database-dumps -.PHONY: test-ci -test-ci: export CI_BUILD=1 -test-ci: - CGO_ENABLED=$(CGO_ENABLED) BUILD_TAGS='$(BUILD_TAGS)' sh -c "'$(CURDIR)/scripts/build.sh'" - go test "$(TEST_PACKAGE)" -tags="$(BUILD_TAGS)" -v $(TESTARGS) -json -cover -timeout 120m | tparse -follow - .PHONY: test-sql test-sql: $(MAKE) -C internal/db/sqltest/ test @@ -375,14 +369,6 @@ docker-build-dev: build .NOTPARALLEL: -.PHONY: ci-config -ci-config: - @$(MAKE) -C .circleci ci-config - -.PHONY: ci-verify -ci-verify: - @$(MAKE) -C .circleci ci-verify - .PHONY: version # This is used for release builds by .github/workflows/build.yml version: diff --git a/README.md b/README.md index 243e0a9908..2bd5b8a908 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Boundary -![](boundary.png) [![CircleCI](https://circleci.com/gh/hashicorp/boundary/tree/main.svg?style=svg)](https://circleci.com/gh/hashicorp/boundary/tree/main) + ---- **Please note**: We take Boundary's security and our users' trust very diff --git a/scripts/build.sh b/scripts/build.sh index 26bdec825a..822e8be203 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -16,10 +16,6 @@ DIR="$( cd -P "$( dirname "$SOURCE" )/.." && pwd )" # Change into that directory cd "$DIR" -if [ "${CI_BUILD}x" != "x" ]; then - [[ -f /home/circleci/.bashrc ]] && source /home/circleci/.bashrc -fi - # Set build tags BUILD_TAGS="${BUILD_TAGS:-"boundary"}" echo "==> Build tags: ${BUILD_TAGS}" @@ -62,10 +58,6 @@ if [ "${SKIP_PLUGIN_BUILD}x" == "x" ]; then $DIR/scripts/plugins.sh fi -if [ "${CI_BUILD}x" != "x" ]; then - exit -fi - BASE_PRODUCT_VERSION=${BASE_PRODUCT_VERSION:=$(cat version/VERSION)} # Declare binary paths! diff --git a/scripts/trigger-merge-to-downstream b/scripts/trigger-merge-to-downstream deleted file mode 100755 index a043eceb99..0000000000 --- a/scripts/trigger-merge-to-downstream +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash - -BRANCH=${1:="main"} - -if [[ -z "${DOWNSTREAM_SLUG}" ]]; then - echo "skipping, no downstream" - exit 0 -fi - -if [[ -z "${CIRCLE_REPOSITORY_URL}" ]]; then - exit 0 -fi - -if [[ "${CIRCLE_REPOSITORY_URL}" == *"boundary-${DOWNSTREAM_SLUG}"* ]]; then - exit 0 -fi - -if [[ -z ${CIRCLE_CI_DOWNSTREAM_TOK} ]]; then - exit 0 -fi - -curl -u "${CIRCLE_CI_DOWNSTREAM_TOK}:" \ - -d "build_parameters[CIRCLE_JOB]=merge-from-upstream" \ - "https://circleci.com/api/v1.1/project/github/hashicorp/boundary-${DOWNSTREAM_SLUG}/tree/${BRANCH}"