diff --git a/.pipelines/build/ob-prepare.steps.yaml b/.pipelines/build/ob-prepare.steps.yaml index bfd6f004b5..6072ab84b6 100644 --- a/.pipelines/build/ob-prepare.steps.yaml +++ b/.pipelines/build/ob-prepare.steps.yaml @@ -1,42 +1,5 @@ steps: -- template: utils/rename-dockerfile-references.steps.yaml - parameters: - topic: "Linux - ipv6-hp-bpf" - replace_references: true - source_path: bpf-prog/ipv6-hp-bpf - target_path: bpf-prog/ipv6-hp-bpf - source_dockerfile: linux.Dockerfile - -# - template: utils/rename-dockerfile-references.steps.yaml -# parameters: -# topic: "Windows - npm" -# replace_references: true -# working_directory: $(ACN_DIR) -# source_path: npm -# target_path: npm-windows -# source_dockerfile: windows.Dockerfile - -# - template: utils/rename-dockerfile-references.steps.yaml -# parameters: -# topic: "Linux - npm" -# replace_references: true -# working_directory: $(ACN_DIR) -# source_path: npm -# target_path: npm -# source_dockerfile: linux.Dockerfile - -- bash: | - rm -rf .hooks .github - displayName: "Remove Unnecessary Dirs from Source" - workingDirectory: $(Build.SourcesDirectory)/azure-container-networking - -- task: CopyFiles@2 - displayName: "Add Repo to Container Artifacts" - inputs: - sourceFolder: $(Build.SourcesDirectory)/azure-container-networking - targetFolder: $(Build.ArtifactStagingDirectory) - - script: | STORAGE_ID=$(echo "${BUILD_BUILDNUMBER//./-}") echo "##vso[task.setvariable variable=StorageID;isOutput=true]$STORAGE_ID" @@ -89,4 +52,24 @@ steps: name: "EnvironmentalVariables" displayName: "Set environmental variables" condition: always() + # Use dev version of Makefile for development version workingDirectory: $(ACN_DIR) + +- bash: | + rm -rf .hooks .github .pipelines .git + displayName: "Remove Unnecessary Dirs from Source" + workingDirectory: $(ACN_DIR) + +#- task: CopyFiles@2 +# displayName: "Add Development Src to Container Artifacts" +# inputs: +# sourceFolder: $(ACN_DIR) +# targetFolder: $(OUT_DIR) + + +- task: CopyFiles@2 + displayName: "Add Pipeline Orchestration to Container Artifacts" + inputs: + sourceFolder: $(ACN_DEVOPS_DIR)/.pipelines + targetFolder: $(ACN_DIR)/.pipelines + CleanTargetFolder: false diff --git a/.pipelines/run-pipeline.yaml b/.pipelines/run-pipeline.yaml index 851bf9289f..f29c79a485 100644 --- a/.pipelines/run-pipeline.yaml +++ b/.pipelines/run-pipeline.yaml @@ -2,23 +2,46 @@ stages: - stage: setup displayName: ACN variables: - ACN_DIR: azure-container-networking + + ACN_DEVOPS_DIR: $(Build.SourcesDirectory)/azure-container-networking jobs: + - job: copy + displayName: Copy Pipeline Files + pool: + type: linux + variables: + ob_outputDirectory: $(Build.ArtifactStagingDirectory) + ob_git_checkout: true + steps: + - checkout: acn-devops + + - task: CopyFiles@2 + displayName: "Add Pipeline Orchestration to Container Artifacts" + inputs: + sourceFolder: $(ACN_DEVOPS_DIR)/.pipelines + targetFolder: $(Build.ArtifactStagingDirectory)/.pipelines + - job: env displayName: Setup pool: type: linux + dependsOn: copy variables: - ob_outputDirectory: $(Build.ArtifactStagingDirectory) + ob_outputDirectory: $(Build.SourcesDirectory)/azure-container-networking ob_artifactSuffix: _source + ob_git_checkout: true - ACR_DIR: $(Build.SourcesDirectory)/azure-container-networking + ACN_DIR: $(Build.SourcesDirectory)/azure-container-networking + ACN_DEVOPS_DIR: $(Agent.BuildDirectory)/drop_setup_copy BUILD_TYPE: $(IMAGE_ACR_TYPE) steps: - checkout: azure-container-networking - - template: build/ob-prepare.steps.yaml + - download: current + artifact: drop_setup_copy + + - template: build/ob-prepare.steps.yaml@acn-devops -- template: templates/run-unit-tests.stages.yaml +- template: templates/run-unit-tests.stages.yaml@acn-devops - ${{ if not(contains(variables['Build.SourceBranch'], 'refs/pull')) }}: @@ -44,7 +67,7 @@ stages: IPV6_HP_BPF_VERSION: $[ stageDependencies.setup.env.outputs['EnvironmentalVariables.ipv6HpBpfVersion'] ] NPM_VERSION: $[ stageDependencies.setup.env.outputs['EnvironmentalVariables.npmVersion'] ] jobs: - - template: /.pipelines/build/images.jobs.yaml + - template: /.pipelines/build/images.jobs.yaml@acn-devops parameters: images: - job: linux_amd64 @@ -202,7 +225,7 @@ stages: NPM_WINDOWS_AMD64_REF: $(IMAGE_REPO_PATH)/windows-amd64/npm:$(Build.BuildNumber) jobs: - - template: build/manifests.jobs.yaml + - template: build/manifests.jobs.yaml@acn-devops parameters: generate: - job: azure_ipam