-
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.
Merge pull request #882 from bcgov/test-rook-MD-merge-dev-mar18
Test-Rook - Merge dev branch into test-rook
- Loading branch information
Showing
205 changed files
with
24,770 additions
and
6,554 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,106 @@ | ||
name: Document Services CD | ||
|
||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
- main | ||
- dev-marshal | ||
- test-marshal | ||
- dev-rook | ||
- test-rook | ||
paths: | ||
- "computingservices/DocumentServices/**" | ||
- ".github/workflows/documentservice-cd.yml" | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
working-directory: ./computingservices/DocumentServices | ||
|
||
env: | ||
APP_NAME: "reviewer-documentservice" | ||
TOOLS_NAME: "${{secrets.OPENSHIFT4_REPOSITORY}}" | ||
|
||
jobs: | ||
documentServices-cd-by-push: | ||
runs-on: ubuntu-20.04 | ||
|
||
if: github.event_name == 'push' && github.repository == 'bcgov/foi-docreviewer' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set ENV variables for dev branch | ||
if: ${{ github.ref_name == 'dev' }} | ||
shell: bash | ||
run: | | ||
echo "For ${{ github.ref_name }} branch" | ||
echo "TAG_NAME=dev" >> $GITHUB_ENV | ||
echo "BRANCH_NAME=dev" >> $GITHUB_ENV | ||
echo "ENV_NAME=dev" >> $GITHUB_ENV | ||
- name: Set ENV variables for main branch | ||
if: ${{ github.ref_name == 'main' }} | ||
shell: bash | ||
run: | | ||
echo "For ${{ github.ref_name }} branch" | ||
echo "TAG_NAME=test" >> $GITHUB_ENV | ||
echo "BRANCH_NAME=main" >> $GITHUB_ENV | ||
echo "ENV_NAME=test" >> $GITHUB_ENV | ||
- name: Set ENV variables for dev-marshal branch | ||
if: ${{ github.ref_name == 'dev-marshal' }} | ||
run: | | ||
echo "For ${{ github.ref_name }} branch" | ||
echo "TAG_NAME=dev-marshal" >> $GITHUB_ENV | ||
echo "BRANCH_NAME=dev-marshal" >> $GITHUB_ENV | ||
echo "ENV_NAME=dev" >> $GITHUB_ENV | ||
- name: Set ENV variables for test-marshal branch | ||
if: ${{ github.ref_name == 'test-marshal' }} | ||
run: | | ||
echo "For ${{ github.ref_name }} branch" | ||
echo "TAG_NAME=test-marshal" >> $GITHUB_ENV | ||
echo "BRANCH_NAME=test-marshal" >> $GITHUB_ENV | ||
echo "ENV_NAME=test" >> $GITHUB_ENV | ||
- name: Set ENV variables for dev-rook branch | ||
if: ${{ github.ref_name == 'dev-rook' }} | ||
run: | | ||
echo "For ${{ github.ref_name }} branch" | ||
echo "TAG_NAME=dev-rook" >> $GITHUB_ENV | ||
echo "BRANCH_NAME=dev-rook" >> $GITHUB_ENV | ||
echo "ENV_NAME=dev" >> $GITHUB_ENV | ||
- name: Set ENV variables for test-rook branch | ||
if: ${{ github.ref_name == 'test-rook' }} | ||
run: | | ||
echo "For ${{ github.ref_name }} branch" | ||
echo "TAG_NAME=test-rook" >> $GITHUB_ENV | ||
echo "BRANCH_NAME=test-rook" >> $GITHUB_ENV | ||
echo "ENV_NAME=test" >> $GITHUB_ENV | ||
- name: Login Openshift | ||
shell: bash | ||
run: | | ||
oc login --server=${{secrets.OPENSHIFT4_LOGIN_REGISTRY}} --token=${{secrets.OPENSHIFT4_SA_TOKEN}} | ||
- name: Tools project | ||
shell: bash | ||
run: | | ||
oc project ${{ env.TOOLS_NAME }}-tools | ||
- name: Build from ${{ env.BRANCH_NAME }} branch | ||
shell: bash | ||
run: | | ||
oc patch bc/${{ env.APP_NAME }}-build -p '{"spec":{"source":{"contextDir":"/computingservices/DocumentServices","git":{"ref":"${{ env.BRANCH_NAME }}"}}}}' | ||
- name: Start Build Openshift | ||
shell: bash | ||
run: | | ||
oc start-build ${{ env.APP_NAME }}-build --wait | ||
- name: Tag+Deploy for ${{ env.TAG_NAME }} | ||
shell: bash | ||
run: | | ||
oc tag ${{ env.APP_NAME }}:latest ${{ env.APP_NAME }}:${{ env.TAG_NAME }} |
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,54 @@ | ||
name: Document Services CI | ||
|
||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- dev | ||
- dev-marshal | ||
- test-marshal | ||
- dev-rook | ||
- test-rook | ||
paths: | ||
- "computingservices/DocumentServices/**" | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
working-directory: ./computingservices/DocumentServices | ||
|
||
jobs: | ||
docker-build-check: | ||
runs-on: ubuntu-20.04 | ||
name: Build dockerfile to ensure it works | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: docker build to check strictness | ||
id: docker-build | ||
run: | | ||
docker build -f Dockerfile.local . | ||
python-build-check: | ||
runs-on: ubuntu-20.04 | ||
name: Build python to ensure it works | ||
|
||
strategy: | ||
matrix: | ||
# python-version: [3.6, 3.7, 3.8, 3.9] | ||
python-version: [3.9] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flake8 pytest | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
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.