Modify gitlab ci for more generic files

Signed-off-by: Taylor Smock <taylor.smock@kaart.com>
pull/1/head
Taylor Smock 2019-10-17 09:32:24 -06:00
rodzic 7aa4c2bcfb
commit 64bc123e52
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 625F6A74A3E4311A
2 zmienionych plików z 24 dodań i 13 usunięć

Wyświetl plik

@ -142,18 +142,18 @@ build with java 13:
# dependencies: # dependencies:
# - build # - build
# only: # only:
# - master@gokaart/JOSM_MapWithAI # - master
release: release:
stage: deploy stage: deploy
environment: environment:
name: pages branch / dist directory name: pages branch / dist directory
url: https://gitlab.com/gokaart/JOSM_MapWithAI/tree/pages/public/dist url: ${CI_PAGES_URL}/${CI_PROJECT_NAME}
script: script:
- &clone_pages_branch | - &clone_pages_branch |
echo "$SSH_PRIVATE_DEPLOY_KEY" > ~/.ssh/id_rsa echo "$SSH_PRIVATE_DEPLOY_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa chmod 600 ~/.ssh/id_rsa
git clone --depth 1 --branch pages git@gitlab.com:gokaart/JOSM_MapWithAI.git pages git clone --depth 1 --branch pages ${CI_REPOSITORY_URL} pages
- | - |
version=`git describe --always --dirty` version=`git describe --always --dirty`
longVersion=`git describe --always --long --dirty` longVersion=`git describe --always --long --dirty`
@ -166,20 +166,23 @@ release:
- &push_pages_branch | - &push_pages_branch |
cd pages/ cd pages/
git config user.name "Deploy with GitLab CI" git config user.name "Deploy with GitLab CI"
git config user.email "gokaart/JOSM_MapWithAI@gitlab.com" git config user.email "${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}@${CI_SERVER_HOST}"
git stage . git stage .
git commit -a -m "$commitMessage" git commit -a -m "$commitMessage"
git push origin pages git push origin pages
dependencies: dependencies:
- build - build
only: only:
- tags@gokaart/JOSM_MapWithAI refs:
- tags
variables:
- $SSH_PRIVATE_DEPLOY_KEY
publish master update site: publish master update site:
stage: deploy stage: deploy
environment: environment:
name: pages branch / snapshot update site name: pages branch / snapshot update site
url: https://gitlab.com/gokaart/JOSM_MapWithAI/tree/pages url: ${CI_PAGES_URL}/${CI_PROJECT_NAME}/snapshot/master/update-site
script: script:
- *clone_pages_branch - *clone_pages_branch
- | - |
@ -194,17 +197,21 @@ publish master update site:
dependencies: dependencies:
- build - build
only: only:
- master@gokaart/JOSM_MapWithAI refs:
- master
variables:
- $SSH_PRIVATE_DEPLOY_KEY
publish to / GitLab.com packages: publish to / GitLab.com packages:
stage: deploy stage: deploy
environment: environment:
name: GitLab.com / JOSM-MapWithAI packages name: GitLab.com / ${CI_PROJECT_NAME} packages
url: https://gitlab.com/gokaart/JOSM_MapWithAI/-/packages url: ${CI_PROJECT_URL}/-/packages
script: script:
- ./gradlew publishAllPublicationsToGitlabRepository - ./gradlew publishAllPublicationsToGitlabRepository
- ./gradlew releaseToGitlab - ./gradlew releaseToGitlab
dependencies: dependencies:
- build - build
only: only:
- tags@gokaart/JOSM_MapWithAI refs:
- tags

Wyświetl plik

@ -38,6 +38,11 @@ tasks.withType(JavaCompile).configureEach {
} }
} }
archivesBaseName = "mapwithai"
def gitlabGroup = "gokaart"
def gitlabRepositoryName = "JOSM_lane-connectivity"
def versions = [ def versions = [
awaitility: "4.0.1", awaitility: "4.0.1",
errorprone: "2.3.3", errorprone: "2.3.3",
@ -103,10 +108,9 @@ tasks.processResources {
from("$projectDir/src/resources") from("$projectDir/src/resources")
} }
archivesBaseName = "mapwithai"
josm { josm {
i18n { i18n {
pathTransformer = getPathTransformer("gitlab.com/gokaart/JOSM_MapWithAI/blob") pathTransformer = getPathTransformer("gitlab.com/${gitlabGroup}/${gitlabRepositoryName}/blob")
} }
} }
@ -159,7 +163,7 @@ task generateSnapshotUpdateSite(type: GeneratePluginList) {
outputFile = new File(project.buildDir, "snapshot-update-site") outputFile = new File(project.buildDir, "snapshot-update-site")
versionSuffix = {a -> ""} versionSuffix = {a -> ""}
doFirst { doFirst {
def pluginDownloadUrl = "https://gokaart.gitlab.io/JOSM_MapWithAI/snapshot/master/${archivesBaseName}.jar" def pluginDownloadUrl = "https://${gitlabGroup}.gitlab.io/${gitlabRepositoryName}/snapshot/master/${archivesBaseName}.jar"
it.iconBase64Provider = { it.iconBase64Provider = {
def file = new File(sourceSets.main.resources.srcDirs[0], it) def file = new File(sourceSets.main.resources.srcDirs[0], it)
if (file.exists()) { if (file.exists()) {