-
Notifications
You must be signed in to change notification settings - Fork 3
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 #300 from AmpersandTarski/issue/279-create-github-…
…actions-to-generate-docker-images Issue/279 create GitHub actions to generate docker images
- Loading branch information
Showing
5 changed files
with
244 additions
and
10 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,74 @@ | ||
name: Build and Deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- "issue/**" | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
environment: LocalFranSlot | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: ./RAP4 | ||
file: ./RAP4/Dockerfile | ||
push: true | ||
tags: | | ||
${{ secrets.DOCKERHUB_USERNAME }}/rap:latest | ||
${{ secrets.DOCKERHUB_USERNAME }}/rap:${{ github.sha }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
|
||
deploy: | ||
name: Deploy | ||
needs: build | ||
runs-on: ubuntu-latest | ||
environment: LocalFranSlot | ||
permissions: write-all | ||
steps: | ||
- name: Check out repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: "Az CLI login" | ||
uses: azure/login@v1 | ||
with: | ||
client-id: ${{ secrets.AZURE_CLIENT_ID }} | ||
tenant-id: ${{ secrets.AZURE_TENANT_ID }} | ||
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | ||
|
||
- name: Set AKS context | ||
id: set-context | ||
uses: azure/aks-set-context@v3 | ||
with: | ||
resource-group: "${{ vars.RG }}" | ||
cluster-name: "${{ vars.AKSCLUSTER }}" | ||
|
||
- name: Setup kubectl | ||
id: install-kubectl | ||
uses: azure/setup-kubectl@v3 | ||
|
||
- name: Deploy to AKS | ||
id: deploy-aks | ||
uses: Azure/k8s-deploy@v4 | ||
with: | ||
namespace: "rap" | ||
manifests: | | ||
deployment/resources/rap-deployment.yaml | ||
images: | | ||
${{ secrets.DOCKERHUB_USERNAME }}/rap:${{ github.sha }} |
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,30 +1,41 @@ | ||
name: CICD Pipeline | ||
name: CI/CD Pipeline | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- "feature/**" | ||
- "issue/**" | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
|
||
jobs: | ||
|
||
Local: | ||
if: startsWith(github.ref_name, 'feature/') | ||
uses: ./.github/workflows/Deploy_workflow.yml | ||
with: | ||
environment_name: 'Local${{ github.actor }}' | ||
environment_name: "Local${{ github.actor }}" | ||
secrets: inherit | ||
|
||
Development: | ||
if: github.ref_name == 'main' | ||
uses: ./.github/workflows/Deploy_workflow.yml | ||
with: | ||
environment_name: Development | ||
secrets: inherit | ||
|
||
Staging: | ||
if: github.ref_name == 'main' | ||
needs: Development | ||
uses: ./.github/workflows/Deploy_workflow.yml | ||
with: | ||
environment_name: Staging | ||
secrets: inherit | ||
|
||
Production: | ||
if: github.ref_name == 'main' | ||
needs: Staging | ||
uses: ./.github/workflows/Deploy_workflow.yml | ||
with: | ||
environment_name: Production | ||
secrets: inherit |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# CI/CD Pipeline | ||
|
||
To maintain the code and keep the RAP clusters updated a CI/CD pipeline was erected. | ||
It consists of two steps: Build and Deploy. | ||
|
||
## Build | ||
|
||
During this step the main branch is checked out and a docker image is composed. A new tag is generated and then this image is pushed to the DockerHub repository. | ||
|
||
## Deploy | ||
|
||
During this step a connection is made with the Azure account running RAP using Open ID Connect (OIDC). After a secure connection is made a new deployment is applied using the newly generated 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
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Failed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive
5a2d6c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Robot Results
Passed Tests
RAPLive