diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 000000000..42246ce5e --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,52 @@ +trigger: + branches: + include: + - "*" + +pool: build1 # build server azure agent + +resources: + containers: + - container: node + image: node:16 + +stages: +- stage: Test + displayName: Test + jobs: + - job: Test + timeoutInMinutes: 10 + container: node + displayName: 'Test' + steps: + - script: | + make install + displayName: Installing dependecies + - script: | + make lint + displayName: Linting + - script: | + make test_unit_codecov + displayName: Testing + +- stage: Docker + displayName: Docker build and push + jobs: + - job: docker_build_and_push + displayName: Building and pushing images + steps: + - task: Docker@2 + displayName: Login to ACR + inputs: + containerRegistry: 'bshrkmain.azurecr.io' + command: 'login' + + - script: | + DOCKER_BUILDKIT=1 docker build -t bshrkmain.azurecr.io/flyte/flyteconsole:latest . + docker tag bshrkmain.azurecr.io/flyte/flyteconsole:latest bshrkmain.azurecr.io/flyte/flyteconsole:${BUILD_SOURCEBRANCHNAME}-${BUILD_SOURCEVERSION:0:8} + displayName: "Building images" + + - script: | + docker push bshrkmain.azurecr.io/flyte/flyteconsole:latest + docker push bshrkmain.azurecr.io/flyte/flyteconsole:${BUILD_SOURCEBRANCHNAME}-${BUILD_SOURCEVERSION:0:8} + displayName: "Pushing images" \ No newline at end of file