Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
ecore2java-gradle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Andreas Fehn
ecore2java-gradle
Commits
1e34b1f6
Commit
1e34b1f6
authored
6 years ago
by
Andreas Fehn
Browse files
Options
Downloads
Patches
Plain Diff
Use gitlab ci to automatically release versions to ivy repo in another branch
parent
e3b4bf72
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+52
-0
52 additions, 0 deletions
.gitlab-ci.yml
with
52 additions
and
0 deletions
.gitlab-ci.yml
0 → 100644
+
52
−
0
View file @
1e34b1f6
variables
:
GIT_STRATEGY
:
clone
ARTIFACT_DIR
:
build/repo/ecore2java
build
:
stage
:
build
image
:
nimmis/alpine-java:openjdk-8-jdk
variables
:
GRADLE_OPTS
:
"
-Dorg.gradle.daemon=false"
before_script
:
-
export GRADLE_USER_HOME=`pwd`/.gradle
script
:
-
./gradlew publish
artifacts
:
paths
:
-
$ARTIFACT_DIR
expire_in
:
10min
cache
:
paths
:
-
.gradle/wrapper
-
.gradle/caches
only
:
-
tags
tags
:
-
dockered
publish
:
stage
:
deploy
image
:
bravissimolabs/alpine-git
before_script
:
-
mkdir -pvm 0700 ~/.ssh
-
echo "$SSH_SECRET_DEPLOY_KEY" | tr -d '\r' > ~/.ssh/id_rsa
-
chmod 600 ~/.ssh/id_rsa
-
ssh-keyscan -H "git-st.inf.tu-dresden.de" >> ~/.ssh/known_hosts
-
git config user.name "$GITLAB_USER_NAME"
-
git config user.email "$GITLAB_USER_EMAIL"
-
git remote set-url --push origin `echo $CI_REPOSITORY_URL | sed -E 's/.*@([^\/]+?(\:\d+)?)\//git@\1:/'`
-
export VERSION=${CI_COMMIT_TAG:-`git describe --tags --always`}
-
echo $VERSION
script
:
-
git checkout ivy-repo || git checkout --orphan ivy-repo
-
git reset
-
cp -r $ARTIFACT_DIR .
-
git add $(git ls-files -o ecore2java)
-
git commit -m "[skip ci] Automatic release of version $VERSION"
-
git push --set-upstream origin ivy-repo
after_script
:
-
rm -rfv ~/.ssh
only
:
-
tags
tags
:
-
dockered
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment