Skip to content

Instantly share code, notes, and snippets.

variables:
- group: Artifacts
steps:
- task: Docker@1
displayName: 'Build an image'
inputs:
command: Build an image
azureSubscription: Devops
azureContainerRegistry: '{"loginServer":"xxx.azurecr.io", "id" : "/subscriptions/xxx/resourceGroups/xxx-DEV/providers/Microsoft.ContainerRegistry/registries/xxx"}'
dockerFile: src/Services/MyApi/Dockerfile
<?xml version='1.0' encoding='utf-8'?>
<configuration>
<packageSources>
<add key='XXX' value='$ARTIFACTS_ENDPOINT' />
</packageSources>
<packageSourceCredentials>
<XXX>
<add key='Username' value='$USER' />
<add key='ClearTextPassword' value='$ACCESS_TOKEN' />
</XXX>
@Jtorrecilla
Jtorrecilla / Dockerfile
Created April 9, 2019 20:39
DockerFile Azure ARtifacts Final
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2-stretch-slim AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM microsoft/dotnet:2.2-sdk AS build
ARG ARTIFACTS_ENDPOINT
ARG ACCESS_TOKEN
ARG USER
WORKDIR /src
error : Response status code does not indicate success: 401 (Unauthorized).
@Jtorrecilla
Jtorrecilla / azure-pipelines.yml
Created April 9, 2019 20:04
Initial Azure Pipeline
steps:
- task: Docker@1
displayName: 'Build an image'
inputs:
command: Build an image
azureSubscription: XXX
azureContainerRegistry: '{"loginServer":"xxx.azurecr.io", "id" : "/subscriptions/xxx/resourceGroups/xx-xxx-xxx-DEV/providers/Microsoft.ContainerRegistry/registries/xxx"}'
dockerFile: src/Services/MyApi/Dockerfile
imageName: $(Build.Repository.Name):$(Build.BuildId)
@Jtorrecilla
Jtorrecilla / Dockerfile
Created April 9, 2019 19:59
Initial Docker Azure Artifact
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2-stretch-slim AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM microsoft/dotnet:2.2-sdk AS build
WORKDIR /src
COPY / /src/Services/MyApi/
WORKDIR /src/Services/MyApi/MyApi.Api
RUN dotnet restore MyApi.csproj -nowarn:msb3202,nu1503
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"sites_ansiblewcf_name": {
"defaultValue": "ansiblewcf",
"type": "String"
},
"workflows_Sample2_name": {
"defaultValue": "Sample2",
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"workflows_Sample2_name": {
"defaultValue": "Sample2",
"type": "String"
},
"sites_webjob3f7739bb_name": {
"defaultValue": "webjob3f7739bb",
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"workflows_Sample2_name": {
"defaultValue": "Sample2",
"type": "String"
},
"sites_webjob3f7739bb_name": {
"defaultValue": "webjob3f7739bb",
@Jtorrecilla
Jtorrecilla / ans
Last active August 13, 2018 06:33
{
"appRoles": [],
"availableToOtherTenants": false,
"displayName": "TestFromAAAAAAAAAnsible",
"errorUrl": null,
"groupMembershipClaims": null,
"optionalClaims": null,
"acceptMappedClaims": null,
"homepage": "https://tokiotadev.com/testansible",
"informationalUrls": {