diff --git a/.github/workflows/mobileshoppingagg.yml b/.github/workflows/mobileshoppingagg.yml new file mode 100644 index 000000000..f57147120 --- /dev/null +++ b/.github/workflows/mobileshoppingagg.yml @@ -0,0 +1,140 @@ +name: mobileshoppingagg + +on: + push: + branches: + - main + - dev + + paths: + - src/ApiGateways/Mobile.Bff.Shopping/aggregator/* + - .github/workflows/mobileshoppingagg.yml + + pull_request: + branches: + - main + - dev +env: + SERVICE: mobileshoppingagg + IMAGE: mobileshoppingagg + +jobs: + + BuildContainersForPR_Linux: + runs-on: ubuntu-latest + if: ${{ github.event_name == 'pull_request' }} + steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master + + - name: Compose build ${{ env.SERVICE }} + run: sudo -E docker-compose build ${{ env.SERVICE }} + working-directory: ./src + shell: bash + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + BuildContainersForPR_Windows: + + runs-on: windows-2019 + if: ${{ false }} + # if: ${{ github.event_name == 'pull_request' }} + steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master + + - name: Compose build ${{ env.SERVICE }} + run: docker-compose build ${{ env.SERVICE }} + working-directory: ./src + shell: pwsh + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + BuildLinux: + runs-on: ubuntu-latest + if: ${{ github.event_name != 'pull_request' }} + steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master + + - name: Enable experimental features for the Docker daemon and CLI + run: | + echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json + mkdir -p ~/.docker + echo $'{\n "experimental": "enabled"\n}' | sudo tee ~/.docker/config.json + sudo service docker restart + docker version -f '{{.Client.Experimental}}' + docker version -f '{{.Server.Experimental}}' + + - name: Login to Container Registry + uses: docker/login-action@v1 + with: + registry: ${{ secrets.REGISTRY_HOST }} + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} + + - name: Set branch name as env variable + run: | + currentbranch=$(echo ${GITHUB_REF##*/}) + echo "running on $currentbranch" + echo "BRANCH=$currentbranch" >> $GITHUB_ENV + shell: bash + + - name: Compose build ${{ env.SERVICE }} + run: sudo -E docker-compose build ${{ env.SERVICE }} + working-directory: ./src + shell: bash + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + - name: Compose push ${{ env.SERVICE }} + run: sudo -E docker-compose push ${{ env.SERVICE }} + working-directory: ./src + shell: bash + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + - name: Create multiarch manifest + run: | + docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} + docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} + shell: bash + + BuildWindows: + runs-on: windows-2019 + if: ${{ false }} + # if: ${{ github.event_name != 'pull_request' }} + steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master + + - name: Login to Container Registry + uses: azure/docker-login@v1 + with: + login-server: ${{ env.REGISTRY_HOST }} + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} + + - name: Set branch name as env variable + shell: pwsh + run: echo "BRANCH=$($env:GITHUB_REF.replace('refs/heads/', ''))" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + + - name: Compose build ${{ env.SERVICE }} + run: docker-compose build ${{ env.SERVICE }} + working-directory: ./src + shell: pwsh + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + - name: Compose push ${{ env.SERVICE }} + run: docker-compose push ${{ env.SERVICE }}' + working-directory: ./src + shell: pwsh + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} \ No newline at end of file diff --git a/.github/workflows/ordering-backgroundtasks.yml b/.github/workflows/ordering-backgroundtasks.yml new file mode 100644 index 000000000..084234356 --- /dev/null +++ b/.github/workflows/ordering-backgroundtasks.yml @@ -0,0 +1,141 @@ +name: ordering-backgroundtasks + +on: + push: + branches: + - main + - dev + + paths: + - src/BuildingBlocks/* + - src/Services/Ordering/* + - .github/workflows/ordering-backgroundtasks.yml + + pull_request: + branches: + - main + - dev +env: + SERVICE: ordering-backgroundtasks + IMAGE: ordering.backgroundtasks + +jobs: + + BuildContainersForPR_Linux: + runs-on: ubuntu-latest + if: ${{ github.event_name == 'pull_request' }} + steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master + + - name: Compose build ${{ env.SERVICE }} + run: sudo -E docker-compose build ${{ env.SERVICE }} + working-directory: ./src + shell: bash + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + BuildContainersForPR_Windows: + + runs-on: windows-2019 + if: ${{ false }} + # if: ${{ github.event_name == 'pull_request' }} + steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master + + - name: Compose build ${{ env.SERVICE }} + run: docker-compose build ${{ env.SERVICE }} + working-directory: ./src + shell: pwsh + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + BuildLinux: + runs-on: ubuntu-latest + if: ${{ github.event_name != 'pull_request' }} + steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master + + - name: Enable experimental features for the Docker daemon and CLI + run: | + echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json + mkdir -p ~/.docker + echo $'{\n "experimental": "enabled"\n}' | sudo tee ~/.docker/config.json + sudo service docker restart + docker version -f '{{.Client.Experimental}}' + docker version -f '{{.Server.Experimental}}' + + - name: Login to Container Registry + uses: docker/login-action@v1 + with: + registry: ${{ secrets.REGISTRY_HOST }} + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} + + - name: Set branch name as env variable + run: | + currentbranch=$(echo ${GITHUB_REF##*/}) + echo "running on $currentbranch" + echo "BRANCH=$currentbranch" >> $GITHUB_ENV + shell: bash + + - name: Compose build ${{ env.SERVICE }} + run: sudo -E docker-compose build ${{ env.SERVICE }} + working-directory: ./src + shell: bash + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + - name: Compose push ${{ env.SERVICE }} + run: sudo -E docker-compose push ${{ env.SERVICE }} + working-directory: ./src + shell: bash + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + - name: Create multiarch manifest + run: | + docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} + docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} + shell: bash + + BuildWindows: + runs-on: windows-2019 + if: ${{ false }} + # if: ${{ github.event_name != 'pull_request' }} + steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master + + - name: Login to Container Registry + uses: azure/docker-login@v1 + with: + login-server: ${{ env.REGISTRY_HOST }} + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} + + - name: Set branch name as env variable + shell: pwsh + run: echo "BRANCH=$($env:GITHUB_REF.replace('refs/heads/', ''))" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + + - name: Compose build ${{ env.SERVICE }} + run: docker-compose build ${{ env.SERVICE }} + working-directory: ./src + shell: pwsh + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + - name: Compose push ${{ env.SERVICE }} + run: docker-compose push ${{ env.SERVICE }}' + working-directory: ./src + shell: pwsh + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} \ No newline at end of file diff --git a/.github/workflows/ordering-signalrhub.yml b/.github/workflows/ordering-signalrhub.yml new file mode 100644 index 000000000..ab44e1746 --- /dev/null +++ b/.github/workflows/ordering-signalrhub.yml @@ -0,0 +1,141 @@ +name: ordering-signalrhub + +on: + push: + branches: + - main + - dev + + paths: + - src/BuildingBlocks/* + - src/Services/Ordering/* + - .github/workflows/ordering-signalrhub.yml + + pull_request: + branches: + - main + - dev +env: + SERVICE: ordering-signalrhub + IMAGE: ordering.signalrhub + +jobs: + + BuildContainersForPR_Linux: + runs-on: ubuntu-latest + if: ${{ github.event_name == 'pull_request' }} + steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master + + - name: Compose build ${{ env.SERVICE }} + run: sudo -E docker-compose build ${{ env.SERVICE }} + working-directory: ./src + shell: bash + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + BuildContainersForPR_Windows: + + runs-on: windows-2019 + if: ${{ false }} + # if: ${{ github.event_name == 'pull_request' }} + steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master + + - name: Compose build ${{ env.SERVICE }} + run: docker-compose build ${{ env.SERVICE }} + working-directory: ./src + shell: pwsh + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + BuildLinux: + runs-on: ubuntu-latest + if: ${{ github.event_name != 'pull_request' }} + steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master + + - name: Enable experimental features for the Docker daemon and CLI + run: | + echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json + mkdir -p ~/.docker + echo $'{\n "experimental": "enabled"\n}' | sudo tee ~/.docker/config.json + sudo service docker restart + docker version -f '{{.Client.Experimental}}' + docker version -f '{{.Server.Experimental}}' + + - name: Login to Container Registry + uses: docker/login-action@v1 + with: + registry: ${{ secrets.REGISTRY_HOST }} + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} + + - name: Set branch name as env variable + run: | + currentbranch=$(echo ${GITHUB_REF##*/}) + echo "running on $currentbranch" + echo "BRANCH=$currentbranch" >> $GITHUB_ENV + shell: bash + + - name: Compose build ${{ env.SERVICE }} + run: sudo -E docker-compose build ${{ env.SERVICE }} + working-directory: ./src + shell: bash + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + - name: Compose push ${{ env.SERVICE }} + run: sudo -E docker-compose push ${{ env.SERVICE }} + working-directory: ./src + shell: bash + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + - name: Create multiarch manifest + run: | + docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} + docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} + shell: bash + + BuildWindows: + runs-on: windows-2019 + if: ${{ false }} + # if: ${{ github.event_name != 'pull_request' }} + steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master + + - name: Login to Container Registry + uses: azure/docker-login@v1 + with: + login-server: ${{ env.REGISTRY_HOST }} + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} + + - name: Set branch name as env variable + shell: pwsh + run: echo "BRANCH=$($env:GITHUB_REF.replace('refs/heads/', ''))" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + + - name: Compose build ${{ env.SERVICE }} + run: docker-compose build ${{ env.SERVICE }} + working-directory: ./src + shell: pwsh + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + - name: Compose push ${{ env.SERVICE }} + run: docker-compose push ${{ env.SERVICE }}' + working-directory: ./src + shell: pwsh + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} \ No newline at end of file diff --git a/.github/workflows/payment-api.yml b/.github/workflows/payment-api.yml new file mode 100644 index 000000000..37a4b433c --- /dev/null +++ b/.github/workflows/payment-api.yml @@ -0,0 +1,141 @@ +name: payment-api + +on: + push: + branches: + - main + - dev + + paths: + - src/BuildingBlocks/* + - src/Services/Payment/* + - .github/workflows/payment-api.yml + + pull_request: + branches: + - main + - dev +env: + SERVICE: payment-api + IMAGE: payment.api + +jobs: + + BuildContainersForPR_Linux: + runs-on: ubuntu-latest + if: ${{ github.event_name == 'pull_request' }} + steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master + + - name: Compose build ${{ env.SERVICE }} + run: sudo -E docker-compose build ${{ env.SERVICE }} + working-directory: ./src + shell: bash + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + BuildContainersForPR_Windows: + + runs-on: windows-2019 + if: ${{ false }} + # if: ${{ github.event_name == 'pull_request' }} + steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master + + - name: Compose build ${{ env.SERVICE }} + run: docker-compose build ${{ env.SERVICE }} + working-directory: ./src + shell: pwsh + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + BuildLinux: + runs-on: ubuntu-latest + if: ${{ github.event_name != 'pull_request' }} + steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master + + - name: Enable experimental features for the Docker daemon and CLI + run: | + echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json + mkdir -p ~/.docker + echo $'{\n "experimental": "enabled"\n}' | sudo tee ~/.docker/config.json + sudo service docker restart + docker version -f '{{.Client.Experimental}}' + docker version -f '{{.Server.Experimental}}' + + - name: Login to Container Registry + uses: docker/login-action@v1 + with: + registry: ${{ secrets.REGISTRY_HOST }} + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} + + - name: Set branch name as env variable + run: | + currentbranch=$(echo ${GITHUB_REF##*/}) + echo "running on $currentbranch" + echo "BRANCH=$currentbranch" >> $GITHUB_ENV + shell: bash + + - name: Compose build ${{ env.SERVICE }} + run: sudo -E docker-compose build ${{ env.SERVICE }} + working-directory: ./src + shell: bash + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + - name: Compose push ${{ env.SERVICE }} + run: sudo -E docker-compose push ${{ env.SERVICE }} + working-directory: ./src + shell: bash + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + - name: Create multiarch manifest + run: | + docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} + docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} + shell: bash + + BuildWindows: + runs-on: windows-2019 + if: ${{ false }} + # if: ${{ github.event_name != 'pull_request' }} + steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master + + - name: Login to Container Registry + uses: azure/docker-login@v1 + with: + login-server: ${{ env.REGISTRY_HOST }} + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} + + - name: Set branch name as env variable + shell: pwsh + run: echo "BRANCH=$($env:GITHUB_REF.replace('refs/heads/', ''))" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + + - name: Compose build ${{ env.SERVICE }} + run: docker-compose build ${{ env.SERVICE }} + working-directory: ./src + shell: pwsh + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + - name: Compose push ${{ env.SERVICE }} + run: docker-compose push ${{ env.SERVICE }}' + working-directory: ./src + shell: pwsh + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} \ No newline at end of file diff --git a/.github/workflows/webhooks-api.yml b/.github/workflows/webhooks-api.yml new file mode 100644 index 000000000..1d28a1fea --- /dev/null +++ b/.github/workflows/webhooks-api.yml @@ -0,0 +1,141 @@ +name: webhooks-api + +on: + push: + branches: + - main + - dev + + paths: + - src/BuildingBlocks/* + - src/Services/Webhooks/* + - .github/workflows/webhooks-api.yml + + pull_request: + branches: + - main + - dev +env: + SERVICE: webhooks-api + IMAGE: webhooks.api + +jobs: + + BuildContainersForPR_Linux: + runs-on: ubuntu-latest + if: ${{ github.event_name == 'pull_request' }} + steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master + + - name: Compose build ${{ env.SERVICE }} + run: sudo -E docker-compose build ${{ env.SERVICE }} + working-directory: ./src + shell: bash + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + BuildContainersForPR_Windows: + + runs-on: windows-2019 + if: ${{ false }} + # if: ${{ github.event_name == 'pull_request' }} + steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master + + - name: Compose build ${{ env.SERVICE }} + run: docker-compose build ${{ env.SERVICE }} + working-directory: ./src + shell: pwsh + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + BuildLinux: + runs-on: ubuntu-latest + if: ${{ github.event_name != 'pull_request' }} + steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master + + - name: Enable experimental features for the Docker daemon and CLI + run: | + echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json + mkdir -p ~/.docker + echo $'{\n "experimental": "enabled"\n}' | sudo tee ~/.docker/config.json + sudo service docker restart + docker version -f '{{.Client.Experimental}}' + docker version -f '{{.Server.Experimental}}' + + - name: Login to Container Registry + uses: docker/login-action@v1 + with: + registry: ${{ secrets.REGISTRY_HOST }} + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} + + - name: Set branch name as env variable + run: | + currentbranch=$(echo ${GITHUB_REF##*/}) + echo "running on $currentbranch" + echo "BRANCH=$currentbranch" >> $GITHUB_ENV + shell: bash + + - name: Compose build ${{ env.SERVICE }} + run: sudo -E docker-compose build ${{ env.SERVICE }} + working-directory: ./src + shell: bash + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + - name: Compose push ${{ env.SERVICE }} + run: sudo -E docker-compose push ${{ env.SERVICE }} + working-directory: ./src + shell: bash + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + - name: Create multiarch manifest + run: | + docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} + docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} + shell: bash + + BuildWindows: + runs-on: windows-2019 + if: ${{ false }} + # if: ${{ github.event_name != 'pull_request' }} + steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master + + - name: Login to Container Registry + uses: azure/docker-login@v1 + with: + login-server: ${{ env.REGISTRY_HOST }} + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} + + - name: Set branch name as env variable + shell: pwsh + run: echo "BRANCH=$($env:GITHUB_REF.replace('refs/heads/', ''))" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + + - name: Compose build ${{ env.SERVICE }} + run: docker-compose build ${{ env.SERVICE }} + working-directory: ./src + shell: pwsh + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + - name: Compose push ${{ env.SERVICE }} + run: docker-compose push ${{ env.SERVICE }}' + working-directory: ./src + shell: pwsh + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} \ No newline at end of file diff --git a/.github/workflows/webhooks-client.yml b/.github/workflows/webhooks-client.yml new file mode 100644 index 000000000..e199f5159 --- /dev/null +++ b/.github/workflows/webhooks-client.yml @@ -0,0 +1,141 @@ +name: webhooks-client + +on: + push: + branches: + - main + - dev + + paths: + - src/BuildingBlocks/* + - src/Web/WebhookClient/* + - .github/workflows/webhooks-client.yml + + pull_request: + branches: + - main + - dev +env: + SERVICE: webhooks-client + IMAGE: webhooks.client + +jobs: + + BuildContainersForPR_Linux: + runs-on: ubuntu-latest + if: ${{ github.event_name == 'pull_request' }} + steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master + + - name: Compose build ${{ env.SERVICE }} + run: sudo -E docker-compose build ${{ env.SERVICE }} + working-directory: ./src + shell: bash + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + BuildContainersForPR_Windows: + + runs-on: windows-2019 + if: ${{ false }} + # if: ${{ github.event_name == 'pull_request' }} + steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master + + - name: Compose build ${{ env.SERVICE }} + run: docker-compose build ${{ env.SERVICE }} + working-directory: ./src + shell: pwsh + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + BuildLinux: + runs-on: ubuntu-latest + if: ${{ github.event_name != 'pull_request' }} + steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master + + - name: Enable experimental features for the Docker daemon and CLI + run: | + echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json + mkdir -p ~/.docker + echo $'{\n "experimental": "enabled"\n}' | sudo tee ~/.docker/config.json + sudo service docker restart + docker version -f '{{.Client.Experimental}}' + docker version -f '{{.Server.Experimental}}' + + - name: Login to Container Registry + uses: docker/login-action@v1 + with: + registry: ${{ secrets.REGISTRY_HOST }} + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} + + - name: Set branch name as env variable + run: | + currentbranch=$(echo ${GITHUB_REF##*/}) + echo "running on $currentbranch" + echo "BRANCH=$currentbranch" >> $GITHUB_ENV + shell: bash + + - name: Compose build ${{ env.SERVICE }} + run: sudo -E docker-compose build ${{ env.SERVICE }} + working-directory: ./src + shell: bash + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + - name: Compose push ${{ env.SERVICE }} + run: sudo -E docker-compose push ${{ env.SERVICE }} + working-directory: ./src + shell: bash + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + - name: Create multiarch manifest + run: | + docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} + docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} + shell: bash + + BuildWindows: + runs-on: windows-2019 + if: ${{ false }} + # if: ${{ github.event_name != 'pull_request' }} + steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master + + - name: Login to Container Registry + uses: azure/docker-login@v1 + with: + login-server: ${{ env.REGISTRY_HOST }} + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} + + - name: Set branch name as env variable + shell: pwsh + run: echo "BRANCH=$($env:GITHUB_REF.replace('refs/heads/', ''))" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + + - name: Compose build ${{ env.SERVICE }} + run: docker-compose build ${{ env.SERVICE }} + working-directory: ./src + shell: pwsh + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + - name: Compose push ${{ env.SERVICE }} + run: docker-compose push ${{ env.SERVICE }}' + working-directory: ./src + shell: pwsh + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} \ No newline at end of file diff --git a/.github/workflows/webmvc.yml b/.github/workflows/webmvc.yml new file mode 100644 index 000000000..a130f2983 --- /dev/null +++ b/.github/workflows/webmvc.yml @@ -0,0 +1,141 @@ +name: webmvc + +on: + push: + branches: + - main + - dev + + paths: + - src/BuildingBlocks/* + - src/Web/WebMVC/* + - .github/workflows/webmvc.yml + + pull_request: + branches: + - main + - dev +env: + SERVICE: webmvc + IMAGE: webmvc + +jobs: + + BuildContainersForPR_Linux: + runs-on: ubuntu-latest + if: ${{ github.event_name == 'pull_request' }} + steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master + + - name: Compose build ${{ env.SERVICE }} + run: sudo -E docker-compose build ${{ env.SERVICE }} + working-directory: ./src + shell: bash + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + BuildContainersForPR_Windows: + + runs-on: windows-2019 + if: ${{ false }} + # if: ${{ github.event_name == 'pull_request' }} + steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master + + - name: Compose build ${{ env.SERVICE }} + run: docker-compose build ${{ env.SERVICE }} + working-directory: ./src + shell: pwsh + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + BuildLinux: + runs-on: ubuntu-latest + if: ${{ github.event_name != 'pull_request' }} + steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master + + - name: Enable experimental features for the Docker daemon and CLI + run: | + echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json + mkdir -p ~/.docker + echo $'{\n "experimental": "enabled"\n}' | sudo tee ~/.docker/config.json + sudo service docker restart + docker version -f '{{.Client.Experimental}}' + docker version -f '{{.Server.Experimental}}' + + - name: Login to Container Registry + uses: docker/login-action@v1 + with: + registry: ${{ secrets.REGISTRY_HOST }} + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} + + - name: Set branch name as env variable + run: | + currentbranch=$(echo ${GITHUB_REF##*/}) + echo "running on $currentbranch" + echo "BRANCH=$currentbranch" >> $GITHUB_ENV + shell: bash + + - name: Compose build ${{ env.SERVICE }} + run: sudo -E docker-compose build ${{ env.SERVICE }} + working-directory: ./src + shell: bash + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + - name: Compose push ${{ env.SERVICE }} + run: sudo -E docker-compose push ${{ env.SERVICE }} + working-directory: ./src + shell: bash + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + - name: Create multiarch manifest + run: | + docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} + docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} + shell: bash + + BuildWindows: + runs-on: windows-2019 + if: ${{ false }} + # if: ${{ github.event_name != 'pull_request' }} + steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master + + - name: Login to Container Registry + uses: azure/docker-login@v1 + with: + login-server: ${{ env.REGISTRY_HOST }} + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} + + - name: Set branch name as env variable + shell: pwsh + run: echo "BRANCH=$($env:GITHUB_REF.replace('refs/heads/', ''))" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + + - name: Compose build ${{ env.SERVICE }} + run: docker-compose build ${{ env.SERVICE }} + working-directory: ./src + shell: pwsh + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + - name: Compose push ${{ env.SERVICE }} + run: docker-compose push ${{ env.SERVICE }}' + working-directory: ./src + shell: pwsh + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} \ No newline at end of file diff --git a/.github/workflows/webspa.yml b/.github/workflows/webspa.yml new file mode 100644 index 000000000..4723ef5cf --- /dev/null +++ b/.github/workflows/webspa.yml @@ -0,0 +1,141 @@ +name: webspa + +on: + push: + branches: + - main + - dev + + paths: + - src/BuildingBlocks/* + - src/Web/WebSPA/* + - .github/workflows/webspa.yml + + pull_request: + branches: + - main + - dev +env: + SERVICE: webspa + IMAGE: webspa + +jobs: + + BuildContainersForPR_Linux: + runs-on: ubuntu-latest + if: ${{ github.event_name == 'pull_request' }} + steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master + + - name: Compose build ${{ env.SERVICE }} + run: sudo -E docker-compose build ${{ env.SERVICE }} + working-directory: ./src + shell: bash + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + BuildContainersForPR_Windows: + + runs-on: windows-2019 + if: ${{ false }} + # if: ${{ github.event_name == 'pull_request' }} + steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master + + - name: Compose build ${{ env.SERVICE }} + run: docker-compose build ${{ env.SERVICE }} + working-directory: ./src + shell: pwsh + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + BuildLinux: + runs-on: ubuntu-latest + if: ${{ github.event_name != 'pull_request' }} + steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master + + - name: Enable experimental features for the Docker daemon and CLI + run: | + echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json + mkdir -p ~/.docker + echo $'{\n "experimental": "enabled"\n}' | sudo tee ~/.docker/config.json + sudo service docker restart + docker version -f '{{.Client.Experimental}}' + docker version -f '{{.Server.Experimental}}' + + - name: Login to Container Registry + uses: docker/login-action@v1 + with: + registry: ${{ secrets.REGISTRY_HOST }} + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} + + - name: Set branch name as env variable + run: | + currentbranch=$(echo ${GITHUB_REF##*/}) + echo "running on $currentbranch" + echo "BRANCH=$currentbranch" >> $GITHUB_ENV + shell: bash + + - name: Compose build ${{ env.SERVICE }} + run: sudo -E docker-compose build ${{ env.SERVICE }} + working-directory: ./src + shell: bash + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + - name: Compose push ${{ env.SERVICE }} + run: sudo -E docker-compose push ${{ env.SERVICE }} + working-directory: ./src + shell: bash + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + - name: Create multiarch manifest + run: | + docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} + docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} + shell: bash + + BuildWindows: + runs-on: windows-2019 + if: ${{ false }} + # if: ${{ github.event_name != 'pull_request' }} + steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master + + - name: Login to Container Registry + uses: azure/docker-login@v1 + with: + login-server: ${{ env.REGISTRY_HOST }} + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} + + - name: Set branch name as env variable + shell: pwsh + run: echo "BRANCH=$($env:GITHUB_REF.replace('refs/heads/', ''))" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + + - name: Compose build ${{ env.SERVICE }} + run: docker-compose build ${{ env.SERVICE }} + working-directory: ./src + shell: pwsh + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + - name: Compose push ${{ env.SERVICE }} + run: docker-compose push ${{ env.SERVICE }}' + working-directory: ./src + shell: pwsh + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} \ No newline at end of file diff --git a/.github/workflows/webstatus.yml b/.github/workflows/webstatus.yml new file mode 100644 index 000000000..644b57cc8 --- /dev/null +++ b/.github/workflows/webstatus.yml @@ -0,0 +1,141 @@ +name: webstatus + +on: + push: + branches: + - main + - dev + + paths: + - src/BuildingBlocks/* + - src/Web/WebStatus/* + - .github/workflows/webstatus.yml + + pull_request: + branches: + - main + - dev +env: + SERVICE: webstatus + IMAGE: webstatus + +jobs: + + BuildContainersForPR_Linux: + runs-on: ubuntu-latest + if: ${{ github.event_name == 'pull_request' }} + steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master + + - name: Compose build ${{ env.SERVICE }} + run: sudo -E docker-compose build ${{ env.SERVICE }} + working-directory: ./src + shell: bash + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + BuildContainersForPR_Windows: + + runs-on: windows-2019 + if: ${{ false }} + # if: ${{ github.event_name == 'pull_request' }} + steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master + + - name: Compose build ${{ env.SERVICE }} + run: docker-compose build ${{ env.SERVICE }} + working-directory: ./src + shell: pwsh + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + BuildLinux: + runs-on: ubuntu-latest + if: ${{ github.event_name != 'pull_request' }} + steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master + + - name: Enable experimental features for the Docker daemon and CLI + run: | + echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json + mkdir -p ~/.docker + echo $'{\n "experimental": "enabled"\n}' | sudo tee ~/.docker/config.json + sudo service docker restart + docker version -f '{{.Client.Experimental}}' + docker version -f '{{.Server.Experimental}}' + + - name: Login to Container Registry + uses: docker/login-action@v1 + with: + registry: ${{ secrets.REGISTRY_HOST }} + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} + + - name: Set branch name as env variable + run: | + currentbranch=$(echo ${GITHUB_REF##*/}) + echo "running on $currentbranch" + echo "BRANCH=$currentbranch" >> $GITHUB_ENV + shell: bash + + - name: Compose build ${{ env.SERVICE }} + run: sudo -E docker-compose build ${{ env.SERVICE }} + working-directory: ./src + shell: bash + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + - name: Compose push ${{ env.SERVICE }} + run: sudo -E docker-compose push ${{ env.SERVICE }} + working-directory: ./src + shell: bash + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + - name: Create multiarch manifest + run: | + docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} + docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} + shell: bash + + BuildWindows: + runs-on: windows-2019 + if: ${{ false }} + # if: ${{ github.event_name != 'pull_request' }} + steps: + - name: 'Checkout Github Action' + uses: actions/checkout@master + + - name: Login to Container Registry + uses: azure/docker-login@v1 + with: + login-server: ${{ env.REGISTRY_HOST }} + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} + + - name: Set branch name as env variable + shell: pwsh + run: echo "BRANCH=$($env:GITHUB_REF.replace('refs/heads/', ''))" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + + - name: Compose build ${{ env.SERVICE }} + run: docker-compose build ${{ env.SERVICE }} + working-directory: ./src + shell: pwsh + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} + + - name: Compose push ${{ env.SERVICE }} + run: docker-compose push ${{ env.SERVICE }}' + working-directory: ./src + shell: pwsh + env: + TAG: ${{ env.BRANCH }} + REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} \ No newline at end of file