diff --git a/.github/workflows/basket-api.yml b/.github/workflows/basket-api.yml new file mode 100644 index 000000000..a42f3fc1d --- /dev/null +++ b/.github/workflows/basket-api.yml @@ -0,0 +1,89 @@ +name: basket-api + +on: + push: + branches: + - main + - dev + + paths: + - src/BuildingBlocks/* + - src/Services/Basket/* + - .github/workflows/basket-api.yml + + pull_request: + branches: + - main + - dev +env: + SERVICE: basket-api + IMAGE: basket.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 }} + + 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 \ No newline at end of file diff --git a/.github/workflows/catalog-api.yml b/.github/workflows/catalog-api.yml new file mode 100644 index 000000000..922df9606 --- /dev/null +++ b/.github/workflows/catalog-api.yml @@ -0,0 +1,89 @@ +name: catalog-api + +on: + push: + branches: + - main + - dev + + paths: + - src/BuildingBlocks/* + - src/Services/Catalog/* + - .github/workflows/catalog-api.yml + + pull_request: + branches: + - main + - dev +env: + SERVICE: catalog-api + IMAGE: catalog.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 }} + + 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 \ No newline at end of file diff --git a/.github/workflows/identity-api.yml b/.github/workflows/identity-api.yml new file mode 100644 index 000000000..ba3228d7c --- /dev/null +++ b/.github/workflows/identity-api.yml @@ -0,0 +1,89 @@ +name: identity-api + +on: + push: + branches: + - main + - dev + + paths: + - src/BuildingBlocks/* + - src/Services/Identity/* + - .github/workflows/identity-api.yml + + pull_request: + branches: + - main + - dev +env: + SERVICE: identity-api + IMAGE: identity.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 }} + + 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 \ No newline at end of file diff --git a/.github/workflows/mobileshoppingagg.yml b/.github/workflows/mobileshoppingagg.yml new file mode 100644 index 000000000..809224e70 --- /dev/null +++ b/.github/workflows/mobileshoppingagg.yml @@ -0,0 +1,88 @@ +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 }} + + 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 \ No newline at end of file diff --git a/.github/workflows/ordering-api.yml b/.github/workflows/ordering-api.yml new file mode 100644 index 000000000..8fca094cd --- /dev/null +++ b/.github/workflows/ordering-api.yml @@ -0,0 +1,89 @@ +name: ordering-api + +on: + push: + branches: + - main + - dev + + paths: + - src/BuildingBlocks/* + - src/Services/Ordering/* + - .github/workflows/ordering-api.yml + + pull_request: + branches: + - main + - dev +env: + SERVICE: ordering-api + IMAGE: ordering.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 }} + + 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 \ 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..2b62faa82 --- /dev/null +++ b/.github/workflows/ordering-backgroundtasks.yml @@ -0,0 +1,89 @@ +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 }} + + 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 \ 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..b60b76b2e --- /dev/null +++ b/.github/workflows/ordering-signalrhub.yml @@ -0,0 +1,89 @@ +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 }} + + 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 \ 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..0ef5d31da --- /dev/null +++ b/.github/workflows/payment-api.yml @@ -0,0 +1,89 @@ +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 }} + + 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 \ 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..c0ad095fc --- /dev/null +++ b/.github/workflows/webhooks-api.yml @@ -0,0 +1,89 @@ +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 }} + + 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 \ 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..b7472d9aa --- /dev/null +++ b/.github/workflows/webhooks-client.yml @@ -0,0 +1,89 @@ +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 }} + + 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 \ No newline at end of file diff --git a/.github/workflows/webmvc.yml b/.github/workflows/webmvc.yml new file mode 100644 index 000000000..8f57642db --- /dev/null +++ b/.github/workflows/webmvc.yml @@ -0,0 +1,89 @@ +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 }} + + 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 \ No newline at end of file diff --git a/.github/workflows/webshoppingagg.yml b/.github/workflows/webshoppingagg.yml new file mode 100644 index 000000000..0129710cb --- /dev/null +++ b/.github/workflows/webshoppingagg.yml @@ -0,0 +1,88 @@ +name: webshoppingagg + +on: + push: + branches: + - main + - dev + + paths: + - src/ApiGateways/Web.Bff.Shopping/aggregator/* + - .github/workflows/webshoppingagg.yml + + pull_request: + branches: + - main + - dev +env: + SERVICE: webshoppingagg + IMAGE: webshoppingagg + +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 }} + + 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 \ No newline at end of file diff --git a/.github/workflows/webspa.yml b/.github/workflows/webspa.yml new file mode 100644 index 000000000..72e878d4f --- /dev/null +++ b/.github/workflows/webspa.yml @@ -0,0 +1,89 @@ +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 }} + + 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 \ No newline at end of file diff --git a/.github/workflows/webstatus.yml b/.github/workflows/webstatus.yml new file mode 100644 index 000000000..c615f292c --- /dev/null +++ b/.github/workflows/webstatus.yml @@ -0,0 +1,89 @@ +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 }} + + 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 \ No newline at end of file diff --git a/build/azure-devops/apigws/azure-pipelines.yml b/build/azure-devops/apigws/azure-pipelines.yml deleted file mode 100644 index f2399b341..000000000 --- a/build/azure-devops/apigws/azure-pipelines.yml +++ /dev/null @@ -1,32 +0,0 @@ -trigger: - branches: - include: - - master - - dev - paths: - include: - - src/ApiGateways/* - - build/azure-devops/buildimages.yml - - build/azure-devops/multiarch.yml - - build/azure-devops/apigws/* - - deploy/k8s/helm/apigwmm/* - - deploy/k8s/helm/apigwms/* - - deploy/k8s/helm/apigwwm/* - - deploy/k8s/helm/apigwws/* - exclude: - - src/ApiGateways/Mobile.Bff.Shopping/aggregator/* - - src/ApiGateways/Web.Bff.Shopping/aggregator/* -jobs: -- job: PublishCharts - condition: ne('$(Build.Reason)', 'PullRequest') - pool: - vmImage: 'ubuntu-16.04' - steps: - - task: CopyFiles@2 - inputs: - sourceFolder: $(Build.SourcesDirectory)/deploy/k8s/helm - targetFolder: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm - - task: PublishBuildArtifacts@1 - inputs: - pathtoPublish: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm - artifactName: helm diff --git a/build/azure-devops/basket-api/azure-pipelines.yml b/build/azure-devops/basket-api/azure-pipelines.yml deleted file mode 100644 index 8aa99a9be..000000000 --- a/build/azure-devops/basket-api/azure-pipelines.yml +++ /dev/null @@ -1,27 +0,0 @@ -variables: - registryEndpoint: eshop-registry -trigger: - branches: - include: - - master - - dev - paths: - include: - - src/BuildingBlocks/* - - src/Services/Basket/* - - build/azure-devops/buildimages.yml - - build/azure-devops/multiarch.yml - - build/azure-devops/basket-api/* - - deploy/k8s/helm/basket-api/* -jobs: -- template: ../buildimages.yaml - parameters: - services: basket-api - registryEndpoint: $(registryEndpoint) - helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm - helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm -- template: ../multiarch.yaml - parameters: - image: basket.api - branch: $(Build.SourceBranchName) - registryEndpoint: $(registryEndpoint) diff --git a/build/azure-devops/buildimages.yaml b/build/azure-devops/buildimages.yaml deleted file mode 100644 index 2e58cad21..000000000 --- a/build/azure-devops/buildimages.yaml +++ /dev/null @@ -1,94 +0,0 @@ -parameters: - services: '' - registryEndpoint: '' - helmfrom: '' - helmto: '' - -jobs: -- job: BuildContainersForPR_Linux - condition: eq('${{ variables['Build.Reason'] }}', 'PullRequest') - pool: - vmImage: 'ubuntu-16.04' - steps: - - bash: docker-compose -f src/docker-compose.yml build ${{ parameters.services }} - displayName: Compose build ${{ parameters.services }} - env: - TAG: ${{ variables['Build.SourceBranchName'] }} -- job: BuildContainersForPR_Windows - condition: False - # condition: eq('${{ variables['Build.Reason'] }}', 'PullRequest') - pool: - vmImage: 'windows-2019' - steps: - - bash: docker-compose f src/docker-compose.yml build ${{ parameters.services }} - displayName: Compose build ${{ parameters.services }} - env: - TAG: ${{ variables['Build.SourceBranchName'] }} - PLATFORM: win - NODE_IMAGE: stefanscherer/node-windows:10 -- job: BuildLinux - condition: ne('${{ variables['Build.Reason'] }}', 'PullRequest') - pool: - vmImage: 'ubuntu-16.04' - steps: - - task: DockerCompose@0 - displayName: Compose build ${{ parameters.services }} - inputs: - dockerComposeCommand: 'build ${{ parameters.services }}' - containerregistrytype: Container Registry - dockerRegistryEndpoint: ${{ parameters.registryEndpoint }} - dockerComposeFile: src/docker-compose.yml - qualifyImageNames: true - projectName: "" - dockerComposeFileArgs: | - TAG=${{ variables['Build.SourceBranchName'] }} - - task: DockerCompose@0 - displayName: Compose push ${{ parameters.images }} - inputs: - dockerComposeCommand: 'push ${{ parameters.services }}' - containerregistrytype: Container Registry - dockerRegistryEndpoint: ${{ parameters.registryEndpoint }} - dockerComposeFile: src/docker-compose.yml - qualifyImageNames: true - projectName: "" - dockerComposeFileArgs: | - TAG=${{ variables['Build.SourceBranchName'] }} - - task: CopyFiles@2 - inputs: - sourceFolder: ${{ parameters.helmfrom }} - targetFolder: ${{ parameters.helmto }} - - task: PublishBuildArtifacts@1 - inputs: - pathtoPublish: ${{ parameters.helmto }} - artifactName: helm -- job: BuildWindows - condition: False - # condition: ne('${{ variables['Build.Reason'] }}', 'PullRequest') - pool: - vmImage: 'windows-2019' - steps: - - task: DockerCompose@0 - displayName: Compose build ${{ parameters.services }} - inputs: - dockerComposeCommand: 'build ${{ parameters.services }}' - containerregistrytype: Container Registry - dockerRegistryEndpoint: ${{ parameters.registryEndpoint }} - dockerComposeFile: src/docker-compose.yml - qualifyImageNames: true - projectName: "" - dockerComposeFileArgs: | - TAG=${{ variables['Build.SourceBranchName'] }} - PLATFORM=win - NODE_IMAGE=stefanscherer/node-windows:10 - - task: DockerCompose@0 - displayName: Compose push ${{ parameters.services }} - inputs: - dockerComposeCommand: 'push ${{ parameters.services }}' - containerregistrytype: Container Registry - dockerRegistryEndpoint: ${{ parameters.registryEndpoint }} - dockerComposeFile: src/docker-compose.yml - qualifyImageNames: true - projectName: "" - dockerComposeFileArgs: | - TAG=${{ variables['Build.SourceBranchName'] }} - PLATFORM=win diff --git a/build/azure-devops/catalog-api/azure-pipelines.yml b/build/azure-devops/catalog-api/azure-pipelines.yml deleted file mode 100644 index b22146ec8..000000000 --- a/build/azure-devops/catalog-api/azure-pipelines.yml +++ /dev/null @@ -1,27 +0,0 @@ -variables: - registryEndpoint: eshop-registry -trigger: - branches: - include: - - master - - dev - paths: - include: - - src/BuildingBlocks/* - - src/Services/Catalog/* - - build/azure-devops/buildimages.yml - - build/azure-devops/multiarch.yml - - build/azure-devops/catalog-api/* - - deploy/k8s/helm/catalog-api/* -jobs: -- template: ../buildimages.yaml - parameters: - services: catalog-api - registryEndpoint: $(registryEndpoint) - helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm - helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm -- template: ../multiarch.yaml - parameters: - image: catalog.api - branch: $(Build.SourceBranchName) - registryEndpoint: $(registryEndpoint) diff --git a/build/azure-devops/identity-api/azure-pipelines.yml b/build/azure-devops/identity-api/azure-pipelines.yml deleted file mode 100644 index e3dc070b8..000000000 --- a/build/azure-devops/identity-api/azure-pipelines.yml +++ /dev/null @@ -1,27 +0,0 @@ -variables: - registryEndpoint: eshop-registry -trigger: - branches: - include: - - master - - dev - paths: - include: - - src/BuildingBlocks/* - - src/Services/Identity/* - - build/azure-devops/buildimages.yml - - build/azure-devops/multiarch.yml - - build/azure-devops/identity-api/* - - deploy/k8s/helm/identity-api/* -jobs: -- template: ../buildimages.yaml - parameters: - services: identity-api - registryEndpoint: $(registryEndpoint) - helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm - helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm -- template: ../multiarch.yaml - parameters: - image: identity.api - branch: $(Build.SourceBranchName) - registryEndpoint: $(registryEndpoint) diff --git a/build/azure-devops/infrastructure/azure-pipelines.yml b/build/azure-devops/infrastructure/azure-pipelines.yml deleted file mode 100644 index 214e56d37..000000000 --- a/build/azure-devops/infrastructure/azure-pipelines.yml +++ /dev/null @@ -1,28 +0,0 @@ -pool: - vmImage: 'ubuntu-16.04' -variables: - registryEndpoint: eshop-registry -trigger: - branches: - include: - - master - - dev - paths: - include: - - build/azure-devops/buildimages.yml - - build/azure-devops/multiarch.yml - - build/azure-devops/infrastructure/* - - deploy/k8s/helm/basket-data/* - - deploy/k8s/helm/keystore-data/* - - deploy/k8s/helm/nosql-data/* - - deploy/k8s/helm/rabbitmq/* - - deploy/k8s/helm/sql-data/* -steps: -- task: CopyFiles@2 - inputs: - sourceFolder: $(Build.SourcesDirectory)/deploy/k8s/helm - targetFolder: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm -- task: PublishBuildArtifacts@1 - inputs: - pathtoPublish: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm - artifactName: helm diff --git a/build/azure-devops/mobile-shopping-agg/azure-pipelines.yml b/build/azure-devops/mobile-shopping-agg/azure-pipelines.yml deleted file mode 100644 index 878f064b5..000000000 --- a/build/azure-devops/mobile-shopping-agg/azure-pipelines.yml +++ /dev/null @@ -1,27 +0,0 @@ -variables: - registryEndpoint: eshop-registry -trigger: - branches: - include: - - master - - dev - paths: - include: - - src/ApiGateways/Mobile.Bff.Shopping/aggregator/* - - build/azure-devops/buildimages.yml - - build/azure-devops/multiarch.yml - - build/azure-devops/mobile-shopping-agg/* - - deploy/k8s/helm/mobileshoppingagg/* -jobs: -- template: ../buildimages.yaml - parameters: - services: mobileshoppingagg - registryEndpoint: $(registryEndpoint) - helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm - helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm -- template: ../multiarch.yaml - parameters: - image: mobileshoppingagg - branch: $(Build.SourceBranchName) - registryEndpoint: $(registryEndpoint) - diff --git a/build/azure-devops/multiarch.yaml b/build/azure-devops/multiarch.yaml deleted file mode 100644 index 1639fff87..000000000 --- a/build/azure-devops/multiarch.yaml +++ /dev/null @@ -1,33 +0,0 @@ -parameters: - image: '' - branch: '' - registry: 'eshop' - registryEndpoint: '' - -jobs: -- job: manifest - condition: and(succeeded(),ne('${{ variables['Build.Reason'] }}', 'PullRequest')) - dependsOn: - # - BuildWindows - - BuildLinux - pool: - vmImage: 'Ubuntu 16.04' - steps: - - task: Docker@1 - displayName: Docker Login - inputs: - command: login - containerregistrytype: 'Container Registry' - dockerRegistryEndpoint: ${{ parameters.registryEndpoint }} - # Disabled windows deploy - # docker --config ~/.docker manifest create ${{ parameters.registry }}/${{ parameters.image }}:${{ parameters.branch }} ${{ parameters.registry }}/${{ parameters.image }}:linux-${{ parameters.branch }} ${{ parameters.registry }}/${{ parameters.image }}:win-${{ parameters.branch }} - # docker --config ~/.docker manifest create ${{ parameters.registry }}/${{ parameters.image }}:latest ${{ parameters.registry }}/${{ parameters.image }}:linux-latest ${{ parameters.registry }}/${{ parameters.image }}:win-latest - - bash: | - mkdir -p ~/.docker - sed '$ s/.$//' $DOCKER_CONFIG/config.json > ~/.docker/config.json - echo ',"experimental": "enabled" }' >> ~/.docker/config.json - docker --config ~/.docker manifest create ${{ parameters.registry }}/${{ parameters.image }}:${{ parameters.branch }} ${{ parameters.registry }}/${{ parameters.image }}:linux-${{ parameters.branch }} - docker --config ~/.docker manifest create ${{ parameters.registry }}/${{ parameters.image }}:latest ${{ parameters.registry }}/${{ parameters.image }}:linux-latest - docker --config ~/.docker manifest push ${{ parameters.registry }}/${{ parameters.image }}:${{ parameters.branch }} - docker --config ~/.docker manifest push ${{ parameters.registry }}/${{ parameters.image }}:latest - displayName: Create multiarch manifest diff --git a/build/azure-devops/ordering-api/azure-pipelines.yml b/build/azure-devops/ordering-api/azure-pipelines.yml deleted file mode 100644 index d11c4e270..000000000 --- a/build/azure-devops/ordering-api/azure-pipelines.yml +++ /dev/null @@ -1,29 +0,0 @@ -variables: - registryEndpoint: eshop-registry -trigger: - branches: - include: - - master - - dev - paths: - include: - - src/BuildingBlocks/* - - src/Services/Ordering/* - - build/azure-devops/buildimages.yml - - build/azure-devops/multiarch.yml - - build/azure-devops/ordering-api/* - - deploy/k8s/helm/ordering-api/* - - deploy/k8s/helm/ordering-backgroundtasks/* - - deploy/k8s/helm/ordering-signalrhub/* -jobs: -- template: ../buildimages.yaml - parameters: - services: ordering-api - registryEndpoint: $(registryEndpoint) - helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm - helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm -- template: ../multiarch.yaml - parameters: - image: ordering.api - branch: $(Build.SourceBranchName) - registryEndpoint: $(registryEndpoint) \ No newline at end of file diff --git a/build/azure-devops/payment-api/azure-pipelines.yml b/build/azure-devops/payment-api/azure-pipelines.yml deleted file mode 100644 index 6acdec6d3..000000000 --- a/build/azure-devops/payment-api/azure-pipelines.yml +++ /dev/null @@ -1,27 +0,0 @@ -variables: - registryEndpoint: eshop-registry -trigger: - branches: - include: - - master - - dev - paths: - include: - - src/BuildingBlocks/* - - src/Services/Payment/* - - build/azure-devops/buildimages.yml - - build/azure-devops/multiarch.yml - - build/azure-devops/payment-api/* - - deploy/k8s/helm/payment-api/* -jobs: -- template: ../buildimages.yaml - parameters: - services: payment-api - registryEndpoint: $(registryEndpoint) - helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm - helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm -- template: ../multiarch.yaml - parameters: - image: payment.api - branch: $(Build.SourceBranchName) - registryEndpoint: $(registryEndpoint) \ No newline at end of file diff --git a/build/azure-devops/readme.md b/build/azure-devops/readme.md deleted file mode 100644 index 03680be34..000000000 --- a/build/azure-devops/readme.md +++ /dev/null @@ -1,5 +0,0 @@ -# Azure DevOps build definitions - -This folder contains the Azure DevOps build definitions in YAML format. Each folder contains one `azure-pipelines.yml` that contains the build definition for one microservice (usually a Docker image, but some microservices generates more than one Docker image). - -For more information about YAML builds read the [Azure DevOps documentation](https://docs.microsoft.com/azure/devops/pipelines/get-started-yaml?view=azure-devops). \ No newline at end of file diff --git a/build/azure-devops/web-shopping-agg/azure-pipelines.yml b/build/azure-devops/web-shopping-agg/azure-pipelines.yml deleted file mode 100644 index 6537591cd..000000000 --- a/build/azure-devops/web-shopping-agg/azure-pipelines.yml +++ /dev/null @@ -1,26 +0,0 @@ -variables: - registryEndpoint: eshop-registry -trigger: - branches: - include: - - master - - dev - paths: - include: - - src/ApiGateways/Web.Bff.Shopping/aggregator/* - - build/azure-devops/buildimages.yml - - build/azure-devops/multiarch.yml - - build/azure-devops/web-shopping-agg/* - - deploy/k8s/helm/webshoppingagg/* -jobs: -- template: ../buildimages.yaml - parameters: - services: webshoppingagg - registryEndpoint: $(registryEndpoint) - helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm - helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm -- template: ../multiarch.yaml - parameters: - image: webshoppingagg - branch: $(Build.SourceBranchName) - registryEndpoint: $(registryEndpoint) \ No newline at end of file diff --git a/build/azure-devops/webhooks-api/azure-pipelines.yml b/build/azure-devops/webhooks-api/azure-pipelines.yml deleted file mode 100644 index d5e679c90..000000000 --- a/build/azure-devops/webhooks-api/azure-pipelines.yml +++ /dev/null @@ -1,27 +0,0 @@ -variables: - registryEndpoint: eshop-registry -trigger: - branches: - include: - - master - - dev - paths: - include: - - src/BuildingBlocks/* - - src/Services/Webhooks/* - - build/azure-devops/buildimages.yml - - build/azure-devops/multiarch.yml - - build/azure-devops/webhooks-api/* - - deploy/k8s/helm/webhooks-api/* -jobs: -- template: ../buildimages.yaml - parameters: - services: webhooks-api - registryEndpoint: $(registryEndpoint) - helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm - helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm -- template: ../multiarch.yaml - parameters: - image: webhooks.api - branch: $(Build.SourceBranchName) - registryEndpoint: $(registryEndpoint) \ No newline at end of file diff --git a/build/azure-devops/webhooks-client/azure-pipelines.yml b/build/azure-devops/webhooks-client/azure-pipelines.yml deleted file mode 100644 index f12a38487..000000000 --- a/build/azure-devops/webhooks-client/azure-pipelines.yml +++ /dev/null @@ -1,27 +0,0 @@ -variables: - registryEndpoint: eshop-registry -trigger: - branches: - include: - - master - - dev - paths: - include: - - src/BuildingBlocks/* - - src/Web/WebhookClient/* - - build/azure-devops/buildimages.yml - - build/azure-devops/multiarch.yml - - build/azure-devops/webhooks-client/* - - deploy/k8s/helm/webhooks-web/* -jobs: -- template: ../buildimages.yaml - parameters: - services: webhooks-client - registryEndpoint: $(registryEndpoint) - helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm - helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm -- template: ../multiarch.yaml - parameters: - image: webhooks.client - branch: $(Build.SourceBranchName) - registryEndpoint: $(registryEndpoint) diff --git a/build/azure-devops/webmvc/azure-pipelines.yml b/build/azure-devops/webmvc/azure-pipelines.yml deleted file mode 100644 index cd2fba59c..000000000 --- a/build/azure-devops/webmvc/azure-pipelines.yml +++ /dev/null @@ -1,27 +0,0 @@ -variables: - registryEndpoint: eshop-registry -trigger: - branches: - include: - - master - - dev - paths: - include: - - src/BuildingBlocks/* - - src/Web/WebMVC/* - - build/azure-devops/buildimages.yml - - build/azure-devops/multiarch.yml - - build/azure-devops/webmvc/* - - deploy/k8s/helm/webmvc/* -jobs: -- template: ../buildimages.yaml - parameters: - services: webmvc - registryEndpoint: $(registryEndpoint) - helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm - helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm -- template: ../multiarch.yaml - parameters: - image: webmvc - branch: $(Build.SourceBranchName) - registryEndpoint: $(registryEndpoint) \ No newline at end of file diff --git a/build/azure-devops/webspa/azure-pipelines.yml b/build/azure-devops/webspa/azure-pipelines.yml deleted file mode 100644 index aefced84a..000000000 --- a/build/azure-devops/webspa/azure-pipelines.yml +++ /dev/null @@ -1,27 +0,0 @@ -variables: - registryEndpoint: eshop-registry -trigger: - branches: - include: - - master - - dev - paths: - include: - - src/BuildingBlocks/* - - src/Web/WebSPA/* - - build/azure-devops/buildimages.yml - - build/azure-devops/multiarch.yml - - build/azure-devops/webspa/* - - deploy/k8s/helm/webspa/* -jobs: -- template: ../buildimages.yaml - parameters: - services: webspa - registryEndpoint: $(registryEndpoint) - helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm - helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm -- template: ../multiarch.yaml - parameters: - image: webspa - branch: $(Build.SourceBranchName) - registryEndpoint: $(registryEndpoint) \ No newline at end of file diff --git a/build/azure-devops/webstatus/azure-pipelines.yml b/build/azure-devops/webstatus/azure-pipelines.yml deleted file mode 100644 index eeb8c15a1..000000000 --- a/build/azure-devops/webstatus/azure-pipelines.yml +++ /dev/null @@ -1,27 +0,0 @@ -variables: - registryEndpoint: eshop-registry -trigger: - branches: - include: - - master - - dev - paths: - include: - - src/BuildingBlocks/* - - src/Web/WebStatus/* - - build/azure-devops/buildimages.yml - - build/azure-devops/multiarch.yml - - build/azure-devops/webstatus/* - - deploy/k8s/helm/webstatus/* -jobs: -- template: ../buildimages.yaml - parameters: - services: webstatus - registryEndpoint: $(registryEndpoint) - helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm - helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm -- template: ../multiarch.yaml - parameters: - image: webstatus - branch: $(Build.SourceBranchName) - registryEndpoint: $(registryEndpoint) \ No newline at end of file