-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
205 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
name: Auto Commit | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- production | ||
|
||
jobs: | ||
run: | ||
name: Auto Commit | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: main | ||
|
||
- name: Update publish version | ||
id: update | ||
run: | | ||
VERSION=${GITHUB_SHA::8} | ||
if [ "$GITHUB_REF" = refs/heads/production ]; then | ||
TYPE=production | ||
else | ||
TYPE=staging | ||
fi | ||
echo ::set-output name=VERSION::${VERSION} | ||
sed -i "s|${TYPE}Tag:.*|${TYPE}Tag: \"$VERSION\"|g" deploy/values.yaml | ||
- name: Commit changes | ||
uses: EndBug/add-and-commit@v7 | ||
with: | ||
default_author: github_actions | ||
add: '.' | ||
message: "[ci skip] deploy from ${{ steps.update.outputs.VERSION }}" | ||
signoff: true | ||
branch: main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
apiVersion: v2 | ||
name: marlowe-payouts | ||
version: v1.0.0 | ||
description: dApp for Marlowe Withdrawals | ||
home: https://github.com/input-output-hk/marlowe-payouts | ||
sources: | ||
- https://github.com/input-output-hk/marlowe-payouts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
{{- range $index, $network := .Values.networks }} | ||
--- | ||
apiVersion: core.oam.dev/v1beta1 | ||
kind: Application | ||
metadata: | ||
name: marlowe-payouts-{{ $network }} | ||
namespace: marlowe-production | ||
spec: | ||
components: | ||
- name: marlowe-payouts-{{ $network }} | ||
properties: | ||
image: p3terx/darkhttpd | ||
args: | ||
- /client-www | ||
- --port | ||
- "8080" | ||
imagePullPolicy: Always | ||
ports: | ||
- expose: true | ||
port: 8080 | ||
protocol: TCP | ||
traits: | ||
- properties: | ||
replicas: 1 | ||
type: scaler | ||
- properties: | ||
domains: | ||
- payouts-{{ $network }}.prod.scdev.aws.iohkdev.io | ||
rules: | ||
- port: 8080 | ||
type: https-route | ||
- type: init-container | ||
properties: | ||
name: load-payouts-client | ||
image: ghcr.io/input-output-hk/marlowe-payouts:{{ $.Values.images.productionTag }} | ||
args: | ||
- -c | ||
- | | ||
root="$(dirname $(readlink -f /profile/index.html))" | ||
cp -a $root/* /share/marlowe-payouts/static | ||
cat > /share/marlowe-payouts/static/config.json <<EOF | ||
{ | ||
"marloweWebServerUrl": "https://marlowe-runtime-{{ $network }}-web.demo.scdev.aws.iohkdev.io", | ||
} | ||
EOF | ||
mountName: client-www | ||
initMountPath: /share/marlowe-payouts/static | ||
appMountPath: /client-www | ||
type: webservice | ||
policies: | ||
- name: marlowe-payouts-staging | ||
properties: | ||
clusters: | ||
- local | ||
namespace: marlowe-staging | ||
type: topology | ||
|
||
- name: marlowe-payouts | ||
properties: | ||
clusters: | ||
- local | ||
namespace: marlowe-production | ||
type: topology | ||
|
||
- name: staging-override | ||
type: override | ||
properties: | ||
components: | ||
- name: marlowe-payouts-{{ $network }} | ||
properties: | ||
image: p3terx/darkhttpd | ||
args: | ||
- /client-www | ||
- --port | ||
- "8080" | ||
imagePullPolicy: Always | ||
ports: | ||
- expose: true | ||
port: 8080 | ||
protocol: TCP | ||
traits: | ||
- properties: | ||
replicas: 1 | ||
type: scaler | ||
- properties: | ||
domains: | ||
- payouts-{{ $network }}.scdev.aws.iohkdev.io | ||
rules: | ||
- port: 8080 | ||
type: https-route | ||
- type: init-container | ||
properties: | ||
name: load-payouts-client | ||
image: ghcr.io/input-output-hk/marlowe-payouts:{{ $.Values.images.stagingTag }} | ||
args: | ||
- -c | ||
- | | ||
root="$(dirname $(readlink -f /profile/index.html))" | ||
cp -a $root/* /share/marlowe-payouts/static | ||
cat > /share/marlowe-payouts/static/config.json <<EOF | ||
{ | ||
"marloweWebServerUrl": "https://marlowe-runtime-{{ $network }}-web.demo.scdev.aws.iohkdev.io", | ||
} | ||
EOF | ||
mountName: client-www | ||
initMountPath: /share/marlowe-payouts/static | ||
appMountPath: /client-www | ||
type: webservice | ||
workflow: | ||
mode: | ||
steps: DAG | ||
steps: | ||
- meta: | ||
alias: Push staging image | ||
name: push-image-staging | ||
type: build-nix-image | ||
properties: | ||
image: ghcr.io/input-output-hk/marlowe-payouts:{{ $.Values.images.stagingTag }} | ||
requests: | ||
ephemeralStorage: 25Gi | ||
includedFlakeURIs: | ||
- "github:input-output-hk/marlowe-payouts?ref={{ $.Values.images.stagingTag }}#marlowe-payouts" | ||
- meta: | ||
alias: Push image | ||
name: push-image | ||
type: build-nix-image | ||
properties: | ||
image: ghcr.io/input-output-hk/marlowe-payouts:{{ $.Values.images.productionTag }} | ||
requests: | ||
ephemeralStorage: 25Gi | ||
includedFlakeURIs: | ||
- "github:input-output-hk/marlowe-payouts?ref={{ $.Values.images.productionTag }}#marlowe-payouts" | ||
- type: deploy | ||
meta: | ||
alias: Deploy marlowe-payouts | ||
dependsOn: | ||
- push-image | ||
name: marlowe-payouts | ||
properties: | ||
policies: | ||
- marlowe-payouts | ||
- type: deploy | ||
meta: | ||
alias: Deploy marlowe-payouts to staging | ||
dependsOn: | ||
- push-image-staging | ||
name: marlowe-payouts-staging | ||
properties: | ||
policies: | ||
- marlowe-payouts-staging | ||
- staging-override | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
networks: | ||
- preprod | ||
- preview | ||
- mainnet | ||
images: | ||
stagingTag: "908e1db" | ||
productionTag: "908e1db" |