Skip to content

Commit 0621e6d

Browse files
Pipeline + config
1 parent 588cc7e commit 0621e6d

9 files changed

+301
-6
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
name: Bug report
33
about: Create a report to help us improve
4-
title: ''
5-
labels: ''
4+
title: "BUG: "
5+
labels: "bug, ai, genai, virtual contributor, virtual contributor ingest space"
66
assignees: ''
77

88
---

.github/ISSUE_TEMPLATE/epic.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: Epic
33
about: A theme of work that contain sub-tasks required to complete the larger goal / larger user-story
44
title: ''
5-
labels: ''
5+
labels: "epic, ai, genai, virtual contributor, virtual contributor ingest space"
66
assignees: ''
77

88
---

.github/ISSUE_TEMPLATE/feature_request.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: Feature request
33
about: Suggest an idea for this project
44
title: ''
5-
labels: ''
5+
labels: "enhancement, ai, genai, virtual contributor, virtual contributor ingest space"
66
assignees: ''
77

88
---

.github/ISSUE_TEMPLATE/user_story.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
name: User Story
3-
about: A valuable increment of functionality, testable by the users
3+
about: A valuable increment of functionality, testable by the users
44
title: ''
5-
labels: ''
5+
labels: "user story, ai, genai, virtual contributor, virtual contributor ingest space"
66
assignees: ''
77

