-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest-docker.yml
55 lines (47 loc) · 1.66 KB
/
test-docker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
pr:
- test
pool:
vmImage: 'ubuntu-latest'
variables:
PYTHON: 'python3.8'
INC_VER: '1.12'
IMAGE_NAME: 'neural-compressor'
IMAGE_TAG: '1.12'
INC_BRANCH: 'master'
stages:
- stage: Build
displayName: Build and push stage
jobs:
- job: Build
displayName: Build
steps:
- task: Docker@2
displayName: Login to repo
inputs:
command: login
containerRegistry: inc-internal
- script: |
echo "pass"
#docker pull amr-registry-pre.caas.intel.com/neural-compressor/test-inc:v1.12
#workspace=`pwd`
#rm ${workspace}/cert.zip
#http_proxy='' && curl http://certificates.intel.com/repository/certificates/IntelSHA2RootChain-Base64.zip -o cert.zip
#ls -l ${workspace}
#sudo unzip -o ${workspace}/cert.zip -d /usr/local/share/ca-certificates/
#rm ${workspace}/cert.zip
#ls -l ${workspace}
#sudo update-ca-certificates || sudo update-ca-trust
#sudo service docker restart
displayName: 'Add certificate'
- script: docker build --build-arg PYTHON=${PYTHON} --build-arg INC_BRANCH=${INC_BRANCH} -f docker/Dockerfile.devel -t ${IMAGE_NAME}:${IMAGE_TAG} .
displayName: 'Build Container'
- script: |
docker tag ${IMAGE_NAME}:${IMAGE_TAG} amr-registry-pre.caas.intel.com/neural-compressor/test-inc:${IMAGE_TAG}
displayName: 'Tag Container'
- script:
docker images | grep neural-compressor
displayName: check image