Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dc14e6bd authored by Guillaume Jacquart's avatar Guillaume Jacquart
Browse files

5080: Update trackers list from CI with git commands.

parent f618479c
Loading
Loading
Loading
Loading
Loading
+16 −1
Original line number Diff line number Diff line
@@ -5,7 +5,22 @@ stages:

build-list:
  stage: deploy
  before_script:
    - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
    - 'which git || ( apt-get install git -y )'
    - eval $(ssh-agent -s)
    - echo "$SSH_E_ROBOT_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
    - mkdir -p ~/.ssh
    - chmod 700 ~/.ssh
    - echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
    - chmod 644 ~/.ssh/known_hosts
    - git remote set-url origin ssh://git@gitlab.e.foundation/$CI_PROJECT_PATH.git
    - git config --global user.name "$GITLAB_USER_NAME"
    - git config --global user.email "$GITLAB_USER_EMAIL"

  script: 
    - node build_list.js
    - node validate_json.js
    - node upload_list.js
    - git add list/e_trackers.json
    - git commit -m "Auto update trackers list"
    - git push
+0 −1
Original line number Diff line number Diff line
@@ -157,4 +157,3 @@ function printTrackers() {
function saveTrackersFile(trackersJson) {
    fs.writeFileSync(outputFile, trackersJson)
}