88
---
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Build, Migrate & Deploy to Dev
2+
3+
on:
4+
push:
5+
branches: [develop]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: "Checkout GitHub Action"
12+
uses: actions/[email protected]
13+
14+
- name: "Login into ACR"
15+
uses: azure/[email protected]
16+
with:
17+
login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
18+
username: ${{ secrets.REGISTRY_USERNAME }}
19+
password: ${{ secrets.REGISTRY_PASSWORD }}
20+
21+
- name: "Build & Push image"
22+
run: |
23+
docker build -f Dockerfile . -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-virtual-contributor-ingest-space:${{ github.sha }} -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-virtual-contributor-ingest-space:latest
24+
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-virtual-contributor-ingest-space:${{ github.sha }}
25+
26+
deploy:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: "Checkout GitHub Action"
30+
uses: actions/[email protected]
31+
32+
- name: "Login via Azure CLI"
33+
uses: azure/[email protected]
34+
with:
35+
creds: ${{ secrets.AZURE_CRED_K8S_NEW }}
36+
37+
- uses: Azure/[email protected]
38+
with:
39+
cluster-name: ${{ secrets.CLUSTER_NAME }}
40+
resource-group: ${{ secrets.RESOURCE_GROUP_K8S }}
41+
42+
- uses: Azure/[email protected]
43+
with:
44+
container-registry-url: ${{ secrets.REGISTRY_LOGIN_SERVER }}
45+
container-registry-username: ${{ secrets.REGISTRY_USERNAME }}
46+
container-registry-password: ${{ secrets.REGISTRY_PASSWORD }}
47+
secret-name: alkemio-virtual-contributor-ingest-space-secret
48+
49+
- uses: azure/[email protected]
50+
with:
51+
version: "v1.22.0" # default is latest stable, fixing it to a compatible version
52+
id: install
53+
54+
- uses: Azure/[email protected]
55+
with:
56+
manifests: |
57+
manifests/25-virtual-contributor-ingest-space-deployment-dev.yml
58+
images: |
59+
${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-virtual-contributor-ingest-space:${{ github.sha }}
60+
imagepullsecrets: |
61+
alkemio-virtual-contributor-ingest-space-secret
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Build, Migrate & Deploy to Sandbox on Azure
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: "Checkout GitHub Action"
11+
uses: actions/[email protected]
12+
13+
- name: "Login into ACR"
14+
uses: azure/[email protected]
15+
with:
16+
login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
17+
username: ${{ secrets.REGISTRY_USERNAME }}
18+
password: ${{ secrets.REGISTRY_PASSWORD }}
19+
20+
- name: "Build & Push image"
21+
run: |
22+
docker build -f Dockerfile . -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-virtual-contributor-ingest-space:${{ github.sha }} -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-virtual-contributor-ingest-space:latest
23+
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-virtual-contributor-ingest-space:${{ github.sha }}
24+
deploy:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: "Checkout GitHub Action"
28+
uses: actions/[email protected]
29+
30+
- name: "Login via Azure CLI"
31+
uses: azure/[email protected]
32+
with:
33+
creds: ${{ secrets.AZURE_CRED_K8S_NEW }}
34+
35+
- uses: Azure/[email protected]
36+
with:
37+
cluster-name: k8s-sandbox
38+
resource-group: res-grp-k8s-sandbox
39+
40+
- uses: Azure/[email protected]
41+
with:
42+
container-registry-url: ${{ secrets.REGISTRY_LOGIN_SERVER }}
43+
container-registry-username: ${{ secrets.REGISTRY_USERNAME }}
44+
container-registry-password: ${{ secrets.REGISTRY_PASSWORD }}
45+
secret-name: alkemio-virtual-contributor-ingest-space-secret
46+
47+
- uses: azure/[email protected]
48+
with:
49+
version: "v1.22.0" # default is latest stable, fixing it to a compatible version
50+
id: install
51+
52+
- uses: Azure/[email protected]
53+
with:
54+
manifests: |
55+
manifests/25-genai-deployment-dev.yaml
56+
images: |
57+
${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-virtual-contributor-ingest-space:${{ github.sha }}
58+
imagepullsecrets: |
59+
alkemio-virtual-contributor-ingest-space-secret
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Build, Migrate & Deploy to Test on Azure
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: "Checkout GitHub Action"
11+
uses: actions/[email protected]
12+
13+
- name: "Login into ACR"
14+
uses: azure/[email protected]
15+
with:
16+
login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
17+
username: ${{ secrets.REGISTRY_USERNAME }}
18+
password: ${{ secrets.REGISTRY_PASSWORD }}
19+
20+
- name: "Build & Push image"
21+
run: |
22+
docker build -f Dockerfile . -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-virtual-contributor-ingest-space:${{ github.sha }} -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-virtual-contributor-ingest-space:latest
23+
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-virtual-contributor-ingest-space:${{ github.sha }}
24+
25+
deploy:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: "Checkout GitHub Action"
29+
uses: actions/[email protected]
30+
31+
- name: "Login via Azure CLI"
32+
uses: azure/[email protected]
33+
with:
34+
creds: ${{ secrets.AZURE_CRED_K8S_NEW }}
35+
36+
- uses: Azure/[email protected]
37+
with:
38+
cluster-name: k8s-test
39+
resource-group: res-grp-k8s-test
40+
41+
- uses: Azure/[email protected]
42+
with:
43+
container-registry-url: ${{ secrets.REGISTRY_LOGIN_SERVER }}
44+
container-registry-username: ${{ secrets.REGISTRY_USERNAME }}
45+
container-registry-password: ${{ secrets.REGISTRY_PASSWORD }}
46+
secret-name: alkemio-virtual-contributor-ingest-space-secret
47+
48+
- uses: azure/[email protected]
49+
with:
50+
version: "v1.22.0" # default is latest stable, fixing it to a compatible version
51+
id: install
52+
53+
- uses: Azure/[email protected]
54+
with:
55+
manifests: |
56+
manifests/25-genai-deployment-dev.yaml
57+
images: |
58+
${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-virtual-contributor-ingest-space:${{ github.sha }}
59+
imagepullsecrets: |
60+
alkemio-virtual-contributor-ingest-space-secret
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Deploy to DockerHub
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
docker:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/[email protected]
13+
- name: Prepare
14+
id: prep
15+
run: |
16+
DOCKER_IMAGE=alkemio/virtual-contributor-ingest-space
17+
VERSION=noop
18+
if [ "${{ github.event_name }}" = "schedule" ]; then
19+
VERSION=nightly
20+
elif [[ $GITHUB_REF == refs/tags/* ]]; then
21+
VERSION=${GITHUB_REF#refs/tags/}
22+
elif [[ $GITHUB_REF == refs/heads/* ]]; then
23+
VERSION=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's#/+#-#g')
24+
if [ "${{ github.event.repository.default_branch }}" = "$VERSION" ]; then
25+
VERSION=edge
26+
fi
27+
elif [[ $GITHUB_REF == refs/pull/* ]]; then
28+
VERSION=pr-${{ github.event.number }}
29+
fi
30+
TAGS="${DOCKER_IMAGE}:${VERSION}"
31+
if [[ $VERSION =~ ^v[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
32+
MINOR=${VERSION%.*}
33+
MAJOR=${MINOR%.*}
34+
TAGS="$TAGS,${DOCKER_IMAGE}:${MINOR},${DOCKER_IMAGE}:${MAJOR},${DOCKER_IMAGE}:latest"
35+
elif [ "${{ github.event_name }}" = "push" ]; then
36+
TAGS="$TAGS,${DOCKER_IMAGE}:sha-${GITHUB_SHA::8}"
37+
fi
38+
echo "version=${VERSION}" >> $GITHUB_OUTPUT
39+
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
40+
echo "created={$(date -u +'%Y-%m-%dT%H:%M:%SZ')}" >> $GITHUB_OUTPUT
41+
- name: Set up QEMU
42+
uses: docker/[email protected]
43+
- name: Set up Docker Buildx
44+
uses: docker/[email protected]
45+
- name: Login to DockerHub
46+
if: github.event_name != 'pull_request'
47+
uses: docker/login-action@v1
48+
with:
49+
username: ${{ secrets.DOCKERHUB_USERNAME }}
50+
password: ${{ secrets.DOCKERHUB_TOKEN }}
51+
- name: Build and push
52+
id: docker_build
53+
uses: docker/[email protected]
54+
with:
55+
context: .
56+
file: ./Dockerfile
57+
platforms: linux/amd64
58+
push: ${{ github.event_name != 'pull_request' }}
59+
tags: ${{ steps.prep.outputs.tags }}
60+
labels: |
61+
org.opencontainers.image.title=${{ github.event.repository.name }}
62+
org.opencontainers.image.description=${{ github.event.repository.description }}
63+
org.opencontainers.image.url=${{ github.event.repository.html_url }}
64+
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
65+
org.opencontainers.image.version=${{ steps.prep.outputs.version }}
66+
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
67+
org.opencontainers.image.revision=${{ github.sha }}
68+
org.opencontainers.image.licenses=${{ github.event.repository.license.spdx_id }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
kind: Deployment
2+
apiVersion: apps/v1
3+
metadata:
4+
namespace: default
5+
name: alkemio-virtual-contributor-ingest-space-deployment
6+
labels:
7+
app: alkemio-virtual-contributor-ingest-space
8+
9+
spec:
10+
replicas: 1
11+
selector:
12+
matchLabels:
13+
app: alkemio-virtual-contributor-ingest-space
14+
template:
15+
metadata:
16+
labels:
17+
app: alkemio-virtual-contributor-ingest-space
18+
spec:
19+
containers:
20+
- name: alkemio-virtual-contributor-ingest-space
21+
image: alkemio.azurecr.io/alkemio-virtual-contributor-ingest-space:latest
22+
env:
23+
- name: RABBITMQ_HOST
24+
valueFrom:
25+
secretKeyRef:
26+
name: alkemio-rabbitmq-cluster-default-user
27+
key: host
28+
- name: RABBITMQ_PORT
29+
valueFrom:
30+
secretKeyRef:
31+
name: alkemio-rabbitmq-cluster-default-user
32+
key: port
33+
- name: RABBITMQ_USER
34+
valueFrom:
35+
secretKeyRef:
36+
name: alkemio-rabbitmq-cluster-default-user
37+
key: username
38+
- name: RABBITMQ_PASSWORD
39+
valueFrom:
40+
secretKeyRef:
41+
name: alkemio-rabbitmq-cluster-default-user
42+
key: password
43+
envFrom:
44+
- secretRef:
45+
name: alkemio-secrets
46+
- configMapRef:
47+
name: alkemio-config

0 commit comments

Comments
 (0)