-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/feature/hide-share-button-from-m…
…y-project-page' into feature/hide-share-button-from-my-project-page
- Loading branch information
Showing
16 changed files
with
168 additions
and
148 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,81 @@ | ||
name: Integrate changes and deploy | ||
|
||
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#on | ||
on: | ||
workflow_call: | ||
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#onworkflow_callinputs | ||
inputs: | ||
image-tag: | ||
type: string | ||
required: true | ||
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onworkflow_callsecrets | ||
secrets: | ||
kube-context: | ||
required: true | ||
image-repo-username: | ||
required: true | ||
image-repo-password: | ||
required: true | ||
|
||
jobs: | ||
integrate: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
# https://docs.docker.com/develop/develop-images/build_enhancements/ | ||
DOCKER_BUILDKIT: 1 | ||
|
||
defaults: | ||
run: | ||
working-directory: docker | ||
|
||
steps: | ||
- | ||
uses: actions/checkout@v2 | ||
- | ||
run: | | ||
docker --version | ||
docker-compose --version | ||
- | ||
name: Establish image name | ||
id: image | ||
run: | | ||
echo ::set-output name=NAMESPACE::sillsdev/web-languageforge | ||
echo ::set-output name=TAG::${{ inputs.image-tag }} | ||
- | ||
name: Build app | ||
run: docker-compose build --build-arg ENVIRONMENT=production --build-arg BUILD_VERSION=${{ steps.image.outputs.TAG }} app | ||
- | ||
run: docker-compose run --rm app cat /var/www/html/build-version.txt /var/www/html/version.php | ||
- | ||
name: Check unit tests | ||
run: make unit-tests-ci | ||
- | ||
name: Check e2e tests | ||
run: make e2e-tests-ci | ||
- | ||
name: Log in to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.image-repo-username }} | ||
password: ${{ secrets.image-repo-password }} | ||
- | ||
name: Tag image | ||
run: docker tag lf-app ${{ steps.image.outputs.NAMESPACE }}:${{ steps.image.outputs.TAG }} | ||
- | ||
name: Publish image | ||
run: docker push ${{ steps.image.outputs.NAMESPACE }}:${{ steps.image.outputs.TAG }} | ||
|
||
outputs: | ||
IMAGE: ${{ steps.image.outputs.NAMESPACE }}:${{ steps.image.outputs.TAG }} | ||
|
||
deploy: | ||
runs-on: [self-hosted, languageforge] | ||
|
||
needs: integrate | ||
|
||
steps: | ||
- | ||
uses: sillsdev/common-github-actions/install-kubectl@v1 | ||
- | ||
run: kubectl --context ${{ secrets.kube-context }} set image deployment/app app=${{ needs.integrate.outputs.IMAGE }} |
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,21 @@ | ||
name: Deploy to production | ||
|
||
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#on | ||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
production: | ||
if: github.event.base_ref == 'refs/heads/master' | ||
|
||
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_iduses | ||
uses: sillsdev/web-languageforge/.github/workflows/integrate-and-deploy.yml@master | ||
with: | ||
image-tag: $(echo ${{ github.ref }} | sed 's/refs\/tags\///') | ||
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idsecrets | ||
secrets: | ||
kube-context: ${{ secrets.LTOPS_K8S_PRODUCTION_CONTEXT }} | ||
image-repo-username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
image-repo-password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} |
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,19 @@ | ||
name: Deploy to staging | ||
|
||
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#on | ||
on: | ||
push: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
staging: | ||
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_iduses | ||
uses: sillsdev/web-languageforge/.github/workflows/integrate-and-deploy.yml@develop | ||
with: | ||
image-tag: develop-$(date +%Y%m%d)-${{ github.sha }} | ||
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idsecrets | ||
secrets: | ||
kube-context: ${{ secrets.LTOPS_K8S_STAGING_CONTEXT }} | ||
image-repo-username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
image-repo-password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} |
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 |
---|---|---|
|
@@ -17,16 +17,13 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: satackey/[email protected] | ||
|
||
- name: Run Unit Tests | ||
- | ||
uses: actions/checkout@v2 | ||
- | ||
name: Run Unit Tests | ||
run: make unit-tests-ci | ||
|
||
- name: echo working directory contents | ||
run: ls -l | ||
|
||
- name: Publish Test Results | ||
- | ||
name: Publish Test Results | ||
uses: docker://ghcr.io/enricomi/publish-unit-test-result-action:v1 | ||
if: always() | ||
with: | ||
|
@@ -38,13 +35,16 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: satackey/[email protected] | ||
|
||
- name: Run E2E Tests | ||
- | ||
uses: actions/checkout@v2 | ||
- | ||
name: Build app | ||
run: make build | ||
- | ||
name: Run E2E Tests | ||
run: make e2e-tests-ci | ||
|
||
- name: Publish Test Results | ||
- | ||
name: Publish Test Results | ||
uses: docker://ghcr.io/enricomi/publish-unit-test-result-action:v1 | ||
if: always() | ||
with: | ||
|
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
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
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
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 |
---|---|---|
@@ -1 +1,3 @@ | ||
*-current.yaml | ||
all_projects | ||
on_hold |
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
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
Oops, something went wrong.