Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/latest
Browse files Browse the repository at this point in the history
  • Loading branch information
timvanoostrom authored Jan 22, 2024
2 parents 9493244 + 1e04247 commit 3bc0d89
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 27 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,19 @@ Deze api levert de volgende data:

### Kenmerken
- De Bronsystemen zijn Focus (Soap Api) en Gpass (Json Api)
- Alle bronsystemen worden vergaard op basis van een BSN.
- Alle bronsystemen worden bevraagd op basis van een BSN.
- De output van de api is JSON formaat.
- De api is gemodelleerd op basis van OpenAPI 3.x specificatie.

### Development & testen
- Er is geen uitgebreide lokale set-up waarbij ontwikkeld kan worden op basis van een "draaiende" api. Dit zou gemaakt / geïmplementeerd moeten worden.
- Alle tests worden dichtbij de geteste functionaliteit opgeslagen. B.v `some_service.py` en wordt getest in `test_some_service.py`.

### CI/CD
- Bouwen en deployen van de api gebeurt in Jenkins en Openstack.
- De applicatie wordt opgebouwd en deployed via Docker.
- De applicatie wordt verpakt in een Docker container.
- Bouwen en deployen van de applicatie gebeurt in Github en Azure DevOps.

### Release to production
```
~ cd scripts
~ sh release.sh --minor [--major [--patch]]
```
38 changes: 25 additions & 13 deletions azure-pipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,21 @@ resources:
ref: refs/heads/pipeline-fe

parameters:
- name: pipelineAction
type: string
default: btd
values:
- btd
- updateAppSettings

- name: dtapName
type: string
default: t
values:
- t
- a
- p

- name: btdBuild
type: boolean
default: true
Expand All @@ -29,17 +44,6 @@ parameters:
- name: btdDeploy
type: boolean
default: true
- name: dtapName
type: string
default: none
values:
- none
- t
- a
- p
- name: updateAppSettings
type: boolean
default: false

variables:
- name: btdBuild
Expand All @@ -65,7 +69,7 @@ variables:
- name: dtapName
value: ${{ parameters.dtapName }}

- ${{ if contains(variables['Build.SourceBranchName'], 'production-release') }}:
- ${{ if and(contains(variables['Build.SourceBranchName'], 'production-release'), eq(parameters.pipelineAction, 'btd')) }}:
- name: dtapName
value: p
- name: btdBuild
Expand All @@ -75,6 +79,14 @@ variables:
- name: btdDeploy
value: true

- ${{ if eq(parameters.pipelineAction, 'updateAppSettings') }}:
- name: btdBuild
value: false
- name: btdTest
value: false
- name: btdDeploy
value: false

jobs:
- template: pipelines/jobs/apps/btd-koppel-api.yaml@MamsInfra
parameters:
Expand All @@ -83,5 +95,5 @@ jobs:
btdBuild: ${{ variables.btdBuild }}
btdTest: ${{ variables.btdTest }}
btdDeploy: ${{ variables.btdDeploy }}
updateAppSettings: ${{ parameters.updateAppSettings }}
pipelineAction: ${{ parameters.pipelineAction }}
aquaScan: ${{ eq(variables['Build.Reason'], 'PullRequest') }}
19 changes: 9 additions & 10 deletions release.sh → scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,17 @@ if [ $NEW_TAG == $NEW_TAG_D ]; then
exit 1
fi

echo "New tag $NEW_TAG"
echo "Pushing tag to origin"
RELEASE_BRANCH="${BRANCH}-v${NEW_TAG}" && \

git tag "$NEW_TAG" && \
git push origin "$NEW_TAG" && \
echo "Creating branch $RELEASE_BRANCH" && \
git branch -m "$RELEASE_BRANCH" && \

echo "Pushing tag to origin" && \
git branch -m "$BRANCH" && \
echo "New tag $NEW_TAG" && \
git tag -a "$NEW_TAG" -m "Production ${NEW_TAG}" && \

echo "Pushing $BRANCH" && \
git push origin --follow-tags "$BRANCH" && \
echo "Pushing branch $RELEASE_BRANCH" && \
git push origin --follow-tags "$RELEASE_BRANCH" && \

echo "Don't forget to merge to master and Approve the deploy to the production environment!"
echo "Don't forget to merge to main and Approve the deploy to the production environment!"

exit 0
exit 0
File renamed without changes.
File renamed without changes.

0 comments on commit 3bc0d89

Please sign in to comment.