Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
aitoolkit-gui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
nomad-lab
aitoolkit-gui
Commits
4fd3f6ec
Commit
4fd3f6ec
authored
3 years ago
by
Luigi Sbailo
Browse files
Options
Downloads
Patches
Plain Diff
CI updates tag in app
parent
6792fe06
No related branches found
No related tags found
No related merge requests found
Pipeline
#118422
passed
3 years ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+1
-1
1 addition, 1 deletion
.gitlab-ci.yml
.gitlab-ci/update_tag_app.sh
+42
-0
42 additions, 0 deletions
.gitlab-ci/update_tag_app.sh
with
43 additions
and
1 deletion
.gitlab-ci.yml
+
1
−
1
View file @
4fd3f6ec
...
@@ -17,7 +17,7 @@ build:
...
@@ -17,7 +17,7 @@ build:
script
:
script
:
-
docker login -u ai_toolkit -p ${AI_TOOLKIT_TOKEN} ${APP_REGISTRY}
-
docker login -u ai_toolkit -p ${AI_TOOLKIT_TOKEN} ${APP_REGISTRY}
-
docker pull ${CI_REGISTRY_IMAGE}:latest
-
docker pull ${CI_REGISTRY_IMAGE}:latest
-
docker build --cache-from ${CI_REGISTRY_IMAGE}:latest -t ${CI_REGISTRY_IMAGE}:latest -t ${APP_REGISTRY}:gui -t ${APP_REGISTRY}:gui${CI_COMMIT_SHORT_SHA} .
-
docker build --cache-from ${CI_REGISTRY_IMAGE}:latest -t ${CI_REGISTRY_IMAGE}:latest -t
${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA} -t
${APP_REGISTRY}:gui -t ${APP_REGISTRY}:gui${CI_COMMIT_SHORT_SHA} .
-
docker push ${CI_REGISTRY_IMAGE}:latest
-
docker push ${CI_REGISTRY_IMAGE}:latest
-
docker push ${APP_REGISTRY}:gui
-
docker push ${APP_REGISTRY}:gui
-
docker push ${APP_REGISTRY}:gui${CI_COMMIT_SHORT_SHA}
-
docker push ${APP_REGISTRY}:gui${CI_COMMIT_SHORT_SHA}
This diff is collapsed.
Click to expand it.
.gitlab-ci/update_tag_app.sh
+
42
−
0
View file @
4fd3f6ec
# !/bin/bash
# Based on: https://docs.gitlab.com/ee/ci/ssh_keys/README.html
# Install ssh-agent if not already installed, it is required by Docker.
# (change apt-get to yum if you use an RPM-based image)
# - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
# Run ssh-agent (inside the build environment)
eval
$(
ssh-agent
-s
)
# Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store
# We're using tr to fix line endings which makes ed25519 keys work
# without extra base64 encoding.
# https://gitlab.com/gitlab-examples/ssh-private-key/issues/1#note_48526556
echo
"
$SSH_PRIVATE_KEY
"
|
tr
-d
'\r'
| ssh-add -
# Create the SSH directory and give it the right permissions
mkdir
-p
~/.ssh
chmod
700 ~/.ssh
# Use ssh-keyscan to scan the keys of your private server.
ssh-keyscan gitlab.mpcdf.mpg.de
>>
~/.ssh/known_hosts
chmod
644 ~/.ssh/known_hosts
# Set the user name and email.
git config
--global
user.name
$GITLAB_USER_NAME
git config
--global
user.email
$GITLAB_USER_EMAIL
# Clone the private repository
git clone git@gitlab.mpcdf.mpg.de:nomad-lab/aitoolkit-app.git /tmp/aitoolkit-app
cd
/tmp/aitoolkit-app
# Update the tag of the docker image
sed
-i
"s/aitoolkit-app:gui.*/aitoolkit-app:gui
$CI_COMMIT_SHORT_SHA
/1"
docker-compose.yml
# Finally, commit and push the changes
git add docker-compose.yml
git commit
-m
"CI: Update the GUI image (
$CI_COMMIT_SHORT_SHA
)"
git push
rm
-rf
/tmp/aitoolkit-app
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