Skip to content

Commit

Permalink
Merge pull request #419 from concourse/fix-k8s-topgun-job
Browse files Browse the repository at this point in the history
fix k8s-topgun job in concourse and helm-prs pipeline
  • Loading branch information
yharish991 authored Feb 4, 2025
2 parents fcf81d5 + 20ee306 commit 2f5761c
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 24 deletions.
Empty file added pipeline.json
Empty file.
15 changes: 6 additions & 9 deletions pipelines/concourse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -510,9 +510,8 @@ jobs:
- get: prometheus-chart
tags: [k8s-topgun]
params: {untar: true}
- get: postgresql-chart
- get: postgresql-chart-git
tags: [k8s-topgun]
params: {untar: true}
- get: ci
tags: [k8s-topgun]
- task: k8s-topgun
Expand Down Expand Up @@ -1737,14 +1736,12 @@ resources:
- name: prometheus-community
url: https://prometheus-community.github.io/helm-charts

- name: postgresql-chart
type: helm-chart
icon: *helm-icon
# Using the git instead of helm-chart resource because Bitnami charts are hosted on Docker Hub and we sometimes run into their rate limits
- name: postgresql-chart-git
type: git
source:
chart: bitnami/postgresql
repos:
- name: bitnami
url: https://charts.bitnami.com/bitnami
uri: "https://github.com/bitnami/charts.git"
tag_filter: postgresql/((postgresql-chart-version))

- name: golang-linux
type: s3
Expand Down
42 changes: 29 additions & 13 deletions pipelines/helm-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ resource_types:
type: registry-image
source: {repository: loggregatorbot/github-pr-resource}

- name: helm-chart
type: registry-image
source: {repository: linkyard/helm-chart-resource, tag: 2.17.0}

resources:
- name: chart-pr
type: pull-request
Expand All @@ -13,13 +17,6 @@ resources:
base_branch: ((branch))
access_token: ((pr_access_token))

- name: helm-charts
type: git
icon: github
source:
uri: https://github.com/helm/charts.git
branch: master

- name: concourse
type: git
icon: github
Expand All @@ -34,11 +31,11 @@ resources:
uri: https://github.com/concourse/ci.git
branch: master

- name: concourse-image
- name: concourse-dev-image
type: registry-image
icon: docker
source:
repository: concourse/concourse
repository: concourse/concourse-dev
tag: ((concourse_image_tag))
username: ((docker.username))
password: ((docker.password))
Expand All @@ -51,6 +48,22 @@ resources:
username: ((docker.username))
password: ((docker.password))

# Using the git instead of helm-chart resource because Bitnami charts are hosted on Docker Hub and we sometimes run into their rate limits
- name: postgresql-chart-git
type: git
source:
uri: https://github.com/bitnami/charts.git
tag_filter: postgresql/((postgresql-chart-version))

- name: prometheus-chart
type: helm-chart
icon: ship-wheel
source:
chart: prometheus-community/prometheus
repos:
- name: prometheus-community
url: https://prometheus-community.github.io/helm-charts

jobs:
- name: k8s-topgun
serial: true
Expand All @@ -69,16 +82,19 @@ jobs:
- in_parallel:
- get: chart-pr
tags: [k8s-topgun]
- get: helm-charts
tags: [k8s-topgun]
- get: concourse
tags: [k8s-topgun]
- get: concourse-image
- get: concourse-dev-image
tags: [k8s-topgun]
- get: ci
tags: [k8s-topgun]
- get: unit-image
tags: [k8s-topgun]
- get: prometheus-chart
tags: [k8s-topgun]
params: { untar: true }
- get: postgresql-chart-git
tags: [ k8s-topgun ]
- put: chart-pr
inputs: [chart-pr]
params: {path: chart-pr, status: pending, context: k8s-topgun}
Expand All @@ -89,7 +105,7 @@ jobs:
file: ci/tasks/k8s-topgun.yml
input_mapping:
concourse-chart: chart-pr
concourse-rc-image: concourse-image
concourse-rc-image: concourse-dev-image
image: unit-image
params:
IN_CLUSTER: "true"
Expand Down
4 changes: 4 additions & 0 deletions pipelines/reconfigure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,8 @@ jobs:
- in_parallel:
- set_pipeline: concourse
file: pipelines-and-tasks/pipelines/concourse.yml
vars:
postgresql-chart-version: 16.3.2
- set_pipeline: helm-chart
file: pipelines-and-tasks/pipelines/helm-chart.yml
instance_vars:
Expand All @@ -280,6 +282,7 @@ jobs:
concourse_base_branch: master
concourse_image_name: concourse/concourse
concourse_image_tag: latest
postgresql-chart-version: 16.3.2
- set_pipeline: helm-prs
file: pipelines-and-tasks/pipelines/helm-prs.yml
instance_vars:
Expand All @@ -288,6 +291,7 @@ jobs:
concourse_base_branch: master
concourse_image_name: concourse/concourse-rc
concourse_image_tag: latest
postgresql-chart-version: 16.3.2
- set_pipeline: docs-prs
team: contributor
file: docs-ci/ci/prs-pipeline.yml
Expand Down
2 changes: 1 addition & 1 deletion tasks/k8s-topgun.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ inputs:
- name: concourse-rc-image
- name: concourse-chart
- name: prometheus-chart
- name: postgresql-chart
- name: postgresql-chart-git

caches:
- path: gopath
Expand Down
6 changes: 5 additions & 1 deletion tasks/scripts/k8s-topgun
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ gke_auth

mkdir -p helm-charts/stable
cp -r prometheus-chart/prometheus helm-charts/stable
cp -r postgresql-chart/postgresql helm-charts/stable
cp -r postgresql-chart-git/bitnami/postgresql helm-charts/stable

pushd helm-charts/stable/postgresql
helm dependency build
popd

export CONCOURSE_IMAGE_DIGEST="$(cat concourse-rc-image/digest)"
export CONCOURSE_IMAGE_TAG="$(cat concourse-rc-image/tag)"
Expand Down

0 comments on commit 2f5761c

Please sign in to comment.