Skip to content

Commit

Permalink
add engagement service (#353)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcanoy authored Oct 27, 2021
1 parent a17d4bd commit f699ed9
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -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=<version>`<br />`backend=<version>`<br />`engagement-status=<version>`<br />`gitapi=<version>`<br />`status=<version>`<br />`config=<version>`<br />`activity=<version>`<br />`artifacts=<version>`<br />`hosting=<version>`<br />`participants=<version>`<br />`dispatcher=<version>`<br />`agnosticv=<version>`<br />`anarchy=<version>`<br />`poolboy=<version>` |
| `/release` | Creates a new released based on the current state of the `master` branch | `frontend=<version>`<br />`backend=<version>`<br />`engagement-status=<version>`<br />`gitapi=<version>`<br />`status=<version>`<br />`config=<version>`<br />`activity=<version>`<br />`artifacts=<version>`<br />`hosting=<version>`<br />`participants=<version>`<br />`engagements=<version>`<br />`dispatcher=<version>`<br />`agnosticv=<version>`<br />`anarchy=<version>`<br />`poolboy=<version>` |
| `/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 |
15 changes: 14 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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:.*'
Expand Down Expand Up @@ -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/[email protected]
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/[email protected]
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
Expand Down
1 change: 1 addition & 0 deletions bootstrap/core/lodestar-apps/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 17 additions & 0 deletions bootstrap/core/lodestar-apps/lodestar-engagements.yaml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions bootstrap/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 16 additions & 0 deletions bootstrap/patches/lodestar-engagements.yaml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions bootstrap/patches/lodestar-status.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f699ed9

Please sign in to comment.