Skip to content

Commit 305cd49

Browse files
committed
[generic]: upload docker-ptf.gz
Signed-off-by: Guohan Lu <[email protected]>
1 parent 14ce3f4 commit 305cd49

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

jenkins/generic/buildimage-baseimage/Jenkinsfile

+19-3
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,21 @@ pipeline {
66

77
}
88

9+
environment {
10+
DOCKER_IMAGE_FILE = 'docker-ptf.gz'
11+
DOCKER_IMAGE_TAG = 'latest'
12+
DOCKER_IMAGE_FILE_DIR = 'sonic-buildimage/target'
13+
}
14+
915
triggers {
1016
pollSCM('@midnight')
1117
}
1218

1319
stages {
1420
stage('Prepare') {
1521
steps {
16-
step([$class: 'WsCleanup'])
17-
checkout([$class: 'GitSCM',
22+
dir('sonic-buildimage') {
23+
checkout([$class: 'GitSCM',
1824
branches: [[name: 'refs/heads/master']],
1925
extensions: [[$class: 'SubmoduleOption',
2026
disableSubmodules: false,
@@ -23,6 +29,7 @@ pipeline {
2329
reference: '',
2430
trackingSubmodules: false]],
2531
userRemoteConfigs: [[url: 'http://github.com/Azure/sonic-buildimage']]])
32+
}
2633
}
2734
}
2835

@@ -31,6 +38,8 @@ pipeline {
3138
sh '''
3239
#!/bin/bash -xe
3340
41+
ls -l
42+
cd sonic-buildimage
3443
git submodule foreach --recursive '[ -f .git ] && echo "gitdir: $(realpath --relative-to=. $(cut -d" " -f2 .git))" > .git'
3544
3645
make configure PLATFORM=generic
@@ -39,11 +48,18 @@ make SONIC_CONFIG_BUILD_JOBS=1 target/sonic-generic.bin target/sonic-aboot-gener
3948
}
4049
}
4150

51+
stage('Upload') {
52+
steps {
53+
withCredentials([usernamePassword(credentialsId: 'sonicdev-cr', usernameVariable: 'REGISTRY_USERNAME', passwordVariable: 'REGISTRY_PASSWD')]) {
54+
sh './scripts/lib/docker-upload.sh'
55+
}
56+
}
57+
}
4258
}
4359
post {
4460

4561
success {
46-
archiveArtifacts(artifacts: 'target/**')
62+
archiveArtifacts(artifacts: 'sonic-buildimage/target/**')
4763
}
4864
fixed {
4965
slackSend(color:'#00FF00', message: "Build job back to normal: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)")

0 commit comments

Comments
 (0)