Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce Quay integration #290

Merged
merged 2 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 39 additions & 16 deletions terraform-scripts/.terraform.lock.hcl

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

14 changes: 14 additions & 0 deletions terraform-scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,17 @@ resource "github_app_installation_repository" "quarkus_UNIQUE_NAME" {
repository = github_repository.quarkus_UNIQUE_NAME.name
}
```

## Provisioning Quay.io repositories

To provision Quay.io repositories, add the following snippet to the .tf file:

```terraform
# Create Quay.io repository
resource "quay_repository" "quarkus_UNIQUE_NAME" {
name = "quarkus-DASHED-NAME"
description = "Quarkus UNIQUE_NAME extension"
namespace = data.quay_organization.quarkiverse.name
visibility = "public"
}
```
12 changes: 12 additions & 0 deletions terraform-scripts/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ terraform {
source = "integrations/github"
version = "~> 6.0"
}
quay = {
source = "enthought/quay"
version = "~> 0.5.1"
}
}

backend "remote" {
Expand All @@ -19,6 +23,10 @@ terraform {

provider "github" {}

provider "quay" {
url = "https://quay.io"
}

# Retrieve information about the currently (PAT) authenticated user
data "github_user" "self" {
username = ""
Expand All @@ -29,6 +37,10 @@ data "github_team" "quarkiverse_members" {
slug = "quarkiverse-members"
}

data "quay_organization" "quarkiverse" {
name = "quarkiverse"
}

locals {
# Application IDs installed in the Quarkiverse organization
# These applications are enabled on a per-repository basis
Expand Down
8 changes: 8 additions & 0 deletions terraform-scripts/quarkus-playpen.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,11 @@ resource "github_team_membership" "quarkus_playpen" {
username = each.value
role = "maintainer"
}

# Create quay.io repository
resource "quay_repository" "quarkus_playpen" {
name = "quarkus-playpen"
description = "Live local development on a deployed k8s service"
visibility = "public"
namespace = data.quay_organization.quarkiverse.name
}