Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trigger Ephemeral Test Workflows #506

Merged
merged 60 commits into from
Sep 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
3de1ddd
adding deploy test-env
rfuelsh Jul 12, 2022
0454563
adding deploy test-env
rfuelsh Jul 12, 2022
bc21283
adding deploy test-env
rfuelsh Jul 12, 2022
48bb106
adding deleting test workflow
rfuelsh Jul 12, 2022
a475aee
updating ref for test env
rfuelsh Jul 12, 2022
ab452fc
add slight modifications to deploy scripts
rfuelsh Jul 17, 2022
b47ed43
add cleanup script
rfuelsh Jul 17, 2022
8bfbf01
updating eph workflows
rfuelsh Jul 17, 2022
3062b27
Merge branch 'master' into create-eph-envs-workflows
rfuelsh Jul 26, 2022
b5201f3
add ns
rfuelsh Jul 27, 2022
c272b47
remove get ns
rfuelsh Jul 27, 2022
6385c66
remove get ingress
rfuelsh Jul 27, 2022
35e0a40
add envs
rfuelsh Jul 27, 2022
fd4ec6b
Remove delete-namespace.sh
rfuelsh Jul 31, 2022
ee01896
Adding remote curl
rfuelsh Jul 31, 2022
dc7af18
Adding remote curl
rfuelsh Jul 31, 2022
d11cc85
Adding remote curl
rfuelsh Jul 31, 2022
255564e
slight modify
rfuelsh Jul 31, 2022
f372800
slight modify
rfuelsh Jul 31, 2022
f82b44d
updating remote delete workflow
rfuelsh Jul 31, 2022
68b3a06
updating remote delete workflow
rfuelsh Jul 31, 2022
103ffd5
updating delete workflow
rfuelsh Jul 31, 2022
f75bb2b
updating delete workflow
rfuelsh Jul 31, 2022
213e5ce
Merge branch 'master' into create-eph-envs-workflows
rfuelsh Aug 5, 2022
d3aa13a
Merge branch 'master' into create-eph-envs-workflows
ellioty Aug 6, 2022
a043167
Updating workflows with new namespace params
rfuelsh Aug 11, 2022
5ccde76
Merge branch 'master' into create-eph-envs-workflows
rfuelsh Aug 11, 2022
e0d7ce7
Add deploy criteria for PR open
rfuelsh Aug 11, 2022
c99771c
Add deploy criteria for PR open
rfuelsh Aug 11, 2022
4959c1d
Add deploy criteria for PR open
rfuelsh Aug 11, 2022
3269643
Adding PR workflows
rfuelsh Aug 11, 2022
e584e78
Adding PR workflows
rfuelsh Aug 11, 2022
28e6298
Adding PR workflows
rfuelsh Aug 11, 2022
83a63a9
Adding PR workflows
rfuelsh Aug 11, 2022
c60501f
Adding PR workflows
rfuelsh Aug 11, 2022
0eb0740
Adding PR workflows
rfuelsh Aug 11, 2022
0a1b914
Adding PR workflows
rfuelsh Aug 11, 2022
14cde2b
Adding PR workflows
rfuelsh Aug 11, 2022
b323e4a
Adding PR workflows
rfuelsh Aug 11, 2022
2156f79
Adding PR workflows
rfuelsh Aug 11, 2022
512bea6
Adding PR workflows
rfuelsh Aug 11, 2022
6d009e4
Adding PR workflows
rfuelsh Aug 11, 2022
f774845
Adding PR workflows
rfuelsh Aug 11, 2022
d2541b1
Adding PR workflows
rfuelsh Aug 11, 2022
dcb1b5e
testing branch workflow
rfuelsh Aug 16, 2022
8377ec6
testing branch workflow
rfuelsh Aug 16, 2022
882944a
testing branch workflow
rfuelsh Aug 16, 2022
5c117de
testing deploy env
rfuelsh Aug 16, 2022
95b3cfb
testing workflow
rfuelsh Aug 16, 2022
eafeb25
Merge branch 'master' into create-eph-envs-workflows
rfuelsh Aug 16, 2022
fc3b1f5
Merge branch 'master' into create-eph-envs-workflows
xgreenx Sep 14, 2022
29fe5b1
Updating ci.yaml
rfuelsh Sep 25, 2022
abe20b3
Merge branch 'master' into create-eph-envs-workflows
rfuelsh Sep 25, 2022
1032b17
fix syntax error ci.yaml
rfuelsh Sep 25, 2022
6a34cb4
Adding NAMESPACE var to ci.yaml
rfuelsh Sep 25, 2022
d1b0c32
Update ci.yml
rfuelsh Sep 25, 2022
ed34ca5
Merge branch 'master' into create-eph-envs-workflows
rfuelsh Sep 28, 2022
beff9e6
add preview ref rule
rfuelsh Sep 29, 2022
081c25d
add require preview branch
rfuelsh Sep 29, 2022
2e32923
require preview branch
rfuelsh Sep 29, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,35 @@ jobs:
notify_when: 'failure'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_NOTIFY_BUILD }}

