mirror of
https://github.com/docker/compose.git
synced 2026-02-10 18:49:28 +08:00
Compare commits
4 Commits
v1
...
1.26.0-tes
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d0899ca124 | ||
|
|
94c41848cb | ||
|
|
540e5da903 | ||
|
|
3f4920cdf5 |
@@ -2,7 +2,7 @@
|
||||
|
||||
def dockerVersions = ['19.03.5', '18.09.9']
|
||||
def baseImages = ['alpine', 'debian']
|
||||
def pythonVersions = ['py27', 'py37']
|
||||
def pythonVersions = ['py37']
|
||||
|
||||
pipeline {
|
||||
agent none
|
||||
@@ -75,7 +75,7 @@ pipeline {
|
||||
steps {
|
||||
checkout scm
|
||||
sh './script/setup/osx'
|
||||
sh 'tox -e py27,py37 -- tests/unit'
|
||||
sh 'tox -e py37 -- tests/unit'
|
||||
sh './script/build/osx'
|
||||
dir ('dist') {
|
||||
checksum('docker-compose-Darwin-x86_64')
|
||||
@@ -112,7 +112,7 @@ pipeline {
|
||||
}
|
||||
steps {
|
||||
checkout scm
|
||||
bat 'tox.exe -e py27,py37 -- tests/unit'
|
||||
bat 'tox.exe -e py37 -- tests/unit'
|
||||
powershell '.\\script\\build\\windows.ps1'
|
||||
dir ('dist') {
|
||||
checksum('docker-compose-Windows-x86_64.exe')
|
||||
@@ -177,19 +177,14 @@ pipeline {
|
||||
}
|
||||
steps {
|
||||
checkout scm
|
||||
withCredentials([[$class: "FileBinding", credentialsId: 'pypirc-docker-dsg-cibot', variable: 'PYPIRC']]) {
|
||||
withCredentials([file(credentialsId: 'pypirc-docker-dsg-cibot', variable: 'PYPIRC')]) {
|
||||
sh """
|
||||
virtualenv venv-publish
|
||||
source venv-publish/bin/activate
|
||||
pip install --user twine wheel
|
||||
python setup.py sdist bdist_wheel
|
||||
pip install twine
|
||||
twine upload --config-file ${PYPIRC} ./dist/docker-compose-${env.TAG_NAME}.tar.gz ./dist/docker_compose-${env.TAG_NAME}-py2.py3-none-any.whl
|
||||
"""
|
||||
}
|
||||
}
|
||||
post {
|
||||
sh 'deactivate; rm -rf venv-publish'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -268,7 +263,6 @@ def buildRuntimeImage(baseImage) {
|
||||
|
||||
def pushRuntimeImage(baseImage) {
|
||||
unstash "compose-${baseImage}"
|
||||
sh 'echo -n "${DOCKERHUB_CREDS_PSW}" | docker login --username "${DOCKERHUB_CREDS_USR}" --password-stdin'
|
||||
sh "docker load -i dist/docker-compose-${baseImage}.tar"
|
||||
withDockerRegistry(credentialsId: 'dockerbuildbot-hub.docker.com') {
|
||||
sh "docker push docker/compose:${baseImage}-${env.TAG_NAME}"
|
||||
@@ -283,18 +277,23 @@ def githubRelease() {
|
||||
withCredentials([string(credentialsId: 'github-compose-release-test-token', variable: 'GITHUB_TOKEN')]) {
|
||||
def prerelease = !( env.TAG_NAME ==~ /v[0-9\.]+/ )
|
||||
changelog = readFile "CHANGELOG.md"
|
||||
def data = """{
|
||||
\"tag_name\": \"${env.TAG_NAME}\",
|
||||
\"name\": \"${env.TAG_NAME}\",
|
||||
\"draft\": true,
|
||||
\"prerelease\": ${prerelease},
|
||||
\"body\" : \"${changelog}\"
|
||||
"""
|
||||
echo $data
|
||||
|
||||
def info = [:]
|
||||
info.tag_name = env.TAG_NAME
|
||||
info.name = env.TAG_NAME
|
||||
info.draft = true
|
||||
info.prerelease = prerelease
|
||||
info.body = changelog
|
||||
|
||||
|
||||
writeFile file: 'release.json', text: groovy.json.JsonOutput.toJson(info)
|
||||
|
||||
// debug
|
||||
sh("cat release.json")
|
||||
|
||||
def url = "https://api.github.com/repos/docker/compose/releases"
|
||||
def upload_url = sh(returnStdout: true, script: """
|
||||
curl -sSf -H 'Authorization: token ${GITHUB_TOKEN}' -H 'Accept: application/json' -H 'Content-type: application/json' -X POST -d '$data' $url") \\
|
||||
curl -sSf -H 'Authorization: token ${GITHUB_TOKEN}' -H 'Accept: application/json' -H 'Content-type: application/json' -X POST --data-binary '@release.json' $url) \\
|
||||
| jq '.upload_url | .[:rindex("{")]'
|
||||
""")
|
||||
sh("""
|
||||
|
||||
Reference in New Issue
Block a user