Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Commit

Permalink
Updating deployment.yaml with the latest image version
Browse files Browse the repository at this point in the history
  • Loading branch information
mcasperson committed Jan 13, 2022
1 parent c10f91c commit dcaf638
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 3 deletions.
12 changes: 11 additions & 1 deletion dotnet/Audit.Service/github/action.yml
Expand Up @@ -158,6 +158,16 @@ runs:
shell: bash
working-directory: dotnet/Audit.Service
# Update the deployment.yaml file to trigger a GitOps deployment
- name: Update values.yaml
uses: fjogeleit/yaml-update-action@master
with:
valueFile: 'dotnet/Audit.Service/k8s/deployment.yaml'
propertyPath: 'spec.template.spec.containers.0.image'
value: "octopussamples/octopub-audits:latest octopussamples/octopub-audits:0.1.${{ inputs.run_number }}${{ env.BRANCH_NAME != 'master' && format('-{0}', env.BRANCH_NAME) || '' }}"
message: "Updated image reference"
createPR: false

- name: Generate Octopus Deploy build information
uses: xo-energy/action-octopus-build-information@v1.1.2
with:
Expand All @@ -183,7 +193,7 @@ runs:
--space "Octopub"
--gitRef master
shell: bash

- name: Trigger deployment to security
if: ${{ env.BRANCH_NAME == 'master' }}
run: >
Expand Down
24 changes: 24 additions & 0 deletions dotnet/Audit.Service/k8s/deployment.yaml
@@ -0,0 +1,24 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: audits-service
labels:
app: web
spec:
selector:
matchLabels:
app: audits-service
replicas: 1
strategy:
type: RollingUpdate
template:
metadata:
labels:
app: audits-service
spec:
containers:
- name: randomquotes
image: com.octopus.octopub:audits-service
ports:
- name: web
containerPort: 8083
4 changes: 2 additions & 2 deletions dotnet/OctoPub.sln.DotSettings.user
Expand Up @@ -5,8 +5,8 @@
&lt;/AssemblyExplorer&gt;</s:String>


<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=345f666f_002Dd628_002D4da2_002D9dbc_002D0a92bb4d1c6e/@EntryIndexedValue">&lt;SessionState ContinuousTestingMode="0" IsActive="True" Name="All tests from WebTests.cs" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session"&gt;
&lt;Project Location="C:\Code\OctoPub\dotnet\Audit.Service.Tests" Presentation="&amp;lt;Audit.Service.Tests&amp;gt;" /&gt;
<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=345f666f_002Dd628_002D4da2_002D9dbc_002D0a92bb4d1c6e/@EntryIndexedValue">&lt;SessionState ContinuousTestingMode="0" IsActive="True" Name="All tests from WebTests.cs" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session"&gt;&#xD;
&lt;Project Location="C:\Code\OctoPub\dotnet\Audit.Service.Tests" Presentation="&amp;lt;Audit.Service.Tests&amp;gt;" /&gt;&#xD;
&lt;/SessionState&gt;</s:String>


Expand Down

0 comments on commit dcaf638

Please sign in to comment.