mirror of
https://github.com/gogcom/galaxy-integrations-python-api.git
synced 2026-01-01 19:38:21 -05:00
Compare commits
6 Commits
0.30
...
deployed_0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ef7f9ccca1 | ||
|
|
3b296cbcc9 | ||
|
|
f5361cd5ab | ||
|
|
758909efba | ||
|
|
0bc8000f14 | ||
|
|
e62e7e0e6e |
14
jenkins/release.groovy
Normal file
14
jenkins/release.groovy
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
stage('Upload to github')
|
||||||
|
{
|
||||||
|
node('ActiveClientMacosxBuilder') {
|
||||||
|
deleteDir()
|
||||||
|
checkout scm
|
||||||
|
withPythonEnv('/usr/local/bin/python3.7') {
|
||||||
|
withCredentials([usernamePassword(credentialsId: 'github_friendsofgalaxy', usernameVariable: 'GITHUB_USERNAME', passwordVariable: 'GITHUB_TOKEN')]) {
|
||||||
|
sh 'pip install -r jenkins/requirements.txt'
|
||||||
|
def version = sh(returnStdout: true, script: 'python setup.py --version').trim()
|
||||||
|
sh "python jenkins/release.py $version"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
26
jenkins/release.py
Normal file
26
jenkins/release.py
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
import os
|
||||||
|
import sys
|
||||||
|
from galaxy.github.exporter import transfer_repo
|
||||||
|
|
||||||
|
GITHUB_USERNAME = "FriendsOfGalaxy"
|
||||||
|
GITHUB_EMAIL = "friendsofgalaxy@gmail.com"
|
||||||
|
GITHUB_TOKEN = os.environ["GITHUB_TOKEN"]
|
||||||
|
GITHUB_REPO_NAME = "galaxy-plugin-api"
|
||||||
|
SOURCE_BRANCH = os.environ["GIT_REFSPEC"]
|
||||||
|
|
||||||
|
GITLAB_USERNAME = "galaxy-client"
|
||||||
|
GITLAB_REPO_NAME = "galaxy-plugin-api"
|
||||||
|
|
||||||
|
def version_provider(_):
|
||||||
|
return sys.argv[1]
|
||||||
|
|
||||||
|
gh_version = transfer_repo(
|
||||||
|
version_provider=version_provider,
|
||||||
|
source_repo_spec="git@gitlab.gog.com:{}/{}.git".format(GITLAB_USERNAME, GITLAB_REPO_NAME),
|
||||||
|
source_include_elements=["src", "tests", "requirements.txt", ".gitignore", "*.md", "pytest.ini"],
|
||||||
|
source_branch=SOURCE_BRANCH,
|
||||||
|
dest_repo_spec="https://{}:{}@github.com/{}/{}.git".format(GITHUB_USERNAME, GITHUB_TOKEN, GITHUB_USERNAME, GITHUB_REPO_NAME),
|
||||||
|
dest_branch="master",
|
||||||
|
dest_user_email=GITHUB_EMAIL,
|
||||||
|
dest_user_name=GITLAB_USERNAME
|
||||||
|
)
|
||||||
1
jenkins/requirements.txt
Normal file
1
jenkins/requirements.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
git+ssh://git@gitlab.gog.com/galaxy-client/github-exporter.git@v0.1
|
||||||
Reference in New Issue
Block a user