diff --git a/.github/ISSUE_TEMPLATE/release.md b/.github/ISSUE_TEMPLATE/release.md index f4ac5f6f..13116a28 100644 --- a/.github/ISSUE_TEMPLATE/release.md +++ b/.github/ISSUE_TEMPLATE/release.md @@ -15,7 +15,7 @@ The following slash commands are available to use in comments on this issue: | Command | Description | Parameters | |---|---|---| -| `/release` | Creates a new released based on the current state of the `master` branch | `frontend=`
`backend=`
`engagement-status=`
`gitapi=`
`status=`
`config=`
`activity=`
`artifacts=`
`hosting=`
`participants=`
`dispatcher=`
`agnosticv=`
`anarchy=`
`poolboy=` | +| `/release` | Creates a new released based on the current state of the `master` branch | `frontend=`
`backend=`
`engagement-status=`
`gitapi=`
`status=`
`config=`
`activity=`
`artifacts=`
`hosting=`
`participants=`
`engagements=`
`dispatcher=`
`agnosticv=`
`anarchy=`
`poolboy=` | | `/promote` | Promotes the created release to the next environment | N/A | | `/cancel` | Cancels the current release (and closes this issue) | N/A | | `/finish` | Completes the current release (and closes this issue) | N/A | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c345374b..c23b6198 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -96,6 +96,8 @@ jobs: ActivityImageVersion: 'imageTag: ${{ github.event.client_payload.slash_command.activity }}' ArtifactsVersion: ${{ github.event.client_payload.slash_command.artifacts }} ArtifactsImageVersion: 'imageTag: ${{ github.event.client_payload.slash_command.artifacts }}' + EngagementsVersion: ${{ github.event.client_payload.slash_command.engagements }} + EngagementsImageVersion: 'imageTag: ${{ github.event.client_payload.slash_command.engagements }}' EngagementStatusVersion: ${{ github.event.client_payload.slash_command.engagement-status }} EngagementStatusImageVersion: 'imageTag: ${{ github.event.client_payload.slash_command.engagement-status }}' HostingVersion: ${{ github.event.client_payload.slash_command.hosting }} @@ -125,6 +127,8 @@ jobs: Versions_ActivityVersion: 'lodestar-activity: ${{ github.event.client_payload.slash_command.activity }}' Versions_ArtifactsMatchString: 'lodestar-artifacts:.*' Versions_ArtifactsVersion: 'lodestar-artifacts: ${{ github.event.client_payload.slash_command.artifacts }}' + Versions_EngagementsMatchString: 'lodestar-engagements:.*' + Versions_EngagementsVersion: 'lodestar-engagements: ${{ github.event.client_payload.slash_command.engagements }}' Versions_EngagementStatusMatchString: 'lodestar-engagement-status:.*' Versions_EngagementStatusVersion: 'lodestar-engagement-status: ${{ github.event.client_payload.slash_command.engagement-status }}' Versions_HostingMatchString: 'lodestar-hosting:.*' @@ -213,13 +217,22 @@ jobs: yq -i e '.spec.source.targetRevision = env(ArtifactsVersion)' $GITHUB_WORKSPACE/bootstrap/patches/lodestar-artifacts.yaml ; yq -i e '. as $prnt | .spec.source.helm.values | . = sub(strenv(Versions_ArtifactsMatchString),strenv(Versions_ArtifactsVersion))| $prnt' $GITHUB_WORKSPACE/bootstrap/patches/lodestar-status.yaml ; + - name: Update LodeStar Engagements Release Info + if: ${{ github.event.client_payload.slash_command.engagements != null }} + uses: mikefarah/yq@v4.9.6 + with: + cmd: > + yq -i e '. as $prnt | .spec.source.helm.values | . = sub(strenv(ImageTagMatchString),strenv(EngagementsImageVersion)| $prnt' $GITHUB_WORKSPACE/bootstrap/patches/lodestar-engagements.yaml ; + yq -i e '.spec.source.targetRevision = env(EngagementsVersion)' $GITHUB_WORKSPACE/bootstrap/patches/lodestar-engagements.yaml ; + yq -i e '. as $prnt | .spec.source.helm.values | . = sub(strenv(Versions_EngagementsMatchString),strenv(Versions_EngagementsVersion))| $prnt' $GITHUB_WORKSPACE/bootstrap/patches/lodestar-status.yaml ; + - name: Update LodeStar Engagement Status Release Info if: ${{ github.event.client_payload.slash_command.engagement-status != null }} uses: mikefarah/yq@v4.9.6 with: cmd: > yq -i e '. as $prnt | .spec.source.helm.values | . = sub(strenv(ImageTagMatchString),strenv(EngagementStatusImageVersion)| $prnt' $GITHUB_WORKSPACE/bootstrap/patches/lodestar-engagement-status.yaml ; - yq -i e '.spec.source.targetRevision = env(ParticipantsVersion)' $GITHUB_WORKSPACE/bootstrap/patches/lodestar-engagement-status.yaml ; + yq -i e '.spec.source.targetRevision = env(EngagementStatusVersion)' $GITHUB_WORKSPACE/bootstrap/patches/lodestar-engagement-status.yaml ; yq -i e '. as $prnt | .spec.source.helm.values | . = sub(strenv(Versions_EngagementStatusMatchString),strenv(Versions_EngagementStatusVersion))| $prnt' $GITHUB_WORKSPACE/bootstrap/patches/lodestar-status.yaml ; - name: Update LodeStar Hosting Release Info diff --git a/bootstrap/core/lodestar-apps/kustomization.yaml b/bootstrap/core/lodestar-apps/kustomization.yaml index 7e4cf731..92564f9f 100644 --- a/bootstrap/core/lodestar-apps/kustomization.yaml +++ b/bootstrap/core/lodestar-apps/kustomization.yaml @@ -10,6 +10,7 @@ resources: - lodestar-status.yaml - lodestar-activity.yaml - lodestar-artifacts.yaml +- lodestar-engagements.yaml - lodestar-engagement-status.yaml - lodestar-hosting.yaml - lodestar-participants.yaml diff --git a/bootstrap/core/lodestar-apps/lodestar-engagements.yaml b/bootstrap/core/lodestar-apps/lodestar-engagements.yaml new file mode 100644 index 00000000..fd88872c --- /dev/null +++ b/bootstrap/core/lodestar-apps/lodestar-engagements.yaml @@ -0,0 +1,17 @@ +--- +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: lodestar-engagements +spec: + destination: + server: https://kubernetes.default.svc + project: default + source: + path: "deployment" + repoURL: "https://github.com/rht-labs/lodestar-engagements.git" + targetRevision: "main" + syncPolicy: + automated: + prune: true + selfHeal: true \ No newline at end of file diff --git a/bootstrap/kustomization.yaml b/bootstrap/kustomization.yaml index a79c2973..5c0ddcc6 100644 --- a/bootstrap/kustomization.yaml +++ b/bootstrap/kustomization.yaml @@ -15,6 +15,7 @@ patchesStrategicMerge: - patches/lodestar-backend.yaml - patches/lodestar-activity.yaml - patches/lodestar-artifacts.yaml +- patches/lodestar-engagements.yaml - patches/lodestar-engagement-status.yaml - patches/lodestar-git-api.yaml - patches/lodestar-hosting.yaml diff --git a/bootstrap/patches/lodestar-engagements.yaml b/bootstrap/patches/lodestar-engagements.yaml new file mode 100644 index 00000000..daf3b0d3 --- /dev/null +++ b/bootstrap/patches/lodestar-engagements.yaml @@ -0,0 +1,16 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: lodestar-engagements + namespace: lodestar-argo-cd +spec: + ignoreDifferences: + - group: apps.openshift.io + jsonPointers: + - /spec/template/spec/containers/0/image + kind: DeploymentConfig + source: + helm: + values: |- + imageTag: main + targetRevision: main diff --git a/bootstrap/patches/lodestar-status.yaml b/bootstrap/patches/lodestar-status.yaml index 89a8ccbc..7f044c3e 100644 --- a/bootstrap/patches/lodestar-status.yaml +++ b/bootstrap/patches/lodestar-status.yaml @@ -22,6 +22,7 @@ spec: lodestar-config: main lodestar-activity: main lodestar-artifacts: main + lodestar-engagements: main lodestar-engagement-status: main lodestar-hosting: main lodestar-participants: main