From 511fe6303ab53a3de3c4d7d0353c27d4df640d6f Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Wed, 27 Apr 2022 11:46:35 +0600 Subject: [PATCH 01/78] Modify .gitlab-ci.yml to add aur-package --- .gitlab-ci.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e4489c50..345c39e9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -99,3 +99,19 @@ publish-windows: rules: - if: '$CI_COMMIT_TAG' when: manual + +publish-aur: + image: archlinux:latest + stage: publish + variables: + RELEASE_TYPE: beta + before_script: + - pacman -Syy --noconfirm --noprogressbar --quiet aurpublish openssh + # Store the private key into the agent's memory + - eval $(ssh-agent -s) + - echo "$AUR_SSH_KEY" | tr -d '\r' | ssh-add - + # aurpublish pushes to alias 'aur', so add 'aur' to SSH configure + - install -m '700' -d ~/.ssh + - echo -e "Host aur\n User aur\n Hostname aur.archlinux.org" > ~/.ssh/config + - ssh-keyscan aur.archlinux.org > ~/.ssh/known_hosts + - aurpublish pkg/ -- GitLab From 477bf7b9a7d317008f9753b5795d0b884c27b257 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Wed, 27 Apr 2022 12:16:18 +0600 Subject: [PATCH 02/78] Modify .gitlab-ci.yml to fix lint --- .gitlab-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 345c39e9..a61899f2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -106,7 +106,7 @@ publish-aur: variables: RELEASE_TYPE: beta before_script: - - pacman -Syy --noconfirm --noprogressbar --quiet aurpublish openssh + - pacman -Syy --noconfirm --noprogressbar --quiet aurpublish openssh # Store the private key into the agent's memory - eval $(ssh-agent -s) - echo "$AUR_SSH_KEY" | tr -d '\r' | ssh-add - @@ -114,4 +114,5 @@ publish-aur: - install -m '700' -d ~/.ssh - echo -e "Host aur\n User aur\n Hostname aur.archlinux.org" > ~/.ssh/config - ssh-keyscan aur.archlinux.org > ~/.ssh/known_hosts - - aurpublish pkg/ + script: + - aurpublish pkg/ -- GitLab From 9e1f0e8486a7213432ee8832533d8e20d127d3f2 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Wed, 27 Apr 2022 13:14:15 +0600 Subject: [PATCH 03/78] Modify .gitlab-ci.yml to fix error loading ssh key --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a61899f2..0f309fc8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -109,7 +109,7 @@ publish-aur: - pacman -Syy --noconfirm --noprogressbar --quiet aurpublish openssh # Store the private key into the agent's memory - eval $(ssh-agent -s) - - echo "$AUR_SSH_KEY" | tr -d '\r' | ssh-add - + - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null # aurpublish pushes to alias 'aur', so add 'aur' to SSH configure - install -m '700' -d ~/.ssh - echo -e "Host aur\n User aur\n Hostname aur.archlinux.org" > ~/.ssh/config -- GitLab From dec2a2423a71f12fceb5b8024a644375671503a4 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Wed, 27 Apr 2022 13:54:16 +0600 Subject: [PATCH 04/78] Modify check-version.sh to add AUR --- check-version.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/check-version.sh b/check-version.sh index 6f16c304..f1d62be2 100755 --- a/check-version.sh +++ b/check-version.sh @@ -9,6 +9,9 @@ echo "Snapcraft version: $SNAPCRAFT_VERSION ($SNAPCRAFT_VERSION_FILE)" WINDOWS_VERSION=$(cat $WINDOWS_VERSION_FILE | grep "define appVersion" | sed -E 's/!define appVersion "(v.*)"/\1/') echo "Windows version: $WINDOWS_VERSION ($WINDOWS_VERSION_FILE)" +AUR_VERSION=$(cat $AUR_VERSION_FILE | grep "pkgver" | sed 's/[^=]*= *//') +echo "AUR version: $AUR_VERSION ($AUR_VERSION_FILE)" + echo "Tag version: $CI_COMMIT_TAG" if [ $JAVA_VERSION != $CI_COMMIT_TAG ] || [ $SNAPCRAFT_VERSION != $CI_COMMIT_TAG ] || [ $WINDOWS_VERSION != $CI_COMMIT_TAG ] -- GitLab From e178a24306857689f29d7ab40430b3f4d23b5887 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Wed, 27 Apr 2022 13:58:34 +0600 Subject: [PATCH 05/78] Add AUR_VERSION_FILE variable in check-version --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0f309fc8..8d49e882 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,6 +17,7 @@ check-version: JAVA_VERSION_FILE: "src/main/java/ecorp/easy/installer/AppConstants.java" SNAPCRAFT_VERSION_FILE: "snap/snapcraft.yaml" WINDOWS_VERSION_FILE: "windows-installer-mui.nsi" + AUR_VERSION_FILE: "pkg/arch/.SRCINFO" script: - ./check-version.sh rules: -- GitLab From 639182e7a238e1dc3574c968219e78cde6658dbe Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Wed, 27 Apr 2022 13:58:34 +0600 Subject: [PATCH 06/78] Add AUR_VERSION_FILE variable in check-version --- check-version.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check-version.sh b/check-version.sh index f1d62be2..6bde6981 100755 --- a/check-version.sh +++ b/check-version.sh @@ -9,12 +9,12 @@ echo "Snapcraft version: $SNAPCRAFT_VERSION ($SNAPCRAFT_VERSION_FILE)" WINDOWS_VERSION=$(cat $WINDOWS_VERSION_FILE | grep "define appVersion" | sed -E 's/!define appVersion "(v.*)"/\1/') echo "Windows version: $WINDOWS_VERSION ($WINDOWS_VERSION_FILE)" -AUR_VERSION=$(cat $AUR_VERSION_FILE | grep "pkgver" | sed 's/[^=]*= *//') +AUR_VERSION=$(cat $AUR_VERSION_FILE | grep "pkgver" | sed 's/[^=]*= *//;s/.*/v&-beta/'s) echo "AUR version: $AUR_VERSION ($AUR_VERSION_FILE)" echo "Tag version: $CI_COMMIT_TAG" -if [ $JAVA_VERSION != $CI_COMMIT_TAG ] || [ $SNAPCRAFT_VERSION != $CI_COMMIT_TAG ] || [ $WINDOWS_VERSION != $CI_COMMIT_TAG ] +if [ $JAVA_VERSION != $CI_COMMIT_TAG ] || [ $SNAPCRAFT_VERSION != $CI_COMMIT_TAG ] || [ $WINDOWS_VERSION != $CI_COMMIT_TAG ] || [ $AUR_VERSION_VERSION != $CI_COMMIT_TAG ] then exit 1 fi -- GitLab From adf8e3c4ada1d572fcb575e8b95395055b4e9463 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Sat, 30 Apr 2022 04:57:17 +0600 Subject: [PATCH 07/78] Modify check-version.sh to fix grep regex --- check-version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check-version.sh b/check-version.sh index 6bde6981..a1eb312a 100755 --- a/check-version.sh +++ b/check-version.sh @@ -9,7 +9,7 @@ echo "Snapcraft version: $SNAPCRAFT_VERSION ($SNAPCRAFT_VERSION_FILE)" WINDOWS_VERSION=$(cat $WINDOWS_VERSION_FILE | grep "define appVersion" | sed -E 's/!define appVersion "(v.*)"/\1/') echo "Windows version: $WINDOWS_VERSION ($WINDOWS_VERSION_FILE)" -AUR_VERSION=$(cat $AUR_VERSION_FILE | grep "pkgver" | sed 's/[^=]*= *//;s/.*/v&-beta/'s) +AUR_VERSION=$(cat $AUR_VERSION_FILE | grep "^pkgver" | sed 's/[^=]*= *//;s/.*/v&-beta/') echo "AUR version: $AUR_VERSION ($AUR_VERSION_FILE)" echo "Tag version: $CI_COMMIT_TAG" -- GitLab From 6ed12daa3108b39afe01333a84812fe2790ae854 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Sat, 30 Apr 2022 04:57:45 +0600 Subject: [PATCH 08/78] Modify .gitlab-ci.yml to drop aurpublish --- .gitlab-ci.yml | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8d49e882..12aa6152 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,7 +17,7 @@ check-version: JAVA_VERSION_FILE: "src/main/java/ecorp/easy/installer/AppConstants.java" SNAPCRAFT_VERSION_FILE: "snap/snapcraft.yaml" WINDOWS_VERSION_FILE: "windows-installer-mui.nsi" - AUR_VERSION_FILE: "pkg/arch/.SRCINFO" + AUR_VERSION_FILE: "pkg/arch/PKGBUILD" script: - ./check-version.sh rules: @@ -107,13 +107,31 @@ publish-aur: variables: RELEASE_TYPE: beta before_script: - - pacman -Syy --noconfirm --noprogressbar --quiet aurpublish openssh + # Install required packages + - pacman -Syy --noconfirm --noprogressbar --quiet aurpublish openssh git # Store the private key into the agent's memory - eval $(ssh-agent -s) - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null - # aurpublish pushes to alias 'aur', so add 'aur' to SSH configure + # Add 'aur' to SSH configure - install -m '700' -d ~/.ssh - - echo -e "Host aur\n User aur\n Hostname aur.archlinux.org" > ~/.ssh/config + - echo -e "Host aur aur.archlinux.org\n User aur\n Hostname aur.archlinux.org" > ~/.ssh/config - ssh-keyscan aur.archlinux.org > ~/.ssh/known_hosts script: - - aurpublish pkg/ + # Clone AUR repo + - git clone ssh://aur@aur.archlinux.org/easy-installer.git + # Get latest TAG + - git fetch --tags + - TAG=$(git tag --list | sort -V | tail -n1) + # Clone the source /e/ repo + - git clone https://gitlab.e.foundation/e/devices/easy-installer.git -b $TAG easy-installer_src + # Copy package file from source to AUR clone + - cp -a easy-installer_src/pkg/arch/* easy-installer/ + - cp -a easy-installer_src/pkg/arch/.* easy-installer/ + # Build to check package status + - cd easy-installer/ && makepkg -sifc --noconfirm + # Generate .SRCINFO, commit and push + - cd easy-installer/ && \ + makepkg --printsrcinfo > .SRCINFO && \ + git add .SRCINFO && \ + git commit -m "$(TAG)" && \ + git push \ No newline at end of file -- GitLab From 67ea6168ad235c3148a4a34d0858b5ad4d336c3d Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Sat, 30 Apr 2022 04:57:45 +0600 Subject: [PATCH 09/78] Modify .gitlab-ci.yml to drop aurpublish --- .gitlab-ci.yml | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8d49e882..5e93e18a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,7 +17,7 @@ check-version: JAVA_VERSION_FILE: "src/main/java/ecorp/easy/installer/AppConstants.java" SNAPCRAFT_VERSION_FILE: "snap/snapcraft.yaml" WINDOWS_VERSION_FILE: "windows-installer-mui.nsi" - AUR_VERSION_FILE: "pkg/arch/.SRCINFO" + AUR_VERSION_FILE: "pkg/arch/PKGBUILD" script: - ./check-version.sh rules: @@ -107,13 +107,31 @@ publish-aur: variables: RELEASE_TYPE: beta before_script: - - pacman -Syy --noconfirm --noprogressbar --quiet aurpublish openssh + # Install required packages + - pacman -Syy --noconfirm --noprogressbar --quiet openssh git # Store the private key into the agent's memory - eval $(ssh-agent -s) - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null - # aurpublish pushes to alias 'aur', so add 'aur' to SSH configure + # Add 'aur' to SSH configure - install -m '700' -d ~/.ssh - - echo -e "Host aur\n User aur\n Hostname aur.archlinux.org" > ~/.ssh/config + - echo -e "Host aur aur.archlinux.org\n User aur\n Hostname aur.archlinux.org" > ~/.ssh/config - ssh-keyscan aur.archlinux.org > ~/.ssh/known_hosts script: - - aurpublish pkg/ + # Clone AUR repo + - git clone ssh://aur@aur.archlinux.org/easy-installer.git + # Get latest TAG + - git fetch --tags + - TAG=$(git tag --list | sort -V | tail -n1) + # Clone the source /e/ repo + - git clone https://gitlab.e.foundation/e/devices/easy-installer.git -b $TAG easy-installer_src + # Copy package file from source to AUR clone + - cp -a easy-installer_src/pkg/arch/* easy-installer/ + - cp -a easy-installer_src/pkg/arch/.* easy-installer/ + # Build to check package status + - cd easy-installer/ && makepkg -sifc --noconfirm + # Generate .SRCINFO, commit and push + - cd easy-installer/ && \ + makepkg --printsrcinfo > .SRCINFO && \ + git add .SRCINFO && \ + git commit -m "$(TAG)" && \ + git push \ No newline at end of file -- GitLab From afd2cb19538773d20c87c472ffadaa3c6f7994e9 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Sun, 1 May 2022 17:52:26 +0600 Subject: [PATCH 10/78] Modify .gitlab-ci.yml to fix multiline yml issue --- .gitlab-ci.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5e93e18a..1ccfdf5b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -130,8 +130,9 @@ publish-aur: # Build to check package status - cd easy-installer/ && makepkg -sifc --noconfirm # Generate .SRCINFO, commit and push - - cd easy-installer/ && \ - makepkg --printsrcinfo > .SRCINFO && \ - git add .SRCINFO && \ - git commit -m "$(TAG)" && \ + - | + cd easy-installer-test/ && + makepkg --printsrcinfo > .SRCINFO && + git add . && + git commit -m "$(TAG)" && git push \ No newline at end of file -- GitLab From 267dae2f5a6388e06f870f1ba11564d18d365a54 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Sun, 1 May 2022 18:03:59 +0600 Subject: [PATCH 11/78] Modify .gitlab-ci.yml to add --depth=1 modified .gitlab-ci.yml to do shallow clone of depth 1 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1ccfdf5b..5ba688d1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -123,7 +123,7 @@ publish-aur: - git fetch --tags - TAG=$(git tag --list | sort -V | tail -n1) # Clone the source /e/ repo - - git clone https://gitlab.e.foundation/e/devices/easy-installer.git -b $TAG easy-installer_src + - git clone --depth=1 https://gitlab.e.foundation/e/devices/easy-installer.git -b $TAG easy-installer_src # Copy package file from source to AUR clone - cp -a easy-installer_src/pkg/arch/* easy-installer/ - cp -a easy-installer_src/pkg/arch/.* easy-installer/ -- GitLab From fd22259135e6729a6b6d6e41c5f25bfcc090816c Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Sun, 1 May 2022 18:05:10 +0600 Subject: [PATCH 12/78] Modify .gitlab-ci.yml to remove first cp command --- .gitlab-ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5ba688d1..0c87153e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -125,8 +125,7 @@ publish-aur: # Clone the source /e/ repo - git clone --depth=1 https://gitlab.e.foundation/e/devices/easy-installer.git -b $TAG easy-installer_src # Copy package file from source to AUR clone - - cp -a easy-installer_src/pkg/arch/* easy-installer/ - - cp -a easy-installer_src/pkg/arch/.* easy-installer/ + - cp -a easy-installer_src/pkg/arch/. easy-installer/ # Build to check package status - cd easy-installer/ && makepkg -sifc --noconfirm # Generate .SRCINFO, commit and push -- GitLab From 5000ac51682fe6cccf3583696a01d6f42bef3f5f Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Sun, 1 May 2022 21:26:00 +0600 Subject: [PATCH 13/78] Modify .gitlab-ci.yml to config git for commit --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0c87153e..bc1eefef 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -116,6 +116,9 @@ publish-aur: - install -m '700' -d ~/.ssh - echo -e "Host aur aur.archlinux.org\n User aur\n Hostname aur.archlinux.org" > ~/.ssh/config - ssh-keyscan aur.archlinux.org > ~/.ssh/known_hosts + # config git + - git config --global user.email "test-user@example.com" + - git config --global user.name "Test User" script: # Clone AUR repo - git clone ssh://aur@aur.archlinux.org/easy-installer.git -- GitLab From 6ca84f552c10bf2be7593f00305c89223a865069 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Sun, 1 May 2022 21:27:34 +0600 Subject: [PATCH 14/78] Modify .gitlab-ci.yml to add test AUR repo modified .gitlab-ci.yml to add test AUR repo easy-installer-test --- .gitlab-ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bc1eefef..99547081 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -121,12 +121,14 @@ publish-aur: - git config --global user.name "Test User" script: # Clone AUR repo - - git clone ssh://aur@aur.archlinux.org/easy-installer.git + # the repo easy-installer-test is added for testing + # - git clone ssh://aur@aur.archlinux.org/easy-installer.git + - git clone ssh://aur@aur.archlinux.org/easy-installer-test.git # Get latest TAG - git fetch --tags - TAG=$(git tag --list | sort -V | tail -n1) # Clone the source /e/ repo - - git clone --depth=1 https://gitlab.e.foundation/e/devices/easy-installer.git -b $TAG easy-installer_src + - git clone --depth=1 https://gitlab.e.foundation/e/tools/easy-installer.git -b $TAG easy-installer-src # Copy package file from source to AUR clone - cp -a easy-installer_src/pkg/arch/. easy-installer/ # Build to check package status -- GitLab From 825e1f9c5d98c16fa67652cba7cf076ba102c3db Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Sun, 1 May 2022 21:28:53 +0600 Subject: [PATCH 15/78] Modify .gitlab-ci.yml to copy pkg file from src to AUR --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 99547081..0fdf86da 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -130,7 +130,8 @@ publish-aur: # Clone the source /e/ repo - git clone --depth=1 https://gitlab.e.foundation/e/tools/easy-installer.git -b $TAG easy-installer-src # Copy package file from source to AUR clone - - cp -a easy-installer_src/pkg/arch/. easy-installer/ + # change the easy-installer-test/ to easy-installer in prod! + - cp -a easy-installer-src/pkg/arch/. easy-installer-test/ # Build to check package status - cd easy-installer/ && makepkg -sifc --noconfirm # Generate .SRCINFO, commit and push -- GitLab From 95dcf5e7d2c3b3e618eb37ebcebbbb27c7f92a31 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Sun, 1 May 2022 21:30:14 +0600 Subject: [PATCH 16/78] Modify .gitlab-ci.yml to remove Build to check --- .gitlab-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0fdf86da..c1ab4658 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -132,8 +132,6 @@ publish-aur: # Copy package file from source to AUR clone # change the easy-installer-test/ to easy-installer in prod! - cp -a easy-installer-src/pkg/arch/. easy-installer-test/ - # Build to check package status - - cd easy-installer/ && makepkg -sifc --noconfirm # Generate .SRCINFO, commit and push - | cd easy-installer-test/ && -- GitLab From a4b6ce979c6829cb906f95e45b7f5fd01be11ffe Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Sun, 1 May 2022 21:31:50 +0600 Subject: [PATCH 17/78] Modify .gitlab-ci.yml to generate data and push to AUR --- .gitlab-ci.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c1ab4658..760159f1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -132,10 +132,18 @@ publish-aur: # Copy package file from source to AUR clone # change the easy-installer-test/ to easy-installer in prod! - cp -a easy-installer-src/pkg/arch/. easy-installer-test/ - # Generate .SRCINFO, commit and push + # Generate add, commit and push - | cd easy-installer-test/ && - makepkg --printsrcinfo > .SRCINFO && + #following 7 line lines are added to make the test repo + # easy-installer-test work. remove these in prod! + sed -i "s/^pkgname=.*/pkgname=easy-installer-test/g" PKGBUILD && + sed -i "s/^pkgver=.*/pkgver=0.0.1/g" PKGBUILD && + sed -i "s/^pkgrel=.*/pkgrel=1/g" PKGBUILD && + sed -i "s|pkgbase = .*|pkgbase = easy-installer-test|" .SRCINFO && + sed -i "s|pkgver = .*|pkgver = 0.0.1|" .SRCINFO && + sed -i "s|pkgrel = .*|pkgrel = 1|" .SRCINFO && + sed -i "s|pkgname = .*|pkgname = easy-installer-test|" .SRCINFO && git add . && - git commit -m "$(TAG)" && + git commit -m "$TAG" && git push \ No newline at end of file -- GitLab From 3d62dc0b720ac9fa9fa1f35b017c4a42bc366728 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Sun, 1 May 2022 22:10:33 +0600 Subject: [PATCH 18/78] Modify .gitlab-ci.yml to comment out other jobs --- .gitlab-ci.yml | 142 ++++++++++++++++++++++++------------------------- 1 file changed, 71 insertions(+), 71 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 760159f1..a1cb9e4e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,82 +24,82 @@ check-version: - if: '$CI_COMMIT_TAG' when: always -build-docker: - image: docker:19 - stage: prepare - services: - - docker:19-dind - tags: - - generic_privileged - variables: - DOCKER_DRIVER: overlay2 - script: - - docker pull $CONTAINER_IMAGE:$CONTAINER_TAG || true - - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.e.foundation - - docker build --cache-from $CONTAINER_IMAGE:$CONTAINER_TAG -t $CONTAINER_IMAGE:$CONTAINER_TAG . - - docker push $CONTAINER_IMAGE:$CONTAINER_TAG +# build-docker: +# image: docker:19 +# stage: prepare +# services: +# - docker:19-dind +# tags: +# - generic_privileged +# variables: +# DOCKER_DRIVER: overlay2 +# script: +# - docker pull $CONTAINER_IMAGE:$CONTAINER_TAG || true +# - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.e.foundation +# - docker build --cache-from $CONTAINER_IMAGE:$CONTAINER_TAG -t $CONTAINER_IMAGE:$CONTAINER_TAG . +# - docker push $CONTAINER_IMAGE:$CONTAINER_TAG -build-ubuntu: - image: registry.gitlab.e.foundation/e/devices/easy-installer:stable - stage: build - variables: - GIT_SUBMODULE_STRATEGY: recursive - script: - - snapcraft - - ls - artifacts: - name: "easy-installer" - paths: - - easy-installer*.snap +# build-ubuntu: +# image: registry.gitlab.e.foundation/e/devices/easy-installer:stable +# stage: build +# variables: +# GIT_SUBMODULE_STRATEGY: recursive +# script: +# - snapcraft +# - ls +# artifacts: +# name: "easy-installer" +# paths: +# - easy-installer*.snap -build-windows: - image: registry.gitlab.e.foundation/e/devices/easy-installer:stable - stage: build - variables: - GIT_SUBMODULE_STRATEGY: recursive - script: - - ./gradlew jlink -Pkey="$PEPPER" - - makensis windows-installer-mui.nsi - - sha256sum Easy-installer-setup.exe > Easy-installer-setup.exe.sha256sum - artifacts: - name: "easy-installer-windows" - paths: - - Easy-installer-setup.exe - - Easy-installer-setup.exe.sha256sum +# build-windows: +# image: registry.gitlab.e.foundation/e/devices/easy-installer:stable +# stage: build +# variables: +# GIT_SUBMODULE_STRATEGY: recursive +# script: +# - ./gradlew jlink -Pkey="$PEPPER" +# - makensis windows-installer-mui.nsi +# - sha256sum Easy-installer-setup.exe > Easy-installer-setup.exe.sha256sum +# artifacts: +# name: "easy-installer-windows" +# paths: +# - Easy-installer-setup.exe +# - Easy-installer-setup.exe.sha256sum -publish-ubuntu: - image: registry.gitlab.e.foundation/e/devices/easy-installer:stable - stage: publish - variables: - RELEASE_TYPE: beta - script: - - echo ${SNAPCRAFT_LOGIN_FILE} | base64 -d > snapcraft.login && snapcraft login --with snapcraft.login - - snapcraft push *.snap --release $RELEASE_TYPE - - snapcraft logout && rm snapcraft.login - rules: - - if: '$CI_COMMIT_TAG' - when: manual +# publish-ubuntu: +# image: registry.gitlab.e.foundation/e/devices/easy-installer:stable +# stage: publish +# variables: +# RELEASE_TYPE: beta +# script: +# - echo ${SNAPCRAFT_LOGIN_FILE} | base64 -d > snapcraft.login && snapcraft login --with snapcraft.login +# - snapcraft push *.snap --release $RELEASE_TYPE +# - snapcraft logout && rm snapcraft.login +# rules: +# - if: '$CI_COMMIT_TAG' +# when: manual -publish-windows: - image: registry.gitlab.e.foundation/e/devices/easy-installer:stable - stage: publish - variables: - RELEASE_TYPE: beta - before_script: - - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' - - eval $(ssh-agent -s) - - echo "$SSH_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 - script: - - "rsync -avz Easy-installer-setup.exe* $PUBLISH_USER@$PUBLISH_URL:$PUBLISH_DEST" - - ssh $PUBLISH_USER@$PUBLISH_URL "mv $PUBLISH_DEST/* $RELEASE_DEST/" - rules: - - if: '$CI_COMMIT_TAG' - when: manual +# publish-windows: +# image: registry.gitlab.e.foundation/e/devices/easy-installer:stable +# stage: publish +# variables: +# RELEASE_TYPE: beta +# before_script: +# - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' +# - eval $(ssh-agent -s) +# - echo "$SSH_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 +# script: +# - "rsync -avz Easy-installer-setup.exe* $PUBLISH_USER@$PUBLISH_URL:$PUBLISH_DEST" +# - ssh $PUBLISH_USER@$PUBLISH_URL "mv $PUBLISH_DEST/* $RELEASE_DEST/" +# rules: +# - if: '$CI_COMMIT_TAG' +# when: manual publish-aur: image: archlinux:latest -- GitLab From dbd3902e5735ddcc9154c381f990ec498fd39722 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Sun, 1 May 2022 22:14:29 +0600 Subject: [PATCH 19/78] Modify .gitlab-ci.yml to change pkgrel from 1 to 2 --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a1cb9e4e..78ab2fea 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -139,10 +139,10 @@ publish-aur: # easy-installer-test work. remove these in prod! sed -i "s/^pkgname=.*/pkgname=easy-installer-test/g" PKGBUILD && sed -i "s/^pkgver=.*/pkgver=0.0.1/g" PKGBUILD && - sed -i "s/^pkgrel=.*/pkgrel=1/g" PKGBUILD && + sed -i "s/^pkgrel=.*/pkgrel=2/g" PKGBUILD && sed -i "s|pkgbase = .*|pkgbase = easy-installer-test|" .SRCINFO && sed -i "s|pkgver = .*|pkgver = 0.0.1|" .SRCINFO && - sed -i "s|pkgrel = .*|pkgrel = 1|" .SRCINFO && + sed -i "s|pkgrel = .*|pkgrel = 2|" .SRCINFO && sed -i "s|pkgname = .*|pkgname = easy-installer-test|" .SRCINFO && git add . && git commit -m "$TAG" && -- GitLab From 3ebc1fc96790b3b061fb6807aa5ffbcb99664926 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Mon, 9 May 2022 19:37:20 +0600 Subject: [PATCH 20/78] Modify .gitlab-ci.yml to add pipeline for test AUR --- .gitlab-ci.yml | 144 ++++++++++++++++++++++++------------------------- 1 file changed, 72 insertions(+), 72 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 78ab2fea..38d1af04 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,82 +24,82 @@ check-version: - if: '$CI_COMMIT_TAG' when: always -# build-docker: -# image: docker:19 -# stage: prepare -# services: -# - docker:19-dind -# tags: -# - generic_privileged -# variables: -# DOCKER_DRIVER: overlay2 -# script: -# - docker pull $CONTAINER_IMAGE:$CONTAINER_TAG || true -# - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.e.foundation -# - docker build --cache-from $CONTAINER_IMAGE:$CONTAINER_TAG -t $CONTAINER_IMAGE:$CONTAINER_TAG . -# - docker push $CONTAINER_IMAGE:$CONTAINER_TAG +build-docker: + image: docker:19 + stage: prepare + services: + - docker:19-dind + tags: + - generic_privileged + variables: + DOCKER_DRIVER: overlay2 + script: + - docker pull $CONTAINER_IMAGE:$CONTAINER_TAG || true + - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.e.foundation + - docker build --cache-from $CONTAINER_IMAGE:$CONTAINER_TAG -t $CONTAINER_IMAGE:$CONTAINER_TAG . + - docker push $CONTAINER_IMAGE:$CONTAINER_TAG -# build-ubuntu: -# image: registry.gitlab.e.foundation/e/devices/easy-installer:stable -# stage: build -# variables: -# GIT_SUBMODULE_STRATEGY: recursive -# script: -# - snapcraft -# - ls -# artifacts: -# name: "easy-installer" -# paths: -# - easy-installer*.snap +build-ubuntu: + image: registry.gitlab.e.foundation/e/devices/easy-installer:stable + stage: build + variables: + GIT_SUBMODULE_STRATEGY: recursive + script: + - snapcraft + - ls + artifacts: + name: "easy-installer" + paths: + - easy-installer*.snap -# build-windows: -# image: registry.gitlab.e.foundation/e/devices/easy-installer:stable -# stage: build -# variables: -# GIT_SUBMODULE_STRATEGY: recursive -# script: -# - ./gradlew jlink -Pkey="$PEPPER" -# - makensis windows-installer-mui.nsi -# - sha256sum Easy-installer-setup.exe > Easy-installer-setup.exe.sha256sum -# artifacts: -# name: "easy-installer-windows" -# paths: -# - Easy-installer-setup.exe -# - Easy-installer-setup.exe.sha256sum +build-windows: + image: registry.gitlab.e.foundation/e/devices/easy-installer:stable + stage: build + variables: + GIT_SUBMODULE_STRATEGY: recursive + script: + - ./gradlew jlink -Pkey="$PEPPER" + - makensis windows-installer-mui.nsi + - sha256sum Easy-installer-setup.exe > Easy-installer-setup.exe.sha256sum + artifacts: + name: "easy-installer-windows" + paths: + - Easy-installer-setup.exe + - Easy-installer-setup.exe.sha256sum -# publish-ubuntu: -# image: registry.gitlab.e.foundation/e/devices/easy-installer:stable -# stage: publish -# variables: -# RELEASE_TYPE: beta -# script: -# - echo ${SNAPCRAFT_LOGIN_FILE} | base64 -d > snapcraft.login && snapcraft login --with snapcraft.login -# - snapcraft push *.snap --release $RELEASE_TYPE -# - snapcraft logout && rm snapcraft.login -# rules: -# - if: '$CI_COMMIT_TAG' -# when: manual +publish-ubuntu: + image: registry.gitlab.e.foundation/e/devices/easy-installer:stable + stage: publish + variables: + RELEASE_TYPE: beta + script: + - echo ${SNAPCRAFT_LOGIN_FILE} | base64 -d > snapcraft.login && snapcraft login --with snapcraft.login + - snapcraft push *.snap --release $RELEASE_TYPE + - snapcraft logout && rm snapcraft.login + rules: + - if: '$CI_COMMIT_TAG' + when: manual -# publish-windows: -# image: registry.gitlab.e.foundation/e/devices/easy-installer:stable -# stage: publish -# variables: -# RELEASE_TYPE: beta -# before_script: -# - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' -# - eval $(ssh-agent -s) -# - echo "$SSH_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 -# script: -# - "rsync -avz Easy-installer-setup.exe* $PUBLISH_USER@$PUBLISH_URL:$PUBLISH_DEST" -# - ssh $PUBLISH_USER@$PUBLISH_URL "mv $PUBLISH_DEST/* $RELEASE_DEST/" -# rules: -# - if: '$CI_COMMIT_TAG' -# when: manual +publish-windows: + image: registry.gitlab.e.foundation/e/devices/easy-installer:stable + stage: publish + variables: + RELEASE_TYPE: beta + before_script: + - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' + - eval $(ssh-agent -s) + - echo "$SSH_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 + script: + - "rsync -avz Easy-installer-setup.exe* $PUBLISH_USER@$PUBLISH_URL:$PUBLISH_DEST" + - ssh $PUBLISH_USER@$PUBLISH_URL "mv $PUBLISH_DEST/* $RELEASE_DEST/" + rules: + - if: '$CI_COMMIT_TAG' + when: manual publish-aur: image: archlinux:latest @@ -146,4 +146,4 @@ publish-aur: sed -i "s|pkgname = .*|pkgname = easy-installer-test|" .SRCINFO && git add . && git commit -m "$TAG" && - git push \ No newline at end of file + git push -- GitLab From efd44a668f0ea5dae2040b463085ae3f54aea2ab Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Mon, 9 May 2022 22:26:27 +0600 Subject: [PATCH 21/78] Add Dockerfile.arch for modified arch image --- Dockerfile.arch | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Dockerfile.arch diff --git a/Dockerfile.arch b/Dockerfile.arch new file mode 100644 index 00000000..edd50118 --- /dev/null +++ b/Dockerfile.arch @@ -0,0 +1,10 @@ +FROM archlinux/archlinux + +RUN pacman -Syu --noconfirm && yes | pacman -Scc && rm -fr /var/lib/pacman/sync/* + +# requirements for packaging +RUN pacman -S --noconfirm base-devel git + +# Add a non-root user +RUN adduser -D builder +USER builder \ No newline at end of file -- GitLab From 0ff6332ace2888d839890674e30da823f9c32340 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Tue, 10 May 2022 16:25:22 +0600 Subject: [PATCH 22/78] Modify .gitlab-ci.yml to change git user and email --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 38d1af04..236a3b85 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -117,8 +117,8 @@ publish-aur: - echo -e "Host aur aur.archlinux.org\n User aur\n Hostname aur.archlinux.org" > ~/.ssh/config - ssh-keyscan aur.archlinux.org > ~/.ssh/known_hosts # config git - - git config --global user.email "test-user@example.com" - - git config --global user.name "Test User" + - git config --global user.email "dev@e.email" + - git config --global user.name "efoundation" script: # Clone AUR repo # the repo easy-installer-test is added for testing -- GitLab From cf515d7053e203f4e922a9a668f2114e4dd50f9c Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Wed, 11 May 2022 12:24:59 +0600 Subject: [PATCH 23/78] Modify .gitlab-ci.yml to remove test repo --- .gitlab-ci.yml | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 236a3b85..54484deb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -52,7 +52,6 @@ build-ubuntu: paths: - easy-installer*.snap - build-windows: image: registry.gitlab.e.foundation/e/devices/easy-installer:stable stage: build @@ -123,7 +122,7 @@ publish-aur: # Clone AUR repo # the repo easy-installer-test is added for testing # - git clone ssh://aur@aur.archlinux.org/easy-installer.git - - git clone ssh://aur@aur.archlinux.org/easy-installer-test.git + - git clone ssh://aur@aur.archlinux.org/easy-installer.git # Get latest TAG - git fetch --tags - TAG=$(git tag --list | sort -V | tail -n1) @@ -131,19 +130,10 @@ publish-aur: - git clone --depth=1 https://gitlab.e.foundation/e/tools/easy-installer.git -b $TAG easy-installer-src # Copy package file from source to AUR clone # change the easy-installer-test/ to easy-installer in prod! - - cp -a easy-installer-src/pkg/arch/. easy-installer-test/ + - cp -a easy-installer-src/pkg/arch/. easy-installer/ # Generate add, commit and push - | - cd easy-installer-test/ && - #following 7 line lines are added to make the test repo - # easy-installer-test work. remove these in prod! - sed -i "s/^pkgname=.*/pkgname=easy-installer-test/g" PKGBUILD && - sed -i "s/^pkgver=.*/pkgver=0.0.1/g" PKGBUILD && - sed -i "s/^pkgrel=.*/pkgrel=2/g" PKGBUILD && - sed -i "s|pkgbase = .*|pkgbase = easy-installer-test|" .SRCINFO && - sed -i "s|pkgver = .*|pkgver = 0.0.1|" .SRCINFO && - sed -i "s|pkgrel = .*|pkgrel = 2|" .SRCINFO && - sed -i "s|pkgname = .*|pkgname = easy-installer-test|" .SRCINFO && + cd easy-installer/ && git add . && git commit -m "$TAG" && git push -- GitLab From 1691eacdd588fecba5ddcce82e0e53102ee40e92 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Wed, 11 May 2022 12:25:54 +0600 Subject: [PATCH 24/78] Modify .gitlab-ci.yml to add build-aur modified .gitlab-ci.yml to add build-aur which is using an modified archlinux docker image it will clone the AUR repo clone the easy-installer source repo copy arch package files from source repo to AUR reop build package --- .gitlab-ci.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 54484deb..9029d876 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -67,6 +67,26 @@ build-windows: - Easy-installer-setup.exe - Easy-installer-setup.exe.sha256sum +build-aur: + # a temporery docker hub account to test the pipeline + image: rlsbjppr/east-installer:latest + stage: build + # tentavie steps: + # - [x] the arch image should have all the build time dependencies installed + # - [x] copy the file from gitlab src repo + # - [ ] build + # - [ ] if build successful, on publish configuer AUR ssh, copy file from src to aur, git add, commit with all change and git push + + before_script: + - git clone https://aur.archlinux.org/easy-installer.git /home/builder/easy-installer + - git clone --depth=1 https://gitlab.e.foundation/e/tools/easy-installer.git /home/builder/easy-installer-src + - cp -a /home/builder/easy-installer-src/pkg/arch/. /home/builder/easy-installer + # - git clone --depth=1 https://gitlab.e.foundation/e/tools/easy-installer.git -b $TAG /home/builder/easy-installer-src + # need an way to grab latest TAG + + script: + - cd /home/builder/easy-installer && makepkg -sifc --noconfirm + publish-ubuntu: image: registry.gitlab.e.foundation/e/devices/easy-installer:stable stage: publish -- GitLab From 030854f0c20ffa6c2880d061fd2392428e4b8a0a Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Wed, 11 May 2022 15:44:28 +0600 Subject: [PATCH 25/78] move Dockerfile.arch to docker folder --- Dockerfile.arch | 10 ---------- docker/Dockerfile.arch | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 10 deletions(-) delete mode 100644 Dockerfile.arch create mode 100644 docker/Dockerfile.arch diff --git a/Dockerfile.arch b/Dockerfile.arch deleted file mode 100644 index edd50118..00000000 --- a/Dockerfile.arch +++ /dev/null @@ -1,10 +0,0 @@ -FROM archlinux/archlinux - -RUN pacman -Syu --noconfirm && yes | pacman -Scc && rm -fr /var/lib/pacman/sync/* - -# requirements for packaging -RUN pacman -S --noconfirm base-devel git - -# Add a non-root user -RUN adduser -D builder -USER builder \ No newline at end of file diff --git a/docker/Dockerfile.arch b/docker/Dockerfile.arch new file mode 100644 index 00000000..7f159289 --- /dev/null +++ b/docker/Dockerfile.arch @@ -0,0 +1,36 @@ +FROM archlinux/archlinux + +# update pacman db and install sudo +RUN echo "Server = http://mirrors.kernel.org/archlinux/\$repo/os/\$arch" > /etc/pacman.d/mirrorlist + +# update pacman and install sudo +RUN pacman -Syyu --noconfirm && \ + pacman -Syy --noconfirm --noprogressbar sudo && \ + yes | pacman -Scc && rm -fr /var/lib/pacman/sync/*1 + +# add a non-root user +RUN useradd -m builder && \ + # Allow builder to run stuff as root (to install dependencies): + echo "builder ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers + +# make /home/builder working directory +WORKDIR /home/builder + +# run as user +USER builder + +# install build dependencies +# need a clean process to install dependecies for package, this is messy and bearly works 🤢 +# curl -o '/home/builder/pkg/easy-installer.8.md' https://gitlab.e.foundation/e/devices/easy-installer/-/raw/master/pkg/arch/easy-installer.8.md && \ + +RUN mkdir /home/builder/pkg &&\ + curl -o '/home/builder/pkg/PKGBUILD' https://gitlab.e.foundation/e/devices/easy-installer/-/raw/master/pkg/arch/PKGBUILD && \ + cd /home/builder/pkg/ && \ + sudo pacman -Syyu --noconfirm && \ + sudo pacman -Syy --noconfirm --noprogressbar base-devel git openssh && \ + yes | makepkg -seo && \ + yes | sudo pacman -Scc && sudo rm -fr /var/lib/pacman/sync/*1 + +RUN sudo rm -rf /home/builder/pkg/ + +CMD ["/usr/bin/bash"] \ No newline at end of file -- GitLab From e3ffad39e70117b7f86222621ae59c36c9b508d0 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Wed, 11 May 2022 17:02:49 +0600 Subject: [PATCH 26/78] Modify Dockerfile.arch to add comment and do clean up --- docker/Dockerfile.arch | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docker/Dockerfile.arch b/docker/Dockerfile.arch index 7f159289..13f0e6e8 100644 --- a/docker/Dockerfile.arch +++ b/docker/Dockerfile.arch @@ -8,9 +8,8 @@ RUN pacman -Syyu --noconfirm && \ pacman -Syy --noconfirm --noprogressbar sudo && \ yes | pacman -Scc && rm -fr /var/lib/pacman/sync/*1 -# add a non-root user +# add a non-root user and allowing running as root with password RUN useradd -m builder && \ - # Allow builder to run stuff as root (to install dependencies): echo "builder ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers # make /home/builder working directory @@ -21,8 +20,6 @@ USER builder # install build dependencies # need a clean process to install dependecies for package, this is messy and bearly works 🤢 -# curl -o '/home/builder/pkg/easy-installer.8.md' https://gitlab.e.foundation/e/devices/easy-installer/-/raw/master/pkg/arch/easy-installer.8.md && \ - RUN mkdir /home/builder/pkg &&\ curl -o '/home/builder/pkg/PKGBUILD' https://gitlab.e.foundation/e/devices/easy-installer/-/raw/master/pkg/arch/PKGBUILD && \ cd /home/builder/pkg/ && \ @@ -31,6 +28,7 @@ RUN mkdir /home/builder/pkg &&\ yes | makepkg -seo && \ yes | sudo pacman -Scc && sudo rm -fr /var/lib/pacman/sync/*1 +# remove files after installing dependecies RUN sudo rm -rf /home/builder/pkg/ CMD ["/usr/bin/bash"] \ No newline at end of file -- GitLab From f17ed8178688850ef510b4af9bf4b8346c24510b Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Wed, 11 May 2022 17:05:45 +0600 Subject: [PATCH 27/78] [skip ci] Finish build-aur -- GitLab From f80f21d04bfda854bb3d09c8d2fa742e91c90e7a Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Wed, 11 May 2022 21:12:39 +0600 Subject: [PATCH 28/78] Modify Dockerfile.arch to remove local mirror --- docker/Dockerfile.arch | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docker/Dockerfile.arch b/docker/Dockerfile.arch index 13f0e6e8..0fa2423f 100644 --- a/docker/Dockerfile.arch +++ b/docker/Dockerfile.arch @@ -1,8 +1,5 @@ FROM archlinux/archlinux -# update pacman db and install sudo -RUN echo "Server = http://mirrors.kernel.org/archlinux/\$repo/os/\$arch" > /etc/pacman.d/mirrorlist - # update pacman and install sudo RUN pacman -Syyu --noconfirm && \ pacman -Syy --noconfirm --noprogressbar sudo && \ @@ -19,7 +16,6 @@ WORKDIR /home/builder USER builder # install build dependencies -# need a clean process to install dependecies for package, this is messy and bearly works 🤢 RUN mkdir /home/builder/pkg &&\ curl -o '/home/builder/pkg/PKGBUILD' https://gitlab.e.foundation/e/devices/easy-installer/-/raw/master/pkg/arch/PKGBUILD && \ cd /home/builder/pkg/ && \ -- GitLab From 58c9fd47014086259fce948bea902c61b71702c4 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Wed, 11 May 2022 21:14:20 +0600 Subject: [PATCH 29/78] Modify .gitlab-ci.yml to add temporary docker image --- .gitlab-ci.yml | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9029d876..62b85b8e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,6 +10,9 @@ stages: variables: CONTAINER_IMAGE: registry.gitlab.e.foundation/e/devices/easy-installer CONTAINER_TAG: stable + # temporary docker image, replace when build-aur-docker job pushes to GitLab registry + AUR_CONTAINER_IMAGE: rlsbjppr/east-installer + AUR_CONTAINER_TAG: latest check-version: stage: test @@ -68,22 +71,11 @@ build-windows: - Easy-installer-setup.exe.sha256sum build-aur: - # a temporery docker hub account to test the pipeline - image: rlsbjppr/east-installer:latest + image: $AUR_CONTAINER_IMAGE:$AUR_CONTAINER_TAG stage: build - # tentavie steps: - # - [x] the arch image should have all the build time dependencies installed - # - [x] copy the file from gitlab src repo - # - [ ] build - # - [ ] if build successful, on publish configuer AUR ssh, copy file from src to aur, git add, commit with all change and git push - before_script: - - git clone https://aur.archlinux.org/easy-installer.git /home/builder/easy-installer - - git clone --depth=1 https://gitlab.e.foundation/e/tools/easy-installer.git /home/builder/easy-installer-src - - cp -a /home/builder/easy-installer-src/pkg/arch/. /home/builder/easy-installer - # - git clone --depth=1 https://gitlab.e.foundation/e/tools/easy-installer.git -b $TAG /home/builder/easy-installer-src - # need an way to grab latest TAG - + - git clone --depth=1 https://gitlab.e.foundation/e/tools/easy-installer.git -b $CI_COMMIT_TAG /home/builder/easy-installer-src + - mkdir easy-installer && cp -a /home/builder/easy-installer-src/pkg/arch/. /home/builder/easy-installer script: - cd /home/builder/easy-installer && makepkg -sifc --noconfirm -- GitLab From 02d9b621260672ff71f4613a98e247607ee67e4e Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Wed, 11 May 2022 21:20:06 +0600 Subject: [PATCH 30/78] Modify .gitlab-ci.yml to add artifacts for build-aur job --- .gitlab-ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 62b85b8e..8099a961 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -78,6 +78,10 @@ build-aur: - mkdir easy-installer && cp -a /home/builder/easy-installer-src/pkg/arch/. /home/builder/easy-installer script: - cd /home/builder/easy-installer && makepkg -sifc --noconfirm + artifacts: + name: "easy-installer" + paths: + - easy-installer*.tar.zst publish-ubuntu: image: registry.gitlab.e.foundation/e/devices/easy-installer:stable -- GitLab From 6e5f0adf3d16dd2dc02489148ecba239165bdf25 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Wed, 11 May 2022 21:21:11 +0600 Subject: [PATCH 31/78] Modify .gitlab-ci.yml to add build-aur-test to test build-aur --- .gitlab-ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8099a961..c4bfe37f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -83,6 +83,14 @@ build-aur: paths: - easy-installer*.tar.zst +build-aur-test: + extends: + - build-aur + environment: + name: aur-test + variables: + CI_COMMIT_TAG: v0.13.4-beta + publish-ubuntu: image: registry.gitlab.e.foundation/e/devices/easy-installer:stable stage: publish -- GitLab From ecc761da0a241e41efe0ae14443ee73125ec9974 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Wed, 11 May 2022 21:22:19 +0600 Subject: [PATCH 32/78] change image to use container variable --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c4bfe37f..a0e69cd9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -125,7 +125,7 @@ publish-windows: when: manual publish-aur: - image: archlinux:latest + image: $AUR_CONTAINER_IMAGE:$AUR_CONTAINER_TAG stage: publish variables: RELEASE_TYPE: beta -- GitLab From 7d56633b5d048f1fea16868461527edfc729a05a Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Wed, 11 May 2022 21:23:52 +0600 Subject: [PATCH 33/78] remove package installation as this is done in Dockerfile --- .gitlab-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a0e69cd9..4f45e65b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -130,8 +130,6 @@ publish-aur: variables: RELEASE_TYPE: beta before_script: - # Install required packages - - pacman -Syy --noconfirm --noprogressbar --quiet openssh git # Store the private key into the agent's memory - eval $(ssh-agent -s) - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null -- GitLab From 7d2431dc374467305731a37f58e3b9dd3ea48f17 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Wed, 11 May 2022 21:24:54 +0600 Subject: [PATCH 34/78] replace git user and email with CI variable --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4f45e65b..9e01f8a5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -138,8 +138,8 @@ publish-aur: - echo -e "Host aur aur.archlinux.org\n User aur\n Hostname aur.archlinux.org" > ~/.ssh/config - ssh-keyscan aur.archlinux.org > ~/.ssh/known_hosts # config git - - git config --global user.email "dev@e.email" - - git config --global user.name "efoundation" + - git config --global user.email "$PUBLISH_USER_EMAIL" + - git config --global user.name "$PUBLISH_USER" script: # Clone AUR repo # the repo easy-installer-test is added for testing -- GitLab From 3a254aa05d9562cdefa10ef05329827d1ab13788 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Wed, 11 May 2022 21:25:58 +0600 Subject: [PATCH 35/78] replace repo name with with CI variable --- .gitlab-ci.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9e01f8a5..a97870bf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -142,20 +142,17 @@ publish-aur: - git config --global user.name "$PUBLISH_USER" script: # Clone AUR repo - # the repo easy-installer-test is added for testing - # - git clone ssh://aur@aur.archlinux.org/easy-installer.git - - git clone ssh://aur@aur.archlinux.org/easy-installer.git + - git clone ssh://aur@aur.archlinux.org/$PUBLISH_DEST.git # Get latest TAG - git fetch --tags - TAG=$(git tag --list | sort -V | tail -n1) # Clone the source /e/ repo - git clone --depth=1 https://gitlab.e.foundation/e/tools/easy-installer.git -b $TAG easy-installer-src # Copy package file from source to AUR clone - # change the easy-installer-test/ to easy-installer in prod! - - cp -a easy-installer-src/pkg/arch/. easy-installer/ + - cp -a easy-installer-src/pkg/arch/. $PUBLISH_DEST/ # Generate add, commit and push - | - cd easy-installer/ && + cd $PUBLISH_DEST/ && git add . && git commit -m "$TAG" && git push -- GitLab From 96c0af88ba64ff9ade0710e55fd5433d695d0fb0 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Wed, 11 May 2022 21:28:59 +0600 Subject: [PATCH 36/78] generate .SRCINFO --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a97870bf..05738af1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -153,6 +153,7 @@ publish-aur: # Generate add, commit and push - | cd $PUBLISH_DEST/ && + makepkg --printsrcinfo > .SRCINFO && git add . && git commit -m "$TAG" && git push -- GitLab From ed03daa6595fb9fb02617cb60912ac885935f4e9 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Wed, 11 May 2022 21:32:42 +0600 Subject: [PATCH 37/78] replace TAG with CI var CI_COMMIT_TAG --- .gitlab-ci.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 05738af1..48204b9e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -143,11 +143,8 @@ publish-aur: script: # Clone AUR repo - git clone ssh://aur@aur.archlinux.org/$PUBLISH_DEST.git - # Get latest TAG - - git fetch --tags - - TAG=$(git tag --list | sort -V | tail -n1) # Clone the source /e/ repo - - git clone --depth=1 https://gitlab.e.foundation/e/tools/easy-installer.git -b $TAG easy-installer-src + - git clone --depth=1 https://gitlab.e.foundation/e/tools/easy-installer.git -b $CI_COMMIT_TAG easy-installer-src # Copy package file from source to AUR clone - cp -a easy-installer-src/pkg/arch/. $PUBLISH_DEST/ # Generate add, commit and push -- GitLab From 1227dd00bd64a6900357b0b9fcb447328cc43d39 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Wed, 11 May 2022 21:45:04 +0600 Subject: [PATCH 38/78] add publish-aur-test to test publish-aur --- .gitlab-ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 48204b9e..a8bf8f58 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -154,3 +154,9 @@ publish-aur: git add . && git commit -m "$TAG" && git push + +publish-aur-test: + extends: + - publish-aur + environment: + name: aur-test \ No newline at end of file -- GitLab From 52759d365f4b5142701ded51bf49f8fd1696e421 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Wed, 11 May 2022 21:45:41 +0600 Subject: [PATCH 39/78] remove hard coded variables --- .gitlab-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a8bf8f58..c732bb43 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -88,8 +88,6 @@ build-aur-test: - build-aur environment: name: aur-test - variables: - CI_COMMIT_TAG: v0.13.4-beta publish-ubuntu: image: registry.gitlab.e.foundation/e/devices/easy-installer:stable -- GitLab From 7975b5029bb8f795f2f549e452bbd32b629bd378 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Thu, 12 May 2022 11:41:16 +0600 Subject: [PATCH 40/78] add skeleton code for build-aur-docker --- .gitlab-ci.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c732bb43..5e9648d3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -42,6 +42,26 @@ build-docker: - docker build --cache-from $CONTAINER_IMAGE:$CONTAINER_TAG -t $CONTAINER_IMAGE:$CONTAINER_TAG . - docker push $CONTAINER_IMAGE:$CONTAINER_TAG +build-aur-docker: +# skeleton code for building AUR docker image +# to do: +# - [] if not exist build image from docker/Dockerfile.arch +# - [] tag image +# - [] push image as sub image + image: docker:19 + stage: prepare + services: + - docker:19-dind + tags: + - generic_privileged + variables: + DOCKER_DRIVER: overlay2 + script: + - docker pull $CONTAINER_IMAGE:$CONTAINER_TAG || true + - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.e.foundation + - docker build --cache-from $CONTAINER_IMAGE:$CONTAINER_TAG -t $CONTAINER_IMAGE:$CONTAINER_TAG . + - docker push $CONTAINER_IMAGE:$CONTAINER_TAG + build-ubuntu: image: registry.gitlab.e.foundation/e/devices/easy-installer:stable stage: build -- GitLab From 2848ada93eb0f3ced580eb8662d5afaf8267ecac Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Thu, 12 May 2022 12:38:29 +0600 Subject: [PATCH 41/78] change sub image /aur and specify docker file --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5e9648d3..50635dd4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -37,9 +37,9 @@ build-docker: variables: DOCKER_DRIVER: overlay2 script: - - docker pull $CONTAINER_IMAGE:$CONTAINER_TAG || true + - docker pull $CONTAINER_IMAGE/aur:$CONTAINER_TAG || true - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.e.foundation - - docker build --cache-from $CONTAINER_IMAGE:$CONTAINER_TAG -t $CONTAINER_IMAGE:$CONTAINER_TAG . + - cd docker && docker build --cache-from $CONTAINER_IMAGE/aur:$CONTAINER_TAG -f Dockerfile.arch -t $CONTAINER_IMAGE/aur:$CONTAINER_TAG . - docker push $CONTAINER_IMAGE:$CONTAINER_TAG build-aur-docker: -- GitLab From 7b31232a541096656edd3233db1173a516eda0ae Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Thu, 12 May 2022 13:55:59 +0600 Subject: [PATCH 42/78] comment out the temp docker image --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 50635dd4..875c5fe0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,8 +11,8 @@ variables: CONTAINER_IMAGE: registry.gitlab.e.foundation/e/devices/easy-installer CONTAINER_TAG: stable # temporary docker image, replace when build-aur-docker job pushes to GitLab registry - AUR_CONTAINER_IMAGE: rlsbjppr/east-installer - AUR_CONTAINER_TAG: latest + #AUR_CONTAINER_IMAGE: rlsbjppr/east-installer + #AUR_CONTAINER_TAG: latest check-version: stage: test -- GitLab From 148ec8ad77e6ac6a7cdbabda5001b4824109c7c3 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Thu, 12 May 2022 14:06:14 +0600 Subject: [PATCH 43/78] change docker image name and build process --- .gitlab-ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 875c5fe0..9bc42709 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -37,9 +37,9 @@ build-docker: variables: DOCKER_DRIVER: overlay2 script: - - docker pull $CONTAINER_IMAGE/aur:$CONTAINER_TAG || true + - docker pull $CONTAINER_IMAGE:$CONTAINER_TAG || true - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.e.foundation - - cd docker && docker build --cache-from $CONTAINER_IMAGE/aur:$CONTAINER_TAG -f Dockerfile.arch -t $CONTAINER_IMAGE/aur:$CONTAINER_TAG . + - docker build --cache-from $CONTAINER_IMAGE:$CONTAINER_TAG -t $CONTAINER_IMAGE:$CONTAINER_TAG . - docker push $CONTAINER_IMAGE:$CONTAINER_TAG build-aur-docker: @@ -57,10 +57,10 @@ build-aur-docker: variables: DOCKER_DRIVER: overlay2 script: - - docker pull $CONTAINER_IMAGE:$CONTAINER_TAG || true + - docker pull $CONTAINER_IMAGE/aur:$CONTAINER_TAG || true - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.e.foundation - - docker build --cache-from $CONTAINER_IMAGE:$CONTAINER_TAG -t $CONTAINER_IMAGE:$CONTAINER_TAG . - - docker push $CONTAINER_IMAGE:$CONTAINER_TAG + - cd docker && docker build --cache-from $CONTAINER_IMAGE/aur:$CONTAINER_TAG -f Dockerfile.arch -t $CONTAINER_IMAGE/aur:$CONTAINER_TAG . + - docker push $CONTAINER_IMAGE/aru:$CONTAINER_TAG build-ubuntu: image: registry.gitlab.e.foundation/e/devices/easy-installer:stable -- GitLab From 1f52fb759873db56bc1475b00867045c39c2e11a Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Thu, 12 May 2022 14:30:24 +0600 Subject: [PATCH 44/78] convert build-aur to hidden job and extend it with build-aur-test --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9bc42709..032ab11e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -90,7 +90,7 @@ build-windows: - Easy-installer-setup.exe - Easy-installer-setup.exe.sha256sum -build-aur: +.build-aur: image: $AUR_CONTAINER_IMAGE:$AUR_CONTAINER_TAG stage: build before_script: @@ -105,7 +105,7 @@ build-aur: build-aur-test: extends: - - build-aur + - .build-aur environment: name: aur-test -- GitLab From e28e9c5d6fd68a02106c60f289ccedf735ea25e8 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Thu, 12 May 2022 14:32:29 +0600 Subject: [PATCH 45/78] convert publish-aur to hidden job and extend it with publish-aur-test --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 032ab11e..294e3d6f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -142,7 +142,7 @@ publish-windows: - if: '$CI_COMMIT_TAG' when: manual -publish-aur: +.publish-aur: image: $AUR_CONTAINER_IMAGE:$AUR_CONTAINER_TAG stage: publish variables: @@ -175,6 +175,6 @@ publish-aur: publish-aur-test: extends: - - publish-aur + - .publish-aur environment: name: aur-test \ No newline at end of file -- GitLab From 576eca20ad2bb3cc50241201d56a6f733b2477be Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Thu, 12 May 2022 14:35:45 +0600 Subject: [PATCH 46/78] extend publish-aur-test to work for test repo --- .gitlab-ci.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 294e3d6f..deb582e7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -177,4 +177,20 @@ publish-aur-test: extends: - .publish-aur environment: - name: aur-test \ No newline at end of file + name: aur-test + script: + - | + cd $PUBLISH_DEST/ && + makepkg --printsrcinfo > .SRCINFO && + # following 7 line lines are added to make the test repo + # easy-installer-test work. remove these in prod! + sed -i "s/^pkgname=.*/pkgname=easy-installer-test/g" PKGBUILD && + sed -i "s/^pkgver=.*/pkgver=0.0.1/g" PKGBUILD && + sed -i "s/^pkgrel=.*/pkgrel=3/g" PKGBUILD && + sed -i "s|pkgbase = .*|pkgbase = easy-installer-test|" .SRCINFO && + sed -i "s|pkgver = .*|pkgver = 0.0.1|" .SRCINFO && + sed -i "s|pkgrel = .*|pkgrel = 3|" .SRCINFO && + sed -i "s|pkgname = .*|pkgname = easy-installer-test|" .SRCINFO && + git add . && + git commit -m "$CI_COMMIT_TAG" && + git push \ No newline at end of file -- GitLab From e92ab83b26fed608242fff19d9d471ea879bf724 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Thu, 12 May 2022 14:47:26 +0600 Subject: [PATCH 47/78] change repo CONTAINER_IMAGE URL --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index deb582e7..54401d4a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,7 +8,7 @@ stages: - publish variables: - CONTAINER_IMAGE: registry.gitlab.e.foundation/e/devices/easy-installer + CONTAINER_IMAGE: registry.gitlab.e.foundation/fazlerabbi37/easy-installer CONTAINER_TAG: stable # temporary docker image, replace when build-aur-docker job pushes to GitLab registry #AUR_CONTAINER_IMAGE: rlsbjppr/east-installer -- GitLab From 9b60cc1a0a61b49ffa9dc8977b6763696b850cc9 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Thu, 12 May 2022 14:54:10 +0600 Subject: [PATCH 48/78] increase pkgrel --- .gitlab-ci.yml | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 54401d4a..e87d2634 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,11 +8,11 @@ stages: - publish variables: - CONTAINER_IMAGE: registry.gitlab.e.foundation/fazlerabbi37/easy-installer + CONTAINER_IMAGE: registry.gitlab.e.foundation/e/devices/easy-installer CONTAINER_TAG: stable # temporary docker image, replace when build-aur-docker job pushes to GitLab registry - #AUR_CONTAINER_IMAGE: rlsbjppr/east-installer - #AUR_CONTAINER_TAG: latest + AUR_CONTAINER_IMAGE: rlsbjppr/east-installer + AUR_CONTAINER_TAG: latest check-version: stage: test @@ -166,19 +166,6 @@ publish-windows: # Copy package file from source to AUR clone - cp -a easy-installer-src/pkg/arch/. $PUBLISH_DEST/ # Generate add, commit and push - - | - cd $PUBLISH_DEST/ && - makepkg --printsrcinfo > .SRCINFO && - git add . && - git commit -m "$TAG" && - git push - -publish-aur-test: - extends: - - .publish-aur - environment: - name: aur-test - script: - | cd $PUBLISH_DEST/ && makepkg --printsrcinfo > .SRCINFO && @@ -186,11 +173,18 @@ publish-aur-test: # easy-installer-test work. remove these in prod! sed -i "s/^pkgname=.*/pkgname=easy-installer-test/g" PKGBUILD && sed -i "s/^pkgver=.*/pkgver=0.0.1/g" PKGBUILD && - sed -i "s/^pkgrel=.*/pkgrel=3/g" PKGBUILD && + sed -i "s/^pkgrel=.*/pkgrel=4/g" PKGBUILD && sed -i "s|pkgbase = .*|pkgbase = easy-installer-test|" .SRCINFO && sed -i "s|pkgver = .*|pkgver = 0.0.1|" .SRCINFO && - sed -i "s|pkgrel = .*|pkgrel = 3|" .SRCINFO && + sed -i "s|pkgrel = .*|pkgrel = 4|" .SRCINFO && sed -i "s|pkgname = .*|pkgname = easy-installer-test|" .SRCINFO && git add . && git commit -m "$CI_COMMIT_TAG" && - git push \ No newline at end of file + git commit -m "$TAG" && + git push + +publish-aur-test: + extends: + - .publish-aur + environment: + name: aur-test \ No newline at end of file -- GitLab From de67506a49171eae4ae649f9c871820fc6ffc781 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Thu, 12 May 2022 17:00:43 +0600 Subject: [PATCH 49/78] change CONTAINER_IMAGE and comment out temp image --- .gitlab-ci.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e87d2634..9e11236c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,11 +8,13 @@ stages: - publish variables: - CONTAINER_IMAGE: registry.gitlab.e.foundation/e/devices/easy-installer + # CONTAINER_IMAGE: registry.gitlab.e.foundation/e/devices/easy-installer + # revert to /e/devices/ on prod + CONTAINER_IMAGE: registry.gitlab.e.foundation/fazlerabbi37/easy-installer CONTAINER_TAG: stable # temporary docker image, replace when build-aur-docker job pushes to GitLab registry - AUR_CONTAINER_IMAGE: rlsbjppr/east-installer - AUR_CONTAINER_TAG: latest + # AUR_CONTAINER_IMAGE: rlsbjppr/east-installer + # AUR_CONTAINER_TAG: latest check-version: stage: test -- GitLab From 800b2e9390886ad4b9ca9bc8aca17e30d27496c4 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Thu, 12 May 2022 17:08:56 +0600 Subject: [PATCH 50/78] add docker aur image with CI_COMMIT_TAG tag --- .gitlab-ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9e11236c..200b8294 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -61,8 +61,10 @@ build-aur-docker: script: - docker pull $CONTAINER_IMAGE/aur:$CONTAINER_TAG || true - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.e.foundation - - cd docker && docker build --cache-from $CONTAINER_IMAGE/aur:$CONTAINER_TAG -f Dockerfile.arch -t $CONTAINER_IMAGE/aur:$CONTAINER_TAG . - - docker push $CONTAINER_IMAGE/aru:$CONTAINER_TAG + - cd docker && docker build --cache-from $CONTAINER_IMAGE/aur:$CONTAINER_TAG -f Dockerfile.arch -t $CONTAINER_IMAGE/aur:$CI_COMMIT_TAG . + - docker tag $CONTAINER_IMAGE/aur:$CI_COMMIT_TAG $CONTAINER_IMAGE/aur:$CONTAINER_TAG + - docker push $CONTAINER_IMAGE/aru:$CI_COMMIT_TAG + - docker push $CONTAINER_IMAGE/aru:$CONTAINER_TAG build-ubuntu: image: registry.gitlab.e.foundation/e/devices/easy-installer:stable -- GitLab From 7dd753b2ca7a3e545699491171c2d7e5aa327bf0 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Thu, 12 May 2022 17:09:56 +0600 Subject: [PATCH 51/78] remove temporary docker image --- .gitlab-ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 200b8294..9d29f75c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,9 +12,6 @@ variables: # revert to /e/devices/ on prod CONTAINER_IMAGE: registry.gitlab.e.foundation/fazlerabbi37/easy-installer CONTAINER_TAG: stable - # temporary docker image, replace when build-aur-docker job pushes to GitLab registry - # AUR_CONTAINER_IMAGE: rlsbjppr/east-installer - # AUR_CONTAINER_TAG: latest check-version: stage: test -- GitLab From ae816c5b66354d08c423cd503d7ad04e1f4717f5 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Thu, 12 May 2022 17:11:31 +0600 Subject: [PATCH 52/78] comment out jobs unrelated to AUR --- .gitlab-ci.yml | 116 ++++++++++++++++++++++++------------------------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9d29f75c..64048d04 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -42,7 +42,7 @@ build-docker: - docker push $CONTAINER_IMAGE:$CONTAINER_TAG build-aur-docker: -# skeleton code for building AUR docker image +# build AUR docker image # to do: # - [] if not exist build image from docker/Dockerfile.arch # - [] tag image @@ -63,33 +63,33 @@ build-aur-docker: - docker push $CONTAINER_IMAGE/aru:$CI_COMMIT_TAG - docker push $CONTAINER_IMAGE/aru:$CONTAINER_TAG -build-ubuntu: - image: registry.gitlab.e.foundation/e/devices/easy-installer:stable - stage: build - variables: - GIT_SUBMODULE_STRATEGY: recursive - script: - - snapcraft - - ls - artifacts: - name: "easy-installer" - paths: - - easy-installer*.snap +# build-ubuntu: +# image: registry.gitlab.e.foundation/e/devices/easy-installer:stable +# stage: build +# variables: +# GIT_SUBMODULE_STRATEGY: recursive +# script: +# - snapcraft +# - ls +# artifacts: +# name: "easy-installer" +# paths: +# - easy-installer*.snap -build-windows: - image: registry.gitlab.e.foundation/e/devices/easy-installer:stable - stage: build - variables: - GIT_SUBMODULE_STRATEGY: recursive - script: - - ./gradlew jlink -Pkey="$PEPPER" - - makensis windows-installer-mui.nsi - - sha256sum Easy-installer-setup.exe > Easy-installer-setup.exe.sha256sum - artifacts: - name: "easy-installer-windows" - paths: - - Easy-installer-setup.exe - - Easy-installer-setup.exe.sha256sum +# build-windows: +# image: registry.gitlab.e.foundation/e/devices/easy-installer:stable +# stage: build +# variables: +# GIT_SUBMODULE_STRATEGY: recursive +# script: +# - ./gradlew jlink -Pkey="$PEPPER" +# - makensis windows-installer-mui.nsi +# - sha256sum Easy-installer-setup.exe > Easy-installer-setup.exe.sha256sum +# artifacts: +# name: "easy-installer-windows" +# paths: +# - Easy-installer-setup.exe +# - Easy-installer-setup.exe.sha256sum .build-aur: image: $AUR_CONTAINER_IMAGE:$AUR_CONTAINER_TAG @@ -110,38 +110,38 @@ build-aur-test: environment: name: aur-test -publish-ubuntu: - image: registry.gitlab.e.foundation/e/devices/easy-installer:stable - stage: publish - variables: - RELEASE_TYPE: beta - script: - - echo ${SNAPCRAFT_LOGIN_FILE} | base64 -d > snapcraft.login && snapcraft login --with snapcraft.login - - snapcraft push *.snap --release $RELEASE_TYPE - - snapcraft logout && rm snapcraft.login - rules: - - if: '$CI_COMMIT_TAG' - when: manual +# publish-ubuntu: +# image: registry.gitlab.e.foundation/e/devices/easy-installer:stable +# stage: publish +# variables: +# RELEASE_TYPE: beta +# script: +# - echo ${SNAPCRAFT_LOGIN_FILE} | base64 -d > snapcraft.login && snapcraft login --with snapcraft.login +# - snapcraft push *.snap --release $RELEASE_TYPE +# - snapcraft logout && rm snapcraft.login +# rules: +# - if: '$CI_COMMIT_TAG' +# when: manual -publish-windows: - image: registry.gitlab.e.foundation/e/devices/easy-installer:stable - stage: publish - variables: - RELEASE_TYPE: beta - before_script: - - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' - - eval $(ssh-agent -s) - - echo "$SSH_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 - script: - - "rsync -avz Easy-installer-setup.exe* $PUBLISH_USER@$PUBLISH_URL:$PUBLISH_DEST" - - ssh $PUBLISH_USER@$PUBLISH_URL "mv $PUBLISH_DEST/* $RELEASE_DEST/" - rules: - - if: '$CI_COMMIT_TAG' - when: manual +# publish-windows: +# image: registry.gitlab.e.foundation/e/devices/easy-installer:stable +# stage: publish +# variables: +# RELEASE_TYPE: beta +# before_script: +# - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' +# - eval $(ssh-agent -s) +# - echo "$SSH_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 +# script: +# - "rsync -avz Easy-installer-setup.exe* $PUBLISH_USER@$PUBLISH_URL:$PUBLISH_DEST" +# - ssh $PUBLISH_USER@$PUBLISH_URL "mv $PUBLISH_DEST/* $RELEASE_DEST/" +# rules: +# - if: '$CI_COMMIT_TAG' +# when: manual .publish-aur: image: $AUR_CONTAINER_IMAGE:$AUR_CONTAINER_TAG -- GitLab From 00b92cef8209d266a2f8c142052428cb9825c93a Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Thu, 12 May 2022 17:33:00 +0600 Subject: [PATCH 53/78] fix indentation issue for build-aur-docker --- .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 64048d04..cd746864 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -58,10 +58,10 @@ build-aur-docker: script: - docker pull $CONTAINER_IMAGE/aur:$CONTAINER_TAG || true - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.e.foundation - - cd docker && docker build --cache-from $CONTAINER_IMAGE/aur:$CONTAINER_TAG -f Dockerfile.arch -t $CONTAINER_IMAGE/aur:$CI_COMMIT_TAG . - - docker tag $CONTAINER_IMAGE/aur:$CI_COMMIT_TAG $CONTAINER_IMAGE/aur:$CONTAINER_TAG - - docker push $CONTAINER_IMAGE/aru:$CI_COMMIT_TAG - - docker push $CONTAINER_IMAGE/aru:$CONTAINER_TAG + - cd docker && docker build --cache-from $CONTAINER_IMAGE/aur:$CONTAINER_TAG -f Dockerfile.arch -t $CONTAINER_IMAGE/aur:$CI_COMMIT_TAG . + - docker tag $CONTAINER_IMAGE/aur:$CI_COMMIT_TAG $CONTAINER_IMAGE/aur:$CONTAINER_TAG + - docker push $CONTAINER_IMAGE/aru:$CI_COMMIT_TAG + - docker push $CONTAINER_IMAGE/aru:$CONTAINER_TAG # build-ubuntu: # image: registry.gitlab.e.foundation/e/devices/easy-installer:stable -- GitLab From ab373b01b47bb17fd2230318f5e98009763aa629 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Thu, 12 May 2022 17:52:19 +0600 Subject: [PATCH 54/78] build with latest and tag with CI_COMMIT_TAG --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cd746864..1b7628c2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -58,10 +58,10 @@ build-aur-docker: script: - docker pull $CONTAINER_IMAGE/aur:$CONTAINER_TAG || true - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.e.foundation - - cd docker && docker build --cache-from $CONTAINER_IMAGE/aur:$CONTAINER_TAG -f Dockerfile.arch -t $CONTAINER_IMAGE/aur:$CI_COMMIT_TAG . - - docker tag $CONTAINER_IMAGE/aur:$CI_COMMIT_TAG $CONTAINER_IMAGE/aur:$CONTAINER_TAG - - docker push $CONTAINER_IMAGE/aru:$CI_COMMIT_TAG + - cd docker && docker build --cache-from $CONTAINER_IMAGE/aur:$CONTAINER_TAG -f Dockerfile.arch -t $CONTAINER_IMAGE/aur:$CONTAINER_TAG . + - docker tag $CONTAINER_IMAGE/aur:$CONTAINER_TAG $CONTAINER_IMAGE/aur:$CI_COMMIT_TAG - docker push $CONTAINER_IMAGE/aru:$CONTAINER_TAG + - docker push $CONTAINER_IMAGE/aru:$CI_COMMIT_TAG # build-ubuntu: # image: registry.gitlab.e.foundation/e/devices/easy-installer:stable -- GitLab From 29422a914cd1081435631d1f6e33603dc418fd89 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Thu, 12 May 2022 17:53:26 +0600 Subject: [PATCH 55/78] comment out build-docker to save build time --- .gitlab-ci.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1b7628c2..b9d3fb45 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,20 +26,20 @@ check-version: - if: '$CI_COMMIT_TAG' when: always -build-docker: - image: docker:19 - stage: prepare - services: - - docker:19-dind - tags: - - generic_privileged - variables: - DOCKER_DRIVER: overlay2 - script: - - docker pull $CONTAINER_IMAGE:$CONTAINER_TAG || true - - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.e.foundation - - docker build --cache-from $CONTAINER_IMAGE:$CONTAINER_TAG -t $CONTAINER_IMAGE:$CONTAINER_TAG . - - docker push $CONTAINER_IMAGE:$CONTAINER_TAG +# build-docker: +# image: docker:19 +# stage: prepare +# services: +# - docker:19-dind +# tags: +# - generic_privileged +# variables: +# DOCKER_DRIVER: overlay2 +# script: +# - docker pull $CONTAINER_IMAGE:$CONTAINER_TAG || true +# - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.e.foundation +# - docker build --cache-from $CONTAINER_IMAGE:$CONTAINER_TAG -t $CONTAINER_IMAGE:$CONTAINER_TAG . +# - docker push $CONTAINER_IMAGE:$CONTAINER_TAG build-aur-docker: # build AUR docker image -- GitLab From 7588e1ca1db5b421bebb55c74478b7b91cfb3f13 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Fri, 13 May 2022 06:49:53 +0600 Subject: [PATCH 56/78] update docker image from 19 to 20 for build-aur-docker --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b9d3fb45..63541eaf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,10 +47,10 @@ build-aur-docker: # - [] if not exist build image from docker/Dockerfile.arch # - [] tag image # - [] push image as sub image - image: docker:19 + image: docker:20 stage: prepare services: - - docker:19-dind + - docker:20-dind tags: - generic_privileged variables: -- GitLab From 4faf8c5611cc1038db66eb870ee3d5c22c70b0ba Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Fri, 13 May 2022 06:52:05 +0600 Subject: [PATCH 57/78] remove comment and fix typo --- .gitlab-ci.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 63541eaf..cb77ff4e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -43,10 +43,6 @@ check-version: build-aur-docker: # build AUR docker image -# to do: -# - [] if not exist build image from docker/Dockerfile.arch -# - [] tag image -# - [] push image as sub image image: docker:20 stage: prepare services: @@ -60,8 +56,8 @@ build-aur-docker: - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.e.foundation - cd docker && docker build --cache-from $CONTAINER_IMAGE/aur:$CONTAINER_TAG -f Dockerfile.arch -t $CONTAINER_IMAGE/aur:$CONTAINER_TAG . - docker tag $CONTAINER_IMAGE/aur:$CONTAINER_TAG $CONTAINER_IMAGE/aur:$CI_COMMIT_TAG - - docker push $CONTAINER_IMAGE/aru:$CONTAINER_TAG - - docker push $CONTAINER_IMAGE/aru:$CI_COMMIT_TAG + - docker push $CONTAINER_IMAGE/aur:$CONTAINER_TAG + - docker push $CONTAINER_IMAGE/aur:$CI_COMMIT_TAG # build-ubuntu: # image: registry.gitlab.e.foundation/e/devices/easy-installer:stable -- GitLab From f60f089e15390d24cc33d148f005147ed00f3ba6 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Fri, 13 May 2022 06:53:02 +0600 Subject: [PATCH 58/78] remove commit with $TAG value that no longer exist --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cb77ff4e..3fca2a3e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -177,7 +177,6 @@ build-aur-test: sed -i "s|pkgname = .*|pkgname = easy-installer-test|" .SRCINFO && git add . && git commit -m "$CI_COMMIT_TAG" && - git commit -m "$TAG" && git push publish-aur-test: -- GitLab From 0a369b0d7be9ef8017f2c69052abea754d9012cb Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Fri, 13 May 2022 07:03:03 +0600 Subject: [PATCH 59/78] comment out CI_COMMIT_TAG --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3fca2a3e..159a1212 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -55,9 +55,9 @@ build-aur-docker: - docker pull $CONTAINER_IMAGE/aur:$CONTAINER_TAG || true - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.e.foundation - cd docker && docker build --cache-from $CONTAINER_IMAGE/aur:$CONTAINER_TAG -f Dockerfile.arch -t $CONTAINER_IMAGE/aur:$CONTAINER_TAG . - - docker tag $CONTAINER_IMAGE/aur:$CONTAINER_TAG $CONTAINER_IMAGE/aur:$CI_COMMIT_TAG + # - docker tag $CONTAINER_IMAGE/aur:$CONTAINER_TAG $CONTAINER_IMAGE/aur:$CI_COMMIT_TAG - docker push $CONTAINER_IMAGE/aur:$CONTAINER_TAG - - docker push $CONTAINER_IMAGE/aur:$CI_COMMIT_TAG + # - docker push $CONTAINER_IMAGE/aur:$CI_COMMIT_TAG # build-ubuntu: # image: registry.gitlab.e.foundation/e/devices/easy-installer:stable -- GitLab From 97ec4bec07b379568bf9f265c4449aa4cab3b9e9 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Fri, 13 May 2022 11:16:47 +0600 Subject: [PATCH 60/78] uncomment all other jobs to minimized diff --- .gitlab-ci.yml | 144 ++++++++++++++++++++++++------------------------- 1 file changed, 71 insertions(+), 73 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 159a1212..ab6ac2ef 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,20 +26,20 @@ check-version: - if: '$CI_COMMIT_TAG' when: always -# build-docker: -# image: docker:19 -# stage: prepare -# services: -# - docker:19-dind -# tags: -# - generic_privileged -# variables: -# DOCKER_DRIVER: overlay2 -# script: -# - docker pull $CONTAINER_IMAGE:$CONTAINER_TAG || true -# - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.e.foundation -# - docker build --cache-from $CONTAINER_IMAGE:$CONTAINER_TAG -t $CONTAINER_IMAGE:$CONTAINER_TAG . -# - docker push $CONTAINER_IMAGE:$CONTAINER_TAG +build-docker: + image: docker:19 + stage: prepare + services: + - docker:19-dind + tags: + - generic_privileged + variables: + DOCKER_DRIVER: overlay2 + script: + - docker pull $CONTAINER_IMAGE:$CONTAINER_TAG || true + - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.e.foundation + - docker build --cache-from $CONTAINER_IMAGE:$CONTAINER_TAG -t $CONTAINER_IMAGE:$CONTAINER_TAG . + - docker push $CONTAINER_IMAGE:$CONTAINER_TAG build-aur-docker: # build AUR docker image @@ -55,37 +55,35 @@ build-aur-docker: - docker pull $CONTAINER_IMAGE/aur:$CONTAINER_TAG || true - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.e.foundation - cd docker && docker build --cache-from $CONTAINER_IMAGE/aur:$CONTAINER_TAG -f Dockerfile.arch -t $CONTAINER_IMAGE/aur:$CONTAINER_TAG . - # - docker tag $CONTAINER_IMAGE/aur:$CONTAINER_TAG $CONTAINER_IMAGE/aur:$CI_COMMIT_TAG - docker push $CONTAINER_IMAGE/aur:$CONTAINER_TAG - # - docker push $CONTAINER_IMAGE/aur:$CI_COMMIT_TAG -# build-ubuntu: -# image: registry.gitlab.e.foundation/e/devices/easy-installer:stable -# stage: build -# variables: -# GIT_SUBMODULE_STRATEGY: recursive -# script: -# - snapcraft -# - ls -# artifacts: -# name: "easy-installer" -# paths: -# - easy-installer*.snap +build-ubuntu: + image: registry.gitlab.e.foundation/e/devices/easy-installer:stable + stage: build + variables: + GIT_SUBMODULE_STRATEGY: recursive + script: + - snapcraft + - ls + artifacts: + name: "easy-installer" + paths: + - easy-installer*.snap -# build-windows: -# image: registry.gitlab.e.foundation/e/devices/easy-installer:stable -# stage: build -# variables: -# GIT_SUBMODULE_STRATEGY: recursive -# script: -# - ./gradlew jlink -Pkey="$PEPPER" -# - makensis windows-installer-mui.nsi -# - sha256sum Easy-installer-setup.exe > Easy-installer-setup.exe.sha256sum -# artifacts: -# name: "easy-installer-windows" -# paths: -# - Easy-installer-setup.exe -# - Easy-installer-setup.exe.sha256sum +build-windows: + image: registry.gitlab.e.foundation/e/devices/easy-installer:stable + stage: build + variables: + GIT_SUBMODULE_STRATEGY: recursive + script: + - ./gradlew jlink -Pkey="$PEPPER" + - makensis windows-installer-mui.nsi + - sha256sum Easy-installer-setup.exe > Easy-installer-setup.exe.sha256sum + artifacts: + name: "easy-installer-windows" + paths: + - Easy-installer-setup.exe + - Easy-installer-setup.exe.sha256sum .build-aur: image: $AUR_CONTAINER_IMAGE:$AUR_CONTAINER_TAG @@ -106,38 +104,38 @@ build-aur-test: environment: name: aur-test -# publish-ubuntu: -# image: registry.gitlab.e.foundation/e/devices/easy-installer:stable -# stage: publish -# variables: -# RELEASE_TYPE: beta -# script: -# - echo ${SNAPCRAFT_LOGIN_FILE} | base64 -d > snapcraft.login && snapcraft login --with snapcraft.login -# - snapcraft push *.snap --release $RELEASE_TYPE -# - snapcraft logout && rm snapcraft.login -# rules: -# - if: '$CI_COMMIT_TAG' -# when: manual +publish-ubuntu: + image: registry.gitlab.e.foundation/e/devices/easy-installer:stable + stage: publish + variables: + RELEASE_TYPE: beta + script: + - echo ${SNAPCRAFT_LOGIN_FILE} | base64 -d > snapcraft.login && snapcraft login --with snapcraft.login + - snapcraft push *.snap --release $RELEASE_TYPE + - snapcraft logout && rm snapcraft.login + rules: + - if: '$CI_COMMIT_TAG' + when: manual -# publish-windows: -# image: registry.gitlab.e.foundation/e/devices/easy-installer:stable -# stage: publish -# variables: -# RELEASE_TYPE: beta -# before_script: -# - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' -# - eval $(ssh-agent -s) -# - echo "$SSH_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 -# script: -# - "rsync -avz Easy-installer-setup.exe* $PUBLISH_USER@$PUBLISH_URL:$PUBLISH_DEST" -# - ssh $PUBLISH_USER@$PUBLISH_URL "mv $PUBLISH_DEST/* $RELEASE_DEST/" -# rules: -# - if: '$CI_COMMIT_TAG' -# when: manual +publish-windows: + image: registry.gitlab.e.foundation/e/devices/easy-installer:stable + stage: publish + variables: + RELEASE_TYPE: beta + before_script: + - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' + - eval $(ssh-agent -s) + - echo "$SSH_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 + script: + - "rsync -avz Easy-installer-setup.exe* $PUBLISH_USER@$PUBLISH_URL:$PUBLISH_DEST" + - ssh $PUBLISH_USER@$PUBLISH_URL "mv $PUBLISH_DEST/* $RELEASE_DEST/" + rules: + - if: '$CI_COMMIT_TAG' + when: manual .publish-aur: image: $AUR_CONTAINER_IMAGE:$AUR_CONTAINER_TAG -- GitLab From d0d9bdcb4e8bb27a18b98ae96c684105fd943a61 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Fri, 13 May 2022 11:32:32 +0600 Subject: [PATCH 61/78] fix image var --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ab6ac2ef..1a33cbcb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -86,7 +86,7 @@ build-windows: - Easy-installer-setup.exe.sha256sum .build-aur: - image: $AUR_CONTAINER_IMAGE:$AUR_CONTAINER_TAG + image: $CONTAINER_IMAGE/aur:$CONTAINER_TAG stage: build before_script: - git clone --depth=1 https://gitlab.e.foundation/e/tools/easy-installer.git -b $CI_COMMIT_TAG /home/builder/easy-installer-src @@ -138,7 +138,7 @@ publish-windows: when: manual .publish-aur: - image: $AUR_CONTAINER_IMAGE:$AUR_CONTAINER_TAG + image: $CONTAINER_IMAGE/aur:$CONTAINER_TAG stage: publish variables: RELEASE_TYPE: beta -- GitLab From ff82bfea12a8f020b63c4acdaf5b1804a328a765 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Fri, 13 May 2022 16:27:44 +0600 Subject: [PATCH 62/78] add gpg key --- .gitlab-ci.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1a33cbcb..089b6105 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -150,9 +150,21 @@ publish-windows: - install -m '700' -d ~/.ssh - echo -e "Host aur aur.archlinux.org\n User aur\n Hostname aur.archlinux.org" > ~/.ssh/config - ssh-keyscan aur.archlinux.org > ~/.ssh/known_hosts + # add gpg key + - | + mkdir -p ~/.gnupg/ + echo use-agent >> ~/.gnupg/gpg.conf + echo pinentry-mode loopback >> ~/.gnupg/gpg.conf + - | + echo default-cache-ttl 300 >> ~/.gnupg/gpg-agent.conf + echo max-cache-ttl 600 >> ~/.gnupg/gpg-agent.conf + - gpg --import --no-tty --passphrase "$GPG_PASSPHRASE" --batch --yes <(echo "$GPG_PRIVATE_KEY" | tr -d '\r') # config git - git config --global user.email "$PUBLISH_USER_EMAIL" - git config --global user.name "$PUBLISH_USER" + - git config --global user.signingkey $GPG_KEY_ID + - git config --global commit.gpgsign true + - git config --global gpg.program gpg2 script: # Clone AUR repo - git clone ssh://aur@aur.archlinux.org/$PUBLISH_DEST.git -- GitLab From b8cc9b675278869d7c6a5020005578bde0a68b93 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Fri, 13 May 2022 16:31:30 +0600 Subject: [PATCH 63/78] update .build-aur artifacts path --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 089b6105..5e05e2ae 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -96,7 +96,7 @@ build-windows: artifacts: name: "easy-installer" paths: - - easy-installer*.tar.zst + - /home/builder/easy-installer/easy-installer*.tar.zst build-aur-test: extends: -- GitLab From a1ea9a8a32a5b2bb98791ed0b0fb0494c59e98ac Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Mon, 16 May 2022 16:57:31 +0600 Subject: [PATCH 64/78] add comment about different docker image version --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5e05e2ae..358d273d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -43,6 +43,9 @@ build-docker: build-aur-docker: # build AUR docker image +# the image is different from the build-docker (which using docker:19) step as +# archlinux/archlinux docker image fails with +# error: failed to initialize alpm library: image: docker:20 stage: prepare services: -- GitLab From f8bfef613b251b2698c0a1a3f911ac031d5fa8f3 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Mon, 16 May 2022 16:58:10 +0600 Subject: [PATCH 65/78] change job name and env name for build-aur --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 358d273d..2e0a7820 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -101,11 +101,11 @@ build-windows: paths: - /home/builder/easy-installer/easy-installer*.tar.zst -build-aur-test: +build-aur: extends: - .build-aur environment: - name: aur-test + name: aur-repo publish-ubuntu: image: registry.gitlab.e.foundation/e/devices/easy-installer:stable -- GitLab From 40032836ae5d1b74ed09db60572d84b89ed1bcd4 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Mon, 16 May 2022 17:00:48 +0600 Subject: [PATCH 66/78] remove gpg key configs --- .gitlab-ci.yml | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2e0a7820..14367da3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -146,28 +146,17 @@ publish-windows: variables: RELEASE_TYPE: beta before_script: - # Store the private key into the agent's memory + # store the private key into the agent's memory - eval $(ssh-agent -s) - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null - # Add 'aur' to SSH configure + # add 'aur' to SSH configure - install -m '700' -d ~/.ssh - echo -e "Host aur aur.archlinux.org\n User aur\n Hostname aur.archlinux.org" > ~/.ssh/config - ssh-keyscan aur.archlinux.org > ~/.ssh/known_hosts - # add gpg key - - | - mkdir -p ~/.gnupg/ - echo use-agent >> ~/.gnupg/gpg.conf - echo pinentry-mode loopback >> ~/.gnupg/gpg.conf - - | - echo default-cache-ttl 300 >> ~/.gnupg/gpg-agent.conf - echo max-cache-ttl 600 >> ~/.gnupg/gpg-agent.conf - - gpg --import --no-tty --passphrase "$GPG_PASSPHRASE" --batch --yes <(echo "$GPG_PRIVATE_KEY" | tr -d '\r') + # config git - git config --global user.email "$PUBLISH_USER_EMAIL" - git config --global user.name "$PUBLISH_USER" - - git config --global user.signingkey $GPG_KEY_ID - - git config --global commit.gpgsign true - - git config --global gpg.program gpg2 script: # Clone AUR repo - git clone ssh://aur@aur.archlinux.org/$PUBLISH_DEST.git @@ -179,20 +168,10 @@ publish-windows: - | cd $PUBLISH_DEST/ && makepkg --printsrcinfo > .SRCINFO && - # following 7 line lines are added to make the test repo - # easy-installer-test work. remove these in prod! - sed -i "s/^pkgname=.*/pkgname=easy-installer-test/g" PKGBUILD && - sed -i "s/^pkgver=.*/pkgver=0.0.1/g" PKGBUILD && - sed -i "s/^pkgrel=.*/pkgrel=4/g" PKGBUILD && - sed -i "s|pkgbase = .*|pkgbase = easy-installer-test|" .SRCINFO && - sed -i "s|pkgver = .*|pkgver = 0.0.1|" .SRCINFO && - sed -i "s|pkgrel = .*|pkgrel = 4|" .SRCINFO && - sed -i "s|pkgname = .*|pkgname = easy-installer-test|" .SRCINFO && - git add . && git commit -m "$CI_COMMIT_TAG" && git push -publish-aur-test: +publish-aur: extends: - .publish-aur environment: -- GitLab From 2426a3deca55966c470be1e15c72bdd7964c00f3 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Mon, 16 May 2022 17:01:39 +0600 Subject: [PATCH 67/78] remove test repo sed magic --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 14367da3..a8db0412 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -168,10 +168,11 @@ publish-windows: - | cd $PUBLISH_DEST/ && makepkg --printsrcinfo > .SRCINFO && + git add . && git commit -m "$CI_COMMIT_TAG" && git push -publish-aur: +publish-aur-test: extends: - .publish-aur environment: -- GitLab From 0b4c02eb1d928fc7d0751a32bc0bb208d7165e52 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Mon, 16 May 2022 17:02:38 +0600 Subject: [PATCH 68/78] change job and env name for publish-aur --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a8db0412..bd33c3b6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -172,8 +172,8 @@ publish-windows: git commit -m "$CI_COMMIT_TAG" && git push -publish-aur-test: +publish-aur: extends: - .publish-aur environment: - name: aur-test \ No newline at end of file + name: aur-repo \ No newline at end of file -- GitLab From 28918b4249f356daefe383d076dc067f2e703b8c Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Mon, 16 May 2022 17:16:32 +0600 Subject: [PATCH 69/78] replace hard coded dir value with PUBLISH_DEST var --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bd33c3b6..49dddde6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -93,13 +93,13 @@ build-windows: stage: build before_script: - git clone --depth=1 https://gitlab.e.foundation/e/tools/easy-installer.git -b $CI_COMMIT_TAG /home/builder/easy-installer-src - - mkdir easy-installer && cp -a /home/builder/easy-installer-src/pkg/arch/. /home/builder/easy-installer + - mkdir $PUBLISH_DEST && cp -a /home/builder/easy-installer-src/pkg/arch/. /home/builder/$PUBLISH_DEST script: - - cd /home/builder/easy-installer && makepkg -sifc --noconfirm + - cd /home/builder/$PUBLISH_DEST && makepkg -sifc --noconfirm artifacts: name: "easy-installer" paths: - - /home/builder/easy-installer/easy-installer*.tar.zst + - /home/builder/$PUBLISH_DEST/easy-installer*.tar.zst build-aur: extends: -- GitLab From f6b74cd79a5f31ab0657f10e662bfde7f20a4222 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Mon, 16 May 2022 17:28:41 +0600 Subject: [PATCH 70/78] revert to original docker image --- .gitlab-ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 49dddde6..85e02195 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,9 +8,7 @@ stages: - publish variables: - # CONTAINER_IMAGE: registry.gitlab.e.foundation/e/devices/easy-installer - # revert to /e/devices/ on prod - CONTAINER_IMAGE: registry.gitlab.e.foundation/fazlerabbi37/easy-installer + CONTAINER_IMAGE: registry.gitlab.e.foundation/e/devices/easy-installer CONTAINER_TAG: stable check-version: -- GitLab From 7885878bad05f8da6c1c2447dfdd3b2166e09d1d Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Mon, 16 May 2022 19:31:30 +0600 Subject: [PATCH 71/78] [skip ci] change hard coded repo URL with CI_REPOSITORY_URL --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 85e02195..642e28ff 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -90,7 +90,7 @@ build-windows: image: $CONTAINER_IMAGE/aur:$CONTAINER_TAG stage: build before_script: - - git clone --depth=1 https://gitlab.e.foundation/e/tools/easy-installer.git -b $CI_COMMIT_TAG /home/builder/easy-installer-src + - git clone --depth=1 $CI_REPOSITORY_URL -b $CI_COMMIT_TAG /home/builder/easy-installer-src - mkdir $PUBLISH_DEST && cp -a /home/builder/easy-installer-src/pkg/arch/. /home/builder/$PUBLISH_DEST script: - cd /home/builder/$PUBLISH_DEST && makepkg -sifc --noconfirm @@ -159,7 +159,7 @@ publish-windows: # Clone AUR repo - git clone ssh://aur@aur.archlinux.org/$PUBLISH_DEST.git # Clone the source /e/ repo - - git clone --depth=1 https://gitlab.e.foundation/e/tools/easy-installer.git -b $CI_COMMIT_TAG easy-installer-src + - git clone --depth=1 $CI_REPOSITORY_URL -b $CI_COMMIT_TAG easy-installer-src # Copy package file from source to AUR clone - cp -a easy-installer-src/pkg/arch/. $PUBLISH_DEST/ # Generate add, commit and push -- GitLab From da7413468cf3f4d6cf7ce23a4370135d7ffc6890 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Mon, 16 May 2022 19:44:46 +0600 Subject: [PATCH 72/78] [skip ci] change hard coded URL of registry to $CI_REGISTRY --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 642e28ff..39403374 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -54,7 +54,7 @@ build-aur-docker: DOCKER_DRIVER: overlay2 script: - docker pull $CONTAINER_IMAGE/aur:$CONTAINER_TAG || true - - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.e.foundation + - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY - cd docker && docker build --cache-from $CONTAINER_IMAGE/aur:$CONTAINER_TAG -f Dockerfile.arch -t $CONTAINER_IMAGE/aur:$CONTAINER_TAG . - docker push $CONTAINER_IMAGE/aur:$CONTAINER_TAG -- GitLab From 8fa1c567c1169277b72a2d3085f773748366a2fb Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Mon, 16 May 2022 20:32:37 +0600 Subject: [PATCH 73/78] optimization for docker change archlinux/archlinux to archlinux:base-devel --- docker/Dockerfile.arch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile.arch b/docker/Dockerfile.arch index 0fa2423f..d823c843 100644 --- a/docker/Dockerfile.arch +++ b/docker/Dockerfile.arch @@ -1,4 +1,4 @@ -FROM archlinux/archlinux +FROM archlinux:base-devel # update pacman and install sudo RUN pacman -Syyu --noconfirm && \ -- GitLab From 721e0ccc64cd17ecccfc66de71d38d2477657b38 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Mon, 16 May 2022 20:48:21 +0600 Subject: [PATCH 74/78] separate out the docker and pkg build deps --- docker/Dockerfile.arch | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docker/Dockerfile.arch b/docker/Dockerfile.arch index d823c843..eb01985b 100644 --- a/docker/Dockerfile.arch +++ b/docker/Dockerfile.arch @@ -1,8 +1,8 @@ FROM archlinux:base-devel -# update pacman and install sudo +# update pacman and install sudo git openssh RUN pacman -Syyu --noconfirm && \ - pacman -Syy --noconfirm --noprogressbar sudo && \ + pacman -Syy --noconfirm --noprogressbar sudo git openssh && \ yes | pacman -Scc && rm -fr /var/lib/pacman/sync/*1 # add a non-root user and allowing running as root with password @@ -20,9 +20,8 @@ RUN mkdir /home/builder/pkg &&\ curl -o '/home/builder/pkg/PKGBUILD' https://gitlab.e.foundation/e/devices/easy-installer/-/raw/master/pkg/arch/PKGBUILD && \ cd /home/builder/pkg/ && \ sudo pacman -Syyu --noconfirm && \ - sudo pacman -Syy --noconfirm --noprogressbar base-devel git openssh && \ yes | makepkg -seo && \ - yes | sudo pacman -Scc && sudo rm -fr /var/lib/pacman/sync/*1 + yes | sudo pacman -Scc && sudo rm -fr /var/lib/pacman/sync/* # remove files after installing dependecies RUN sudo rm -rf /home/builder/pkg/ -- GitLab From 3accc75e006ebfb30cfd939ab559921f800f9a94 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Wed, 18 May 2022 13:48:37 +0600 Subject: [PATCH 75/78] change SSH key var to SSH_PRIVATE_KEY_ED --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 39403374..6eaf6aa9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -126,7 +126,7 @@ publish-windows: before_script: - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' - eval $(ssh-agent -s) - - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null + - echo "$SSH_PRIVATE_KEY_ED" | tr -d '\r' | ssh-add - > /dev/null - mkdir -p ~/.ssh - chmod 700 ~/.ssh - echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts @@ -146,7 +146,7 @@ publish-windows: before_script: # store the private key into the agent's memory - eval $(ssh-agent -s) - - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null + - echo "$SSH_PRIVATE_KEY_ED" | tr -d '\r' | ssh-add - > /dev/null # add 'aur' to SSH configure - install -m '700' -d ~/.ssh - echo -e "Host aur aur.archlinux.org\n User aur\n Hostname aur.archlinux.org" > ~/.ssh/config -- GitLab From 3eab0a056a5fb9af94eae6af7d6cdbae76c000f0 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Wed, 18 May 2022 13:55:30 +0600 Subject: [PATCH 76/78] only deploy on tag and deploy manually --- .gitlab-ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6eaf6aa9..e5aeae87 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -174,4 +174,9 @@ publish-aur: extends: - .publish-aur environment: - name: aur-repo \ No newline at end of file + name: aur-repo + rules: + - if: '$CI_COMMIT_TAG' + when: manual + only: + - tags -- GitLab From 008dd2b6aa49e1d2bea8d291c205f00cd45c9686 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Wed, 18 May 2022 13:55:30 +0600 Subject: [PATCH 77/78] only deploy on tag and deploy manually --- .gitlab-ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6eaf6aa9..1436bc5c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -174,4 +174,7 @@ publish-aur: extends: - .publish-aur environment: - name: aur-repo \ No newline at end of file + name: aur-repo + rules: + - if: '$CI_COMMIT_TAG' + when: manual -- GitLab From 39ce1d9dfdb9440f8deea96c0becc3188632cdb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnau=20V=C3=A0zquez?= Date: Wed, 18 May 2022 08:25:27 +0000 Subject: [PATCH 78/78] test -- GitLab