[gnome-build-meta/abderrahim/update-refs-script] git_ssh_command




commit 048e2d1c0b963398ce3239c437d3c9e5288eb699
Author: Jordan Petridis <jordan centricular com>
Date:   Tue Oct 4 19:35:13 2022 +0200

    git_ssh_command

 .gitlab-ci.yml | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1edfa36b4..733a2868f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -13,7 +13,7 @@ variables:
 
   # Docker Images
   DOCKER_REGISTRY: "registry.gitlab.com/freedesktop-sdk/infrastructure/freedesktop-sdk-docker-images"
-  DOCKER_IMAGE_ID: "3bee7d7876bc776cdf8379ab0713fcd405ac5002"
+  DOCKER_IMAGE_ID: "a470cd0ecc1a005e9456b98845455ed1bcdc6b7b"
 
 stages:
 - track
@@ -533,19 +533,26 @@ test-pinephone-pro-aarch64:
 
 update_refs:
   stage: 'track'
+  tags:
+  - x86_64
+  - gnome-build-meta
   script:
     # Setup ssh
-    - eval $(ssh-agent -s)
-    - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
+    # - eval $(ssh-agent -s)
+    # - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
     - mkdir -p ~/.ssh
     - chmod 700 ~/.ssh
+    - echo "$SSH_PRIVATE_KEY" | tr -d '\r' > ssh.key
+    - chmod 600 ssh.key
+
+    - git config core.sshCommand "ssh -i $(pwd)/ssh.key -F /dev/null"
 
     # FIXME: use static knownkeys with a var
     # https://gitlab.com/gitlab-examples/ssh-private-key/-/blob/master/.gitlab-ci.yml#L38
     - ssh-keyscan gitlab.gnome.org >> ~/.ssh/known_hosts
     - chmod 644 ~/.ssh/known_hosts
 
-    - ssh -Tv git gitlab gnome org
+    - ssh -i $(pwd)/ssh.key -Tv git gitlab gnome org
 
     - git config --global user.email "sysadmin gnome org"
     - git config --global user.name "gnomebot"
@@ -554,6 +561,8 @@ update_refs:
     - python3 utils/update-refs.py
 
     - git push -o merge_request.create -o merge_request.assign=44433 -o merge_request.remove_source_branch 
origin HEAD
+  after_script:
+    - rm ssh.key
 
 
 pages:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]