From bf6f18d9e108b7eac586abcf423b054cfa728f7b Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Wed, 18 May 2022 08:26:48 +0000 Subject: [PATCH 01/16] AUR packaging --- .gitlab-ci.yml | 83 +++++++++++++++++++++++++++++++++++++++++- check-version.sh | 5 ++- docker/Dockerfile.arch | 29 +++++++++++++++ 3 files changed, 114 insertions(+), 3 deletions(-) create mode 100644 docker/Dockerfile.arch diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e4489c50..1436bc5c 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/PKGBUILD" script: - ./check-version.sh rules: @@ -38,6 +39,25 @@ build-docker: - 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 +# 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: + - docker:20-dind + tags: + - generic_privileged + variables: + DOCKER_DRIVER: overlay2 + script: + - docker pull $CONTAINER_IMAGE/aur:$CONTAINER_TAG || true + - 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 + build-ubuntu: image: registry.gitlab.e.foundation/e/devices/easy-installer:stable stage: build @@ -51,7 +71,6 @@ build-ubuntu: paths: - easy-installer*.snap - build-windows: image: registry.gitlab.e.foundation/e/devices/easy-installer:stable stage: build @@ -67,6 +86,25 @@ build-windows: - Easy-installer-setup.exe - Easy-installer-setup.exe.sha256sum +.build-aur: + image: $CONTAINER_IMAGE/aur:$CONTAINER_TAG + stage: build + before_script: + - 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 + artifacts: + name: "easy-installer" + paths: + - /home/builder/$PUBLISH_DEST/easy-installer*.tar.zst + +build-aur: + extends: + - .build-aur + environment: + name: aur-repo + publish-ubuntu: image: registry.gitlab.e.foundation/e/devices/easy-installer:stable stage: publish @@ -88,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 @@ -99,3 +137,44 @@ publish-windows: rules: - if: '$CI_COMMIT_TAG' when: manual + +.publish-aur: + image: $CONTAINER_IMAGE/aur:$CONTAINER_TAG + stage: publish + variables: + RELEASE_TYPE: beta + before_script: + # store the private key into the agent's memory + - eval $(ssh-agent -s) + - 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 + - ssh-keyscan aur.archlinux.org > ~/.ssh/known_hosts + + # config git + - git config --global user.email "$PUBLISH_USER_EMAIL" + - git config --global user.name "$PUBLISH_USER" + script: + # Clone AUR repo + - git clone ssh://aur@aur.archlinux.org/$PUBLISH_DEST.git + # Clone the source /e/ repo + - 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 + - | + cd $PUBLISH_DEST/ && + makepkg --printsrcinfo > .SRCINFO && + git add . && + git commit -m "$CI_COMMIT_TAG" && + git push + +publish-aur: + extends: + - .publish-aur + environment: + name: aur-repo + rules: + - if: '$CI_COMMIT_TAG' + when: manual diff --git a/check-version.sh b/check-version.sh index 6f16c304..a1eb312a 100755 --- a/check-version.sh +++ b/check-version.sh @@ -9,9 +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/[^=]*= *//;s/.*/v&-beta/') +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 diff --git a/docker/Dockerfile.arch b/docker/Dockerfile.arch new file mode 100644 index 00000000..eb01985b --- /dev/null +++ b/docker/Dockerfile.arch @@ -0,0 +1,29 @@ +FROM archlinux:base-devel + +# update pacman and install sudo git openssh +RUN pacman -Syyu --noconfirm && \ + 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 +RUN useradd -m builder && \ + echo "builder ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers + +# make /home/builder working directory +WORKDIR /home/builder + +# run as user +USER builder + +# install build dependencies +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 && \ + yes | makepkg -seo && \ + yes | sudo pacman -Scc && sudo rm -fr /var/lib/pacman/sync/* + +# remove files after installing dependecies +RUN sudo rm -rf /home/builder/pkg/ + +CMD ["/usr/bin/bash"] \ No newline at end of file -- GitLab From 32f6e2d80050bec2aad51fbfe182dbedf680e850 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnau=20V=C3=A0zquez?= Date: Wed, 18 May 2022 08:30:16 +0000 Subject: [PATCH 02/16] Recover RSA key for windows publishing --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1436bc5c..c6b0ce59 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_ED" | tr -d '\r' | ssh-add - > /dev/null + - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null - mkdir -p ~/.ssh - chmod 700 ~/.ssh - echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts -- GitLab From 5ff03babb523ede453571d0958a34fda2721ccfd Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Wed, 18 May 2022 15:03:42 +0600 Subject: [PATCH 03/16] copy repo instead of cloning --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c6b0ce59..c92e0c71 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 $CI_REPOSITORY_URL -b $CI_COMMIT_TAG /home/builder/easy-installer-src + - cp -a . /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 @@ -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 @@ -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 $CI_REPOSITORY_URL -b $CI_COMMIT_TAG easy-installer-src + - cp -a . 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 b66cf055e959ee537ec9d6f6a3e80b7f89a5c332 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Wed, 18 May 2022 15:39:42 +0600 Subject: [PATCH 04/16] fix absolute paths with relative ones --- .gitlab-ci.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c92e0c71..4e7e4233 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -90,14 +90,13 @@ build-windows: image: $CONTAINER_IMAGE/aur:$CONTAINER_TAG stage: build before_script: - - cp -a . /home/builder/easy-installer-src - - mkdir $PUBLISH_DEST && cp -a /home/builder/easy-installer-src/pkg/arch/. /home/builder/$PUBLISH_DEST + - mkdir $PUBLISH_DEST && cp -a ~/easy-installer-src/pkg/arch/. ~/$PUBLISH_DEST script: - - cd /home/builder/$PUBLISH_DEST && makepkg -sifc --noconfirm + - cd ~/$PUBLISH_DEST && makepkg -sifc --noconfirm artifacts: name: "easy-installer" paths: - - /home/builder/$PUBLISH_DEST/easy-installer*.tar.zst + - ~/$PUBLISH_DEST/easy-installer*.tar.zst build-aur: extends: -- GitLab From 092d394b9f81aaa8f9c9bb29582bffffe661eb41 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Wed, 18 May 2022 15:47:38 +0600 Subject: [PATCH 05/16] fix the SSH key var name for windows --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4e7e4233..9c5fcc50 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -90,6 +90,7 @@ build-windows: image: $CONTAINER_IMAGE/aur:$CONTAINER_TAG stage: build before_script: + - mkdir $PUBLISH_DEST && cp -a ~/easy-installer-src/pkg/arch/. ~/$PUBLISH_DEST script: - cd ~/$PUBLISH_DEST && makepkg -sifc --noconfirm @@ -125,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_ED" | tr -d '\r' | ssh-add - > /dev/null + - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null - mkdir -p ~/.ssh - chmod 700 ~/.ssh - echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts -- GitLab From b717c66682941c152cd56f5ac19c5f568ca551df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnau=20V=C3=A0zquez?= Date: Wed, 18 May 2022 09:52:59 +0000 Subject: [PATCH 06/16] remove empty line --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9c5fcc50..67e7e73c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -90,7 +90,6 @@ build-windows: image: $CONTAINER_IMAGE/aur:$CONTAINER_TAG stage: build before_script: - - mkdir $PUBLISH_DEST && cp -a ~/easy-installer-src/pkg/arch/. ~/$PUBLISH_DEST script: - cd ~/$PUBLISH_DEST && makepkg -sifc --noconfirm -- GitLab From 45b889ad00b5e4e11cf1d48281a4d58dde713296 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Wed, 18 May 2022 16:46:46 +0600 Subject: [PATCH 07/16] fix source path --- .gitlab-ci.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 67e7e73c..56cf4f3e 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: - - mkdir $PUBLISH_DEST && cp -a ~/easy-installer-src/pkg/arch/. ~/$PUBLISH_DEST + - mkdir $PUBLISH_DEST && cp -a ./pkg/arch/. ~/$PUBLISH_DEST script: - cd ~/$PUBLISH_DEST && makepkg -sifc --noconfirm artifacts: @@ -150,15 +150,12 @@ 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 - # config git - git config --global user.email "$PUBLISH_USER_EMAIL" - git config --global user.name "$PUBLISH_USER" script: # Clone AUR repo - git clone ssh://aur@aur.archlinux.org/$PUBLISH_DEST.git - # Clone the source /e/ repo - - cp -a . 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 37b996dc0faa7a1a6a479569712456612a0fa60b Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Wed, 18 May 2022 17:01:50 +0600 Subject: [PATCH 08/16] [skip ci] fix artifacts path --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 56cf4f3e..6893b033 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -96,7 +96,7 @@ build-windows: artifacts: name: "easy-installer" paths: - - ~/$PUBLISH_DEST/easy-installer*.tar.zst + - ~/$PUBLISH_DEST/*/easy-installer*.tar.zst build-aur: extends: -- GitLab From c1d8ac3c5f5112aca46508917f179738b3e2b09e Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Wed, 18 May 2022 17:01:50 +0600 Subject: [PATCH 09/16] [skip ci] fix artifacts path --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 56cf4f3e..6893b033 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -96,7 +96,7 @@ build-windows: artifacts: name: "easy-installer" paths: - - ~/$PUBLISH_DEST/easy-installer*.tar.zst + - ~/$PUBLISH_DEST/*/easy-installer*.tar.zst build-aur: extends: -- GitLab From 03995772e2442c7c46e82180c6f58744db10136b Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Wed, 18 May 2022 19:15:26 +0600 Subject: [PATCH 10/16] change build artifact path --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6893b033..56cf4f3e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -96,7 +96,7 @@ build-windows: artifacts: name: "easy-installer" paths: - - ~/$PUBLISH_DEST/*/easy-installer*.tar.zst + - ~/$PUBLISH_DEST/easy-installer*.tar.zst build-aur: extends: -- GitLab From 517e53ba244fcdfe5438f8dfecb08db82d1da170 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Wed, 18 May 2022 19:48:55 +0600 Subject: [PATCH 11/16] fix artifact path --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6893b033..56cf4f3e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -96,7 +96,7 @@ build-windows: artifacts: name: "easy-installer" paths: - - ~/$PUBLISH_DEST/*/easy-installer*.tar.zst + - ~/$PUBLISH_DEST/easy-installer*.tar.zst build-aur: extends: -- GitLab From b8762ba7b723af6e51e9820a8d5516ff645efc0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnau=20V=C3=A0zquez?= Date: Thu, 19 May 2022 08:57:57 +0000 Subject: [PATCH 12/16] test different syntax --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 56cf4f3e..ca683d90 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -96,7 +96,7 @@ build-windows: artifacts: name: "easy-installer" paths: - - ~/$PUBLISH_DEST/easy-installer*.tar.zst + - ~/$PUBLISH_DEST/**.pkg.tar.zst build-aur: extends: -- GitLab From 3a122bd28de4929eda32b3ec2406476fbce34cb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnau=20V=C3=A0zquez?= Date: Thu, 19 May 2022 09:24:03 +0000 Subject: [PATCH 13/16] test --- .gitlab-ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ca683d90..f8b25dee 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,6 +24,13 @@ check-version: - if: '$CI_COMMIT_TAG' when: always +dummy: + stage: test + script: + - ls -alh + - pwd + - whoami + build-docker: image: docker:19 stage: prepare -- GitLab From 952cd8c6de66808d978c8d8148807149077b2a4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnau=20V=C3=A0zquez?= Date: Thu, 19 May 2022 09:44:50 +0000 Subject: [PATCH 14/16] more tests --- .gitlab-ci.yml | 6 ++++-- docker/Dockerfile.arch | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f8b25dee..88e98991 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,7 +29,7 @@ dummy: script: - ls -alh - pwd - - whoami + - echo $HOME build-docker: image: docker:19 @@ -97,9 +97,11 @@ build-windows: image: $CONTAINER_IMAGE/aur:$CONTAINER_TAG stage: build before_script: - - mkdir $PUBLISH_DEST && cp -a ./pkg/arch/. ~/$PUBLISH_DEST + - pwd && echo $HOME && whoami + - mkdir ~/$PUBLISH_DEST && cp -a ./pkg/arch/. ~/$PUBLISH_DEST script: - cd ~/$PUBLISH_DEST && makepkg -sifc --noconfirm + - ls -alh ~/$PUBLISH_DEST artifacts: name: "easy-installer" paths: diff --git a/docker/Dockerfile.arch b/docker/Dockerfile.arch index eb01985b..d3c20208 100644 --- a/docker/Dockerfile.arch +++ b/docker/Dockerfile.arch @@ -26,4 +26,4 @@ RUN mkdir /home/builder/pkg &&\ # remove files after installing dependecies RUN sudo rm -rf /home/builder/pkg/ -CMD ["/usr/bin/bash"] \ No newline at end of file +CMD ["/usr/bin/bash"] -- GitLab From 8b7603d155dea9dc1ab56347bb2e243f8da8f03e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnau=20V=C3=A0zquez?= Date: Thu, 19 May 2022 10:19:05 +0000 Subject: [PATCH 15/16] Move artifacts def, change path --- .gitlab-ci.yml | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 88e98991..880afd54 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,13 +24,6 @@ check-version: - if: '$CI_COMMIT_TAG' when: always -dummy: - stage: test - script: - - ls -alh - - pwd - - echo $HOME - build-docker: image: docker:19 stage: prepare @@ -97,21 +90,19 @@ build-windows: image: $CONTAINER_IMAGE/aur:$CONTAINER_TAG stage: build before_script: - - pwd && echo $HOME && whoami - - mkdir ~/$PUBLISH_DEST && cp -a ./pkg/arch/. ~/$PUBLISH_DEST + - mkdir $PUBLISH_DEST && cp -a pkg/arch/. $PUBLISH_DEST script: - - cd ~/$PUBLISH_DEST && makepkg -sifc --noconfirm - - ls -alh ~/$PUBLISH_DEST - artifacts: - name: "easy-installer" - paths: - - ~/$PUBLISH_DEST/**.pkg.tar.zst + - cd $PUBLISH_DEST && makepkg -sifc --noconfirm build-aur: extends: - .build-aur environment: name: aur-repo + artifacts: + name: "easy-installer-aur" + paths: + - $PUBLISH_DEST/*.pkg.tar.zst publish-ubuntu: image: registry.gitlab.e.foundation/e/devices/easy-installer:stable -- GitLab From c9046d90573dc23fb52669a122b5a7d70ca72359 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Thu, 19 May 2022 16:39:32 +0600 Subject: [PATCH 16/16] change AUR clone URL to match project name also minor fix of copy path --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 880afd54..92b76b0f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -155,12 +155,12 @@ publish-windows: - git config --global user.name "$PUBLISH_USER" script: # Clone AUR repo - - git clone ssh://aur@aur.archlinux.org/$PUBLISH_DEST.git + - git clone ssh://aur@aur.archlinux.org/$CI_PROJECT_NAME.git # Copy package file from source to AUR clone - - cp -a easy-installer-src/pkg/arch/. $PUBLISH_DEST/ + - cp -a pkg/arch/. $CI_PROJECT_NAME/ # Generate add, commit and push - | - cd $PUBLISH_DEST/ && + cd $CI_PROJECT_NAME/ && makepkg --printsrcinfo > .SRCINFO && git add . && git commit -m "$CI_COMMIT_TAG" && -- GitLab