# Deploy Fuel Core Ephemeral Developer Environment
deploy-eph-env:
if: github.ref == 'refs/heads/preview/*'
needs:
- publish-docker-image
runs-on: ubuntu-latest
steps:
- name: Set Environment Variables
run: |
tag=(`echo $GITHUB_SHA | cut -c1-7`)
echo "IMAGE_TAG=`echo sha-$tag`" >> $GITHUB_ENV
echo "DEPLOYMENT_VERSION=$(echo $GITHUB_SHA)" >> $GITHUB_ENV
echo "NAMESPACE=$(echo ${GITHUB_HEAD_REF})" >> $GITHUB_ENV

- name: Deploy Fuel Core Ephemeral Developer Environment
uses: benc-uk/workflow-dispatch@v1
with:
workflow: Deploy Fuel-Core on k8s
repo: FuelLabs/fuel-deployment
ref: refs/heads/master
token: ${{ secrets.REPO_TOKEN }}
inputs: '{ "k8s-type": "${{ env.K8S }}", "config-directory": "${{ env.CONFIG }}", "config-env": "${{ env.ENV }}", "deployment-version": "${{ env.DEPLOYMENT_VERSION }}", "image-tag": "${{ env.IMAGE_TAG }}", "namespace": "${{ env.NAMESPACE }}", "delete-infra": "${{ env.DELETE_INFRA }}" }'
env:
K8S: 'eks'
CONFIG: 'fuel-dev1'
ENV: 'fueldevsway.env'
DELETE_INFRA: true

# Deploy Latest Fuel-Core Release
deploy:
if: github.ref == 'refs/heads/master'
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/delete-test-env.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Delete Ephemeral Test Environment

on:
pull_request:
types: [closed]

env:
REGISTRY: ghcr.io

jobs:
# Delete Ephemeral Test Environment
delete-test-enviromment:
if: github.ref == 'refs/heads/preview/*'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set Environment Variables
id: set_env_var
run: |
echo "NAMESPACE=$(echo ${GITHUB_HEAD_REF})" >> $GITHUB_ENV
echo "DEPLOYMENT_VERSION=$(echo $GITHUB_SHA)" >> $GITHUB_ENV

- name: Delete Ephemeral Test Environment
id: delete_eph_env
run: |
curl \
-X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
https://api.github.com/repos/FuelLabs/fuel-deployment/actions/workflows/delete-test-env.yml/dispatches \
-d '{"ref":"master","inputs":{ "k8s-type": "${{ env.K8S }}", "config-directory": "${{ env.CONFIG }}", "config-env": "${{ env.ENV }}", "deployment-version": "${{ env.DEPLOYMENT_VERSION }}", "namespace": "${{ env.NAMESPACE }}" }}'
env:
K8S: 'eks'
CONFIG: 'fuel-dev1'
ENV: 'fueldevsway.env'

38 changes: 38 additions & 0 deletions .github/workflows/deploy-test-env.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Deploy Ephemeral Test Environment

on:
pull_request:
types: [opened, reopened]

env:
REGISTRY: ghcr.io

jobs:
# Deploy Fuel-Core Ephemeral Developer Environment
deploy-eph-enviromment:
if: github.ref == 'refs/heads/preview/*'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set Environment Variables
id: set_env_var
run: |
echo "DEPLOYMENT_VERSION=$(echo $GITHUB_SHA)" >> $GITHUB_ENV
echo "NAMESPACE=$(echo ${GITHUB_HEAD_REF})" >> $GITHUB_ENV

- name: Deploy Ephemeral Test Environment
id: deploy_eph_env
run: |
curl \
-X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
https://api.github.com/repos/FuelLabs/fuel-deployment/actions/workflows/deploy-test-env.yml/dispatches \
-d '{"ref":"master","inputs":{ "k8s-type": "${{ env.K8S }}", "config-directory": "${{ env.CONFIG }}", "config-env": "${{ env.ENV }}", "deployment-version": "${{ env.DEPLOYMENT_VERSION }}", "image-tag": "${{ env.IMAGE_TAG }}", "namespace": "${{ env.NAMESPACE }}" }}'
env:
K8S: 'eks'
CONFIG: 'fuel-dev1'
ENV: 'fueldevsway.env'
IMAGE_TAG: 'latest'
4 changes: 0 additions & 4 deletions deployment/scripts/fuel-core-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ if [ "${k8s_provider}" == "eks" ]; then
--wait \
--timeout 8000s \
--debug

# Verify Deployment
kubectl rollout status deployment/fuel-core-k8s --namespace ${k8s_namespace} --timeout=120s
Voxelot marked this conversation as resolved.
Show resolved Hide resolved

else
echo "You have inputted a non-supported kubernetes provider in your .env"
fi