-
Notifications
You must be signed in to change notification settings - Fork 110
refactor: use download_pingcap_oci_artifact.sh instead of download_pingcap_artifact.sh #4136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,7 +17,7 @@ pipeline { | |
| } | ||
| } | ||
| environment { | ||
| FILE_SERVER_URL = 'http://fileserver.pingcap.net' | ||
| OCI_ARTIFACT_HOST = 'hub-zot.pingcap.net/mirrors/hub' | ||
| } | ||
| options { | ||
| timeout(time: 70, unit: 'MINUTES') | ||
|
|
@@ -66,10 +66,12 @@ pipeline { | |
| dir('tidb') { | ||
| cache(path: "./bin", includes: '**/*', key: "ws/${BUILD_TAG}/dependencies") { | ||
| sh label: 'tidb-server', script: 'ls bin/tidb-server || make' | ||
| } | ||
| container("utils") { | ||
| sh label: 'download binary', script: """ | ||
| chmod +x ${WORKSPACE}/scripts/artifacts/*.sh | ||
| ${WORKSPACE}/scripts/artifacts/download_pingcap_artifact.sh --pd=${REFS.base_ref} --tikv=${REFS.base_ref} | ||
| mv third_bin/* bin/ | ||
| ${WORKSPACE}/scripts/artifacts/download_pingcap_oci_artifact.sh --pd=${REFS.base_ref} --tikv=${REFS.base_ref} | ||
|
|
||
| mv pd-server bin/ | ||
| ls -alh bin/ | ||
| """ | ||
| } | ||
|
|
@@ -104,14 +106,14 @@ pipeline { | |
| sh label: "print version", script: """ | ||
| pwd && ls -alh | ||
| ls bin/tidb-server && chmod +x bin/tidb-server && ./bin/tidb-server -V | ||
| ls bin/pd-server && chmod +x bin/pd-server && ./bin/pd-server -V | ||
| ls bin/tikv-server && chmod +x bin/tikv-server && ./bin/tikv-server -V | ||
| ls bin/pd-server && chmod +x bin/pd-server && ./pd-server -V | ||
| ls bin/tikv-server && chmod +x bin/tikv-server && ./tikv-server -V | ||
|
Comment on lines
+109
to
+110
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The paths to the |
||
| """ | ||
| } | ||
| } | ||
| dir('tidb-test/mysql_test') { | ||
| sh """ | ||
| mkdir -p bin | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| mv ${WORKSPACE}/tidb/bin/* bin/ && chmod +x bin/* | ||
| ls -alh bin/ | ||
| """ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,7 +18,7 @@ pipeline { | |
| } | ||
| } | ||
| environment { | ||
| FILE_SERVER_URL = 'http://fileserver.pingcap.net' | ||
| OCI_ARTIFACT_HOST = 'hub-zot.pingcap.net/mirrors/hub' | ||
| GITHUB_TOKEN = credentials('github-bot-token') | ||
| } | ||
| options { | ||
|
|
@@ -69,13 +69,14 @@ pipeline { | |
| container("golang") { | ||
| sh label: 'tidb-server', script: '[ -f bin/tidb-server ] || make' | ||
| retry(3) { | ||
| sh label: 'download thirdparty binary', script: """ | ||
| chmod +x ${WORKSPACE}/scripts/artifacts/*.sh | ||
| ${WORKSPACE}/scripts/artifacts/download_pingcap_artifact.sh --pd=${REFS.base_ref} --tikv=${REFS.base_ref} | ||
| mv third_bin/tikv-server bin/ | ||
| mv third_bin/pd-server bin/ | ||
| ./bin/tikv-server -V | ||
| ./bin/pd-server -V | ||
| dir("bin") { container("utils") { sh label: 'download binary', script: """ | ||
| container("utils") { | ||
| sh label: 'download binary', script: "${WORKSPACE}/scripts/artifacts/download_pingcap_oci_artifact.sh --pd=${REFS.base_ref} --tikv=${REFS.base_ref}" | ||
|
|
||
|
|
||
|
|
||
| ./tikv-server -V | ||
| ./pd-server -V | ||
| """ | ||
| } | ||
|
Comment on lines
+72
to
81
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This script block is syntactically incorrect. It appears to have a nested Groovy |
||
| } | ||
|
|
@@ -88,8 +89,8 @@ pipeline { | |
| cd randgen-test && ./build.sh && cd .. | ||
| mkdir -p bin | ||
| cp -r ../tidb/bin/* bin/ && chmod +x bin/* | ||
| ./bin/pd-server -V | ||
| ./bin/tikv-server -V | ||
| ./pd-server -V | ||
| ./tikv-server -V | ||
| ./bin/tidb-server -V | ||
| """ | ||
| } | ||
|
|
@@ -123,8 +124,8 @@ pipeline { | |
| cache(path: "./", includes: '**/*', key: "ws/${BUILD_TAG}/tidb-test") { | ||
| sh """ | ||
| ls -alh bin/ | ||
| ./bin/pd-server -V | ||
| ./bin/tikv-server -V | ||
| ./pd-server -V | ||
| ./tikv-server -V | ||
| ./bin/tidb-server -V | ||
| """ | ||
| container("golang") { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,7 +18,7 @@ pipeline { | |
| } | ||
| } | ||
| environment { | ||
| FILE_SERVER_URL = 'http://fileserver.pingcap.net' | ||
| OCI_ARTIFACT_HOST = 'hub-zot.pingcap.net/mirrors/hub' | ||
| GITHUB_TOKEN = credentials('github-bot-token') | ||
| } | ||
| options { | ||
|
|
@@ -72,15 +72,16 @@ pipeline { | |
| container("golang") { | ||
| retry(2) { | ||
| sh label: 'download binary', script: """ | ||
| chmod +x ${WORKSPACE}/scripts/artifacts/*.sh | ||
| ${WORKSPACE}/scripts/artifacts/download_pingcap_artifact.sh --pd=${REFS.base_ref} --tikv=${REFS.base_ref} | ||
| container("utils") { | ||
| sh label: 'download binary', script: "${WORKSPACE}/scripts/artifacts/download_pingcap_oci_artifact.sh --pd=${REFS.base_ref} --tikv=${REFS.base_ref}" | ||
| rm -rf bin/ && mkdir -p bin/ | ||
| mv third_bin/tikv-server bin/ | ||
| mv third_bin/pd-server bin/ | ||
| mkdir -p bin | ||
|
|
||
| mv pd-server bin/ | ||
| ls -alh bin/ | ||
| chmod +x bin/* | ||
| ./bin/tikv-server -V | ||
| ./bin/pd-server -V | ||
| ./tikv-server -V | ||
| ./pd-server -V | ||
| """ | ||
|
Comment on lines
74
to
85
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This script block is syntactically incorrect due to a nested |
||
| } | ||
| } | ||
|
|
@@ -93,8 +94,8 @@ pipeline { | |
| dir('tidb') { | ||
| sh label: 'check version', script: """ | ||
| ls -alh bin/ | ||
| ./bin/tikv-server -V | ||
| ./bin/pd-server -V | ||
| ./tikv-server -V | ||
| ./pd-server -V | ||
| """ | ||
| } | ||
| dir('tikv-copr-test') { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
mvcommand has incorrect indentation and is incomplete. It should be properly indented to be part of the shell script. Additionally, the download command fetches bothpdandtikvartifacts, but onlypd-serveris being moved. Thetikv-serveralso needs to be moved to thebindirectory for subsequent steps to succeed.