-
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.
Modified workflows to trigger on push to master and tag
- Loading branch information
1 parent
eb9041a
commit 3fa128f
Showing
4 changed files
with
83 additions
and
8 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,59 @@ | ||
name: Create a release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
env: | ||
GQ_IMAGE_NAME: goqur-functions | ||
GQ_IMAGE_VERSION: latest | ||
|
||
jobs: | ||
publish: | ||
name: Dockerize and publish | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build image | ||
run: docker image build . --file Dockerfile --tag ${{ env.GQ_IMAGE_NAME }} | ||
|
||
- name: Log into the Github package registry | ||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin | ||
|
||
- name: Get the tag version | ||
id: get_tag_version | ||
run: | | ||
# Strip git ref prefix from version | ||
echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | ||
- name: Push image | ||
run: | | ||
IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/${{ env.GQ_IMAGE_NAME }} | ||
# Change all uppercase to lowercase | ||
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') | ||
# Read the tag version from a previous step | ||
VERSION=${{ steps.get_tag_version.outputs.VERSION }} | ||
echo 'Tag version' | ||
echo IMAGE_ID=$IMAGE_ID | ||
echo VERSION=$VERSION | ||
# Push to Github repository | ||
docker tag ${{ env.GQ_IMAGE_NAME }} $IMAGE_ID:$VERSION | ||
docker push $IMAGE_ID:$VERSION | ||
- name: Create Release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | ||
with: | ||
tag_name: ${{ steps.get_tag_version.outputs.VERSION }} | ||
release_name: Release ${{ steps.get_tag_version.outputs.VERSION }} | ||
bodyFile: "RELEASE.md" | ||
draft: false | ||
prerelease: true |
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 |
---|---|---|
|
@@ -37,15 +37,13 @@ The main search document is therefore `Ayah`. Please see [auran-ayahs.csv](auran | |
- Remember to disable the function app function to debug locally so it will not listen in the same blob storage | ||
- .NET5 is not supported in all bindings and definitely it does not work with duarable functions. This is a sample out-of-process function app that shows how to inject [https://github.com/Azure/azure-functions-dotnet-worker/tree/main/samples/FunctionApp](https://github.com/Azure/azure-functions-dotnet-worker/tree/main/samples/FunctionApp). Here is what the documentation says anout .NET 5 support: | ||
|
||
``` | ||
A .NET 5 function app runs in an isolated worker process. Instead of building a .NET library loaded by our host, you build a .NET console app that references a worker SDK. | ||
> A .NET 5 function app runs in an isolated worker process. Instead of building a .NET library loaded by our host, you build a .> NET console app that references a worker SDK. | ||
This brings immediate benefits: you have full control over the application’s startup and the dependencies it consumes. The new programming model also adds support for custom middleware which has been a frequently requested feature. | ||
> This brings immediate benefits: you have full control over the application’s startup and the dependencies it consumes. The new programming model also adds support for custom middleware which has been a frequently requested feature. | ||
While this isolated model for .NET brings the above benefits, it's worth worth noting there are some features you may have utilized in previous versions that aren't yet supported. | ||
> While this isolated model for .NET brings the above benefits, it's worth worth noting there are some features you may have utilized in previous versions that aren't yet supported. | ||
While the .NET isolated model supports most Azure Functions triggers and bindings, Durable Functions and rich types support are currently unavailable. Take a blob trigger for example, you are limited to passing blob content using data types that are supported in the out-of-process language worker model, which today are string, byte[] and POCO. You can still use Azure SDK types like CloudBlockBlob, you you'll need to instantiate the SDK in your function process. | ||
``` | ||
> While the .NET isolated model supports most Azure Functions triggers and bindings, Durable Functions and rich types support are currently unavailable. Take a blob trigger for example, you are limited to passing blob content using data types that are supported in the out-of-process language worker model, which today are string, byte[] and POCO. You can still use Azure SDK types like CloudBlockBlob, you you'll need to instantiate the SDK in your function process. | ||
## Microservices | ||
|
||
|
@@ -125,11 +123,23 @@ Pass all the settings as env variables to the local image: | |
docker container run -it -p 8080:80 -e SEARCH_SVC_ENDPOINT=https://your-svs.search.windows.net -e SEARCH_SVC_API_KEY=your-key -e AzureWebJobsAzureWebJobsStorage="DefaultEndpointsProtocol=https;AccountName=your-name;AccountKey=your-key;EndpointSuffix=core.windows.net" -e AzureWebJobsStorage="DefaultEndpointsProtocol=https;AccountName=your-name;AccountKey=your-key;EndpointSuffix=core.windows.net" goqur-functions | ||
``` | ||
|
||
Pass all the settings as env variables to the Docker hub image: | ||
Pass all the settings as env variables to the Docker Hub registry image: | ||
``` | ||
docker container run -it -p 8080:80 -e SEARCH_SVC_ENDPOINT=https://your-svs.search.windows.net -e SEARCH_SVC_API_KEY=your-key -e AzureWebJobsAzureWebJobsStorage="DefaultEndpointsProtocol=https;AccountName=your-name;AccountKey=your-key;EndpointSuffix=core.windows.net" -e AzureWebJobsStorage="DefaultEndpointsProtocol=https;AccountName=your-name;AccountKey=your-key;EndpointSuffix=core.windows.net" khaledhikmat/goqur-functions:latest | ||
``` | ||
|
||
Pass all the settings as env variables to the Docker Github Package registery image. To do so, you need to login using a PAT (Personal Access Token). Here is how: | ||
- Create a an access token that you can use from your github account | ||
- github -> settings-> Developer Settings -> tokens -> Personal access tokens | ||
- Make sure the token has Read and/or Write access to github registry | ||
- Then login to the registry: 1docker login docker.pkg.github.com --username <your_user_name> --password <generated_token_not_password>1 | ||
- Now pull/push to the registry should work | ||
|
||
``` | ||
docker login https://docker.pkg.github.com --username [email protected] --password ******** | ||
docker container run -it -p 8080:80 -e SEARCH_SVC_ENDPOINT=https://your-svs.search.windows.net -e SEARCH_SVC_API_KEY=your-key -e AzureWebJobsAzureWebJobsStorage="DefaultEndpointsProtocol=https;AccountName=your-name;AccountKey=your-key;EndpointSuffix=core.windows.net" -e AzureWebJobsStorage="DefaultEndpointsProtocol=https;AccountName=your-name;AccountKey=your-key;EndpointSuffix=core.windows.net" docker.pkg.github.com/khaledhikmat/goqur/goqur-functions:latest | ||
``` | ||
|
||
Deploy to the default namespace. Make sure to update the env variables in `deployment.yml` for your environment: | ||
``` | ||
kubectl apply -f k8s/functions/deployment.yml | ||
|
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,4 @@ | ||
This is an early alpha release that contains initial commits: | ||
- CSV Parsing and chunking to bootstrap Azure Functions | ||
- Parser and Indexer Azure Functions are more or less completed | ||
- Overall familiarity with Github Actions |