forked from tattle-made/Uli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: github action for deploy staging and prod (tattle-made#491)
* fix: github action for deploy staging * fix: github action deploy prod
- Loading branch information
1 parent
ce04154
commit 1063ca3
Showing
2 changed files
with
1 addition
and
169 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 |
---|---|---|
|
@@ -8,9 +8,7 @@ jobs: | |
changes: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
annotation-ui: ${{ steps.filter.outputs.annotation-ui }} | ||
uli-website: ${{ steps.filter.outputs.uli-website}} | ||
ogbv-ml-rest: ${{ steps.filter.outputs.ogbv-ml-rest }} | ||
uli-server: ${{ steps.filter.outputs.uli-server }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
@@ -20,55 +18,11 @@ jobs: | |
id: filter | ||
with: | ||
filters: | | ||
annotation-ui: | ||
- 'annotators/backend/**/*' | ||
- 'annotators/annotation-ui/**/*' | ||
uli-website: | ||
- 'uli-website/**/*' | ||
ogbv-ml-rest: | ||
- 'ogbv-ml-rest/**/*' | ||
uli-server: | ||
- 'browser-extension/api-server/**/*' | ||
annotation-ui: | ||
runs-on: ubuntu-latest | ||
needs: changes | ||
if: ${{ needs.changes.outputs.annotation-ui == 'true' }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: main | ||
- name: Declare some variables | ||
id: vars | ||
shell: bash | ||
run: | | ||
echo "setting variables" | ||
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" | ||
cd annotators/annotation-ui | ||
npm install --force | ||
npm run build | ||
- name: Publish to Docker | ||
uses: elgohr/Publish-Docker-Github-Action@master | ||
with: | ||
username: tattletech | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
name: tattletech/ogbv_annotator | ||
tags: ${{ steps.vars.outputs.sha_short }} | ||
workdir: annotators/backend/ | ||
|
||
- name: deploy to cluster | ||
uses: steebchen/[email protected] | ||
with: # defaults to latest kubectl binary version | ||
config: ${{ secrets.PROD_KUBE_CONFIG_DATA }} | ||
command: set image --record deployment/annotation-ui annotation-ui=tattletech/ogbv_annotator:${{ steps.vars.outputs.sha_short }} | ||
- name: verify deployment | ||
uses: steebchen/[email protected] | ||
with: | ||
config: ${{ secrets.PROD_KUBE_CONFIG_DATA }} | ||
version: v1.21.0 # specify kubectl binary version explicitly | ||
command: rollout status deployment/annotation-ui | ||
|
||
uli-website: | ||
runs-on: ubuntu-latest | ||
needs: changes | ||
|
@@ -102,44 +56,6 @@ jobs: | |
SLACK_COLOR: "#020637" | ||
SLACK_ICON: https://tattle-media.s3.amazonaws.com/monogram-dark.svg | ||
|
||
ogbv-ml-rest: | ||
runs-on: ubuntu-latest | ||
needs: changes | ||
if: ${{ needs.changes.outputs.ogbv-ml-rest == 'true' }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: main | ||
|
||
- name: Declare some variables | ||
id: vars | ||
shell: bash | ||
run: | | ||
echo "setting variables" | ||
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" | ||
- name: Build and Push to Docker | ||
uses: elgohr/Publish-Docker-Github-Action@master | ||
with: | ||
username: tattletech | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
name: tattletech/ogbv-ml-rest | ||
tags: ${{ steps.vars.outputs.sha_short }} | ||
workdir: ogbv-ml-rest | ||
|
||
# - name: deploy to cluster | ||
# uses: steebchen/[email protected] | ||
# with: # defaults to latest kubectl binary version | ||
# config: ${{ secrets.PROD_KUBE_CONFIG_DATA }} | ||
# command: set image --record deployment/ogbv-ml-rest ogbv-ml-rest=tattletech/ogbv-ml-rest:${{ steps.vars.outputs.sha_short }} | ||
# - name: verify deployment | ||
# uses: steebchen/[email protected] | ||
# with: | ||
# config: ${{ secrets.PROD_KUBE_CONFIG_DATA }} | ||
# version: v1.21.0 # specify kubectl binary version explicitly | ||
# command: rollout status deployment/ogbv-ml-rest | ||
|
||
uli-server: | ||
runs-on: ubuntu-latest | ||
needs: changes | ||
|
@@ -174,4 +90,4 @@ jobs: | |
with: | ||
config: ${{ secrets.PROD_KUBE_CONFIG_DATA }} | ||
version: v1.21.0 # specify kubectl binary version explicitly | ||
command: rollout status deployment/ogbv-plugin | ||
command: rollout status deployment/ogbv-plugin |
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 |
---|---|---|
|
@@ -8,8 +8,6 @@ jobs: | |
changes: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
annotation-ui: ${{ steps.filter.outputs.annotation-ui }} | ||
ogbv-ml-rest: ${{ steps.filter.outputs.ogbv-ml-rest }} | ||
browser-extension-server: ${{ steps.filter.outputs.browser-extension-server }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
@@ -19,91 +17,9 @@ jobs: | |
id: filter | ||
with: | ||
filters: | | ||
annotation-ui: | ||
- 'annotators/backend/**/*' | ||
- 'annotators/annotation-ui/**/*' | ||
ogbv-ml-rest: | ||
- 'ogbv-ml-rest/**/*' | ||
browser-extension-server: | ||
- 'browser-extension/api-server/**/*' | ||
annotation-ui: | ||
runs-on: ubuntu-latest | ||
needs: changes | ||
if: ${{ needs.changes.outputs.annotation-ui == 'true' }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: development | ||
- name: Declare some variables | ||
id: vars | ||
shell: bash | ||
run: | | ||
echo "setting variables" | ||
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" | ||
cd annotators/annotation-ui | ||
npm install | ||
npm run build | ||
- name: Publish to Docker | ||
uses: elgohr/Publish-Docker-Github-Action@master | ||
with: | ||
username: tattletech | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
name: tattletech/ogbv_annotator | ||
tags: ${{ steps.vars.outputs.sha_short }} | ||
workdir: annotators/backend/ | ||
|
||
- name: deploy to cluster | ||
uses: steebchen/[email protected] | ||
with: # defaults to latest kubectl binary version | ||
config: ${{ secrets.PROD_KUBE_CONFIG_DATA }} | ||
command: set image --record deployment/annotation-ui-staging annotation-ui-staging=tattletech/ogbv_annotator:${{ steps.vars.outputs.sha_short }} | ||
- name: verify deployment | ||
uses: steebchen/[email protected] | ||
with: | ||
config: ${{ secrets.PROD_KUBE_CONFIG_DATA }} | ||
version: v1.21.0 # specify kubectl binary version explicitly | ||
command: rollout status deployment/annotation-ui-staging | ||
|
||
ogbv-ml-rest: | ||
runs-on: ubuntu-latest | ||
needs: changes | ||
if: ${{ needs.changes.outputs.ogbv-ml-rest == 'true' }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: development | ||
|
||
- name: Declare some variables | ||
id: vars | ||
shell: bash | ||
run: | | ||
echo "setting variables" | ||
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" | ||
- name: Build and Push to Docker | ||
uses: elgohr/Publish-Docker-Github-Action@master | ||
with: | ||
username: tattletech | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
name: tattletech/ogbv-ml-rest | ||
tags: ${{ steps.vars.outputs.sha_short }} | ||
workdir: ogbv-ml-rest | ||
|
||
# - name: deploy to cluster | ||
# uses: steebchen/[email protected] | ||
# with: # defaults to latest kubectl binary version | ||
# config: ${{ secrets.PROD_KUBE_CONFIG_DATA }} | ||
# command: set image --record deployment/ogbv-ml-rest ogbv-ml-rest=tattletech/ogbv-ml-rest:${{ steps.vars.outputs.sha_short }} | ||
# - name: verify deployment | ||
# uses: steebchen/[email protected] | ||
# with: | ||
# config: ${{ secrets.PROD_KUBE_CONFIG_DATA }} | ||
# version: v1.21.0 # specify kubectl binary version explicitly | ||
# command: rollout status deployment/ogbv-ml-rest | ||
|
||
browser-extension-server: | ||
runs-on: "ubuntu-latest" | ||
needs: "changes" | ||
|