Skip to content

Commit

Permalink
Remove CircleCI #major
Browse files Browse the repository at this point in the history
* Remove CircleCI #major

We have agreed to move to github actions for all future projects (see ADR) so this major version bump is to remove all circle ci related code and providers

* format fix
* update some actions
* bump version of the action, show prerelease
  • Loading branch information
charlesmmarshall committed Feb 15, 2023
1 parent 3626643 commit 7d87f25
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 50 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
- uses: hashicorp/setup-terraform@v1
with:
terraform_version: 0.14.7

- name: terraform fmt
run: |
terraform fmt -check -recursive
Expand All @@ -30,7 +29,10 @@ jobs:
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: ${{ github.sha }}
fetch-depth: '0'
- name: Extract branch name
id: extract_branch
run: |
Expand All @@ -41,11 +43,12 @@ jobs:
fi
- name: Bump version
id: bump_version
uses: anothrNick/github-tag-action@1.36.0
uses: anothrNick/github-tag-action@1.61.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
INITIAL_VERSION: 1.0.0
DEFAULT_BUMP: minor
PRERELEASE_SUFFIX: ${{ env.BRANCH_NAME }}
PRERELEASE: ${{ !startsWith(env.BRANCH_NAME, 'main') }}
RELEASE_BRANCHES: main
WITH_V: true
23 changes: 0 additions & 23 deletions .terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Standard OPG GitHub Repository Module: Managed by opg-org-infra & Terraform

| Name | Version |
|------|---------|
| <a name="provider_circleci"></a> [circleci](#provider\_circleci) | 0.5.0 |
| <a name="provider_github"></a> [github](#provider\_github) | 4.26.1 |

## Modules
Expand All @@ -24,7 +23,6 @@ No modules.

| Name | Type |
|------|------|
| [circleci_project.project](https://registry.terraform.io/providers/TomTucka/circleci/latest/docs/resources/project) | resource |
| [github_actions_secret.repository_secret](https://registry.terraform.io/providers/integrations/github/4.26.1/docs/resources/actions_secret) | resource |
| [github_branch_default.default](https://registry.terraform.io/providers/integrations/github/4.26.1/docs/resources/branch_default) | resource |
| [github_branch_protection_v3.repository_main](https://registry.terraform.io/providers/integrations/github/4.26.1/docs/resources/branch_protection_v3) | resource |
Expand All @@ -47,8 +45,6 @@ No modules.
| <a name="input_archived"></a> [archived](#input\_archived) | Archives the repository if set to true | `bool` | `false` | no |
| <a name="input_auto_init"></a> [auto\_init](#input\_auto\_init) | Meaningful only during create; set to true to produce an initial commit in the repository. | `bool` | `true` | no |
| <a name="input_branch_protection_enabled"></a> [branch\_protection\_enabled](#input\_branch\_protection\_enabled) | Boolean, setting this to false will disable branch protection | `bool` | `true` | no |
| <a name="input_circleci_env_vars"></a> [circleci\_env\_vars](#input\_circleci\_env\_vars) | A map of environment variables to pass to CircleCI | `map(any)` | `{}` | no |
| <a name="input_create_circleci_project"></a> [create\_circleci\_project](#input\_create\_circleci\_project) | Create a CircleCI project for a repository | `bool` | `true` | no |
| <a name="input_default_branch_name"></a> [default\_branch\_name](#input\_default\_branch\_name) | Default branch name and the branch name with protection applied to it | `string` | `"main"` | no |
| <a name="input_delete_branch_on_merge"></a> [delete\_branch\_on\_merge](#input\_delete\_branch\_on\_merge) | Automatically delete head branch after a pull request is merged. | `bool` | `false` | no |
| <a name="input_description"></a> [description](#input\_description) | Repository description. Leave blank for default of: Development repository | `string` | `"Development repository"` | no |
Expand Down
6 changes: 0 additions & 6 deletions github_repository.tf
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,3 @@ resource "github_actions_secret" "repository_secret" {
plaintext_value = each.value
}

resource "circleci_project" "project" {
count = var.create_circleci_project ? 1 : 0
name = var.name
env_vars = var.circleci_env_vars
depends_on = [github_repository.repository]
}
3 changes: 0 additions & 3 deletions terraform.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
terraform {
required_providers {
circleci = {
source = "TomTucka/circleci"
}
github = {
source = "integrations/github"
version = "4.26.1"
Expand Down
11 changes: 0 additions & 11 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -113,17 +113,6 @@ variable "developer_team" {
default = ""
}

variable "create_circleci_project" {
type = bool
description = "Create a CircleCI project for a repository"
default = true
}

variable "circleci_env_vars" {
type = map(any)
description = "A map of environment variables to pass to CircleCI"
default = {}
}

variable "default_branch_name" {
type = string
Expand Down

0 comments on commit 7d87f25

Please sign in to comment.