Skip to content

Commit

Permalink
Merge branch 'main' into chore/SOLENG-833/inline-workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelallan72 authored Dec 1, 2024
2 parents 1752dee + d1a54d8 commit 1995c9c
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 28 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/terraform-apply.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,10 @@ jobs:
terraform plan -no-color \
-var-file=configs/github.tfvars \
-var-file=configs/${{ matrix.repository }}.tfvars \
-var="pr_branch_prefix=${{ github.head_ref }}" \
-var="pr_body=This is an automated pull request from https://github.com/${{ github.repository }}/pull/${{ github.event.number }} to update centrally managed files." \
-out ./tf.plan
- name: Terraform apply (if running on non-draft PR)
if: github.event.pull_request.draft == false
- name: Terraform apply (if running from main branch)
if: ${{ github.ref_name == 'main' }}
working-directory: ./terraform-plans
env:
GITHUB_APP_ID: ${{ secrets.SOLENG_APP_ID }}
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/weekly_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
- openstack-exporter-operator
- prometheus-hardware-exporter
- prometheus-juju-backup-all-exporter
- prometheus-juju-exporter
- snap-tempest
workflow_file_name:
- check.yaml
Expand All @@ -47,8 +48,6 @@ jobs:
workflow_file_name: check.yaml
- repo: hardware-observer-operator
workflow_file_name: cos_integration.yaml
- repo: prometheus-juju-exporter
workflow_file_name: pr.yaml

steps:
- name: Run ${{ matrix.workflow_file_name }} tests for ${{ matrix.repo }}
Expand Down
12 changes: 5 additions & 7 deletions terraform-plans/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@ module "github_settings" {
}

module "github_templates" {
source = "./modules/GitHub/templates"
owner = var.owner
repository = var.repository
branch = var.branch
templates = var.templates
pr_branch_prefix = var.pr_branch_prefix
pr_body = var.pr_body
source = "./modules/GitHub/templates"
owner = var.owner
repository = var.repository
branch = var.branch
templates = var.templates
}

output "repository" {
Expand Down
5 changes: 2 additions & 3 deletions terraform-plans/templates/github/charm_promote.yaml.tftpl
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@ jobs:
destination=$(echo "$channel_promotion" | sed 's/.*->\s*//')
echo "destination-channel=$destination" >> $GITHUB_OUTPUT
echo "origin-channel=$origin" >> $GITHUB_OUTPUT
- name: Release charm to channel
uses: canonical/charming-actions/release-charm@2.6.2
- name: Promote charm to channel
uses: canonical/charming-actions/promote-charm@2.6.3
with:
credentials: $${{ secrets.CHARMHUB_TOKEN }}
github-token: $${{ secrets.GITHUB_TOKEN }}
destination-channel: $${{ steps.set-channels.outputs.destination-channel }}
origin-channel: $${{ steps.set-channels.outputs.origin-channel }}
charmcraft-channel: "${charmcraft_channel}"
12 changes: 0 additions & 12 deletions terraform-plans/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,3 @@ variable "templates" {
}))
description = "Files to be templated into the target GitHub repository."
}

variable "pr_branch_prefix" {
type = string
description = "Pull request branch name prefix."
default = "automation/update-managed-files"
}

variable "pr_body" {
type = string
description = "Pull request body message."
default = "This is an automated pull request from https://github.com/canonical/solutions-engineering-automation to update centrally managed files."
}

0 comments on commit 1995c9c

Please sign in to comment.