diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c3815408..787fa327 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,9 +1,7 @@ pool: vmImage: 'Ubuntu 16.04' -#Your build pipeline references a secret variable named ‘sp_username’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it secret. See https://go.microsoft.com/fwlink/?linkid=865972 -#Your build pipeline references a secret variable named ‘sp_password’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it secret. See https://go.microsoft.com/fwlink/?linkid=865972 -#Your build pipeline references a secret variable named ‘sp_tenantid’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it secret. See https://go.microsoft.com/fwlink/?linkid=865972 -#Your build pipeline references a secret variable named ‘subscription_id’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it secret. See https://go.microsoft.com/fwlink/?linkid=865972 + +container: dtzar/conda3mlops:latest variables: - group: AzureKeyVaultSecrets @@ -14,18 +12,6 @@ trigger: - develop steps: -- task: UsePythonVersion@0 - inputs: - versionSpec: '3.6' - architecture: 'x64' - -- task: Bash@3 - displayName: 'Install Requirements' - inputs: - targetType: filePath - filePath: 'environment_setup/install_requirements.sh' - workingDirectory: 'environment_setup' - - script: | az login --service-principal -u $(spidentity) -p $(spsecret) --tenant $(sptenant) diff --git a/environment_setup/Dockerfile b/environment_setup/Dockerfile new file mode 100644 index 00000000..d199b243 --- /dev/null +++ b/environment_setup/Dockerfile @@ -0,0 +1,7 @@ +FROM conda/miniconda3 + +COPY . /setup + +RUN ["apt", "update"] +RUN apt install gcc -y && pip install -r /setup/requirements.txt +RUN pip install azure-cli==2.0.65 && pip install --upgrade azureml-sdk[cli] \ No newline at end of file diff --git a/environment_setup/docker-image-pipeline.yml b/environment_setup/docker-image-pipeline.yml new file mode 100644 index 00000000..2ee943f1 --- /dev/null +++ b/environment_setup/docker-image-pipeline.yml @@ -0,0 +1,32 @@ +resources: +- repo: self + +queue: + name: Hosted Ubuntu 1604 + +trigger: + branches: + include: + - master + + paths: + include: + - environment_setup/* + +steps: + +- task: Docker@2 + displayName: Login to Docker Hub + inputs: + command: login + containerRegistry: msftDockerHub + +- task: Docker@2 + displayName: 'Build and push an image' + inputs: + command: buildAndPush + repository: dtzar/conda3mlops + buildContext: '$(Build.SourcesDirectory)/environment_setup' + tags: | + $(Build.BuildNumber) + latest \ No newline at end of file