Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • prosper/gitlab-ci-cd
1 result
Show changes
Commits on Source (9)
......@@ -3,16 +3,27 @@ stages:
- release
- build
image: griefed/gitlab-ci-cd:2.0.7
services:
- name: docker:dind
- name: ghcr.io/griefed/gitlab-ci-cd:2.0.8
alias: docker
image: ghcr.io/griefed/gitlab-ci-cd:2.0.8
variables:
project_name: $CI_PROJECT_NAME
SEMANTIC_RELEASE_PACKAGE: $CI_PROJECT_NAME
workflow:
rules:
- if: '$CI_MERGE_REQUEST_EVENT_TYPE == "detached"'
when: never
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never
- when: always
test docker:
stage: test
image: ghcr.io/griefed/gitlab-ci-cd:2.0.8
before_script:
- docker login -u "$DOCKERHUB_USER" -p "$DOCKERHUB_TOKEN" docker.io
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
......@@ -34,6 +45,7 @@ test docker:
release:
needs: ['test docker']
image: ghcr.io/griefed/gitlab-ci-cd:2.0.8
stage: release
script:
- npx semantic-release
......@@ -47,6 +59,7 @@ release:
build:
stage: build
image: ghcr.io/griefed/gitlab-ci-cd:2.0.8
before_script:
- docker login -u "$DOCKERHUB_USER" -p "$DOCKERHUB_TOKEN" docker.io
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
......@@ -78,7 +91,7 @@ Check Packages:on-schedule:
if [[ "$(git config --list | grep user.email)" != "user.email=$GIT_MAIL" ]];then
git config --global user.email $GIT_MAIL
fi
# Clean system of potentially interrupting images
docker image rm -f $DOCKERHUB_USER/$DOCKERHUB_REPO:latest
docker image rm -f $DOCKERHUB_REPO
......@@ -91,51 +104,51 @@ Check Packages:on-schedule:
# Clone the repository
git clone $CI_PROJECT_URL.git /tmp/$CI_PROJECT_PATH && \
cd /tmp/$CI_PROJECT_PATH && \
if [ ! -s "package_versions.txt" ];then
echo "No package_versions.txt available..." && \
# Gather package information from latest build
docker run --rm --entrypoint /bin/sh -v /tmp/$CI_PROJECT_PATH:/tmp $DOCKERHUB_USER/$DOCKERHUB_REPO:latest -c '\
apk info -v > /tmp/package_versions.txt && \
sort -o /tmp/package_versions.txt /tmp/package_versions.txt && \
chmod 777 /tmp/package_versions.txt' && \
# Checkout our branch
git checkout -f $CI_DEFAULT_BRANCH && \
wait && \
# Add and commit new file to repository
git add package_versions.txt && \
git commit -m 'chore: Add list of package versions.' && \
# Push the changes to the remote
git push "https://$GIT_USER:$GITLAB_TOKEN@$CI_SERVER_HOST/$CI_PROJECT_PATH.git" --all && \
# Nice
echo "package_versions.txt added."
echo "package_versions.txt added."
elif [ -s "package_versions.txt" ];then
echo "Local package_versions.txt available..." && \
# Build local image for new package versions list
docker build --no-cache --tag $DOCKERHUB_REPO . && \
# Get packages from newly build local image
docker run --rm --entrypoint /bin/sh -v /tmp/$CI_PROJECT_PATH:/tmp $DOCKERHUB_REPO -c '\
apk info -v > /tmp/package_versions_new.txt && \
sort -o /tmp/package_versions_new.txt /tmp/package_versions_new.txt && \
chmod 777 /tmp/package_versions_new.txt' && \
# Get checksum of old packages
OLD_CHECKSUM=$(md5sum package_versions.txt | cut -f1 -d" ") && \
# Get checksum of new packages
NEW_CHECKSUM=$(md5sum package_versions_new.txt | cut -f1 -d" ")
# If new checksum is not the same as old checksum, we have new versions
if [ "${OLD_CHECKSUM}" != "${NEW_CHECKSUM}" ]; then
......@@ -143,25 +156,25 @@ Check Packages:on-schedule:
# Checkout our branch
git checkout -f $CI_DEFAULT_BRANCH && \
# Copy the new package versions list to repository
mv -f package_versions_new.txt package_versions.txt && \
wait && \
# Add and commit new file to repository
git add package_versions.txt && \
git commit -m 'build: Update installed packages.' && \
git commit -m 'build: Update installed packages in Docker container.' && \
# Push the changes to the remote
git push "https://$GIT_USER:$GITLAB_TOKEN@$CI_SERVER_HOST/$CI_PROJECT_PATH.git" --all && \
# Nice
echo "Packages updated."
else
echo "No package updates available."
fi
fi
echo "Comparison complete."
after_script:
......
## [2.0.9](https://git.griefed.de/prosper/gitlab-ci-cd/compare/2.0.8...2.0.9) (2022-08-01)
### 🦊 CI/CD
* Update installed packages in Docker container. ([794c42e](https://git.griefed.de/prosper/gitlab-ci-cd/commit/794c42e3265836d68fb145b0a72e314fa5ec1aae))
### Other
* **deps:** update dependency griefed/gitlab-ci-cd to v2.0.8 ([a099cbd](https://git.griefed.de/prosper/gitlab-ci-cd/commit/a099cbd83d209d3e66a88b5636287c357ccc02aa))
## [2.0.8](https://git.griefed.de/prosper/gitlab-ci-cd/compare/2.0.7...2.0.8) (2022-07-01)
......
......@@ -5,10 +5,10 @@ apk-tools-2.12.7-r3
bash-5.1.16-r0
brotli-libs-1.0.9-r5
btrfs-progs-5.15.1-r0
busybox-1.34.1-r5
busybox-1.34.1-r7
c-ares-1.18.1-r0
ca-certificates-20211220-r0
ca-certificates-bundle-20211220-r0
ca-certificates-20220614-r0
ca-certificates-bundle-20220614-r0
curl-7.80.0-r2
e2fsprogs-1.46.4-r0
e2fsprogs-extra-1.46.4-r0
......@@ -19,7 +19,7 @@ expat-2.4.7-r0
fontconfig-2.13.1-r4
freetype-2.11.1-r2
giflib-5.2.1-r0
git-2.34.2-r0
git-2.34.4-r0
icu-libs-69.1-r1
inih-53-r1
ip6tables-1.8.7-r1
......@@ -37,7 +37,7 @@ libbz2-1.0.8-r1
libc-utils-0.7.2-r3
libc6-compat-1.2.2-r7
libcom_err-1.46.4-r0
libcrypto1.1-1.1.1p-r0
libcrypto1.1-1.1.1q-r0
libcurl-7.80.0-r2
libedit-20210910.3.1-r0
libffi-3.4.2-r1
......@@ -51,7 +51,7 @@ libmnl-1.0.4-r2
libnftnl-1.2.1-r0
libpng-1.6.37-r1
libretls-3.3.4-r3
libssl1.1-1.1.1p-r0
libssl1.1-1.1.1q-r0
libstdc++-10.3.1_git20211027-r0
libtasn1-4.18.0-r0
libtirpc-1.3.2-r0
......@@ -72,8 +72,8 @@ lzo-2.10-r2
mkfontscale-1.2.1-r1
musl-1.2.2-r7
musl-utils-1.2.2-r7
ncurses-libs-6.3_p20211120-r0
ncurses-terminfo-base-6.3_p20211120-r0
ncurses-libs-6.3_p20211120-r1
ncurses-terminfo-base-6.3_p20211120-r1
nghttp2-libs-1.46.0-r0
nodejs-current-17.9.0-r0
npm-8.1.3-r0
......@@ -87,7 +87,7 @@ openjdk8-jre-lib-8.322.06-r0
openssh-client-common-8.8_p1-r1
openssh-client-default-8.8_p1-r1
openssh-keygen-8.8_p1-r1
openssl-1.1.1p-r0
openssl-1.1.1q-r0
p11-kit-0.24.0-r1
p11-kit-trust-0.24.0-r1
pcre2-10.40-r0
......@@ -97,7 +97,7 @@ readline-8.1.1-r0
scanelf-1.3.3-r0
shadow-uidmap-4.8.1-r1
sqlite-libs-3.36.0-r0
ssl_client-1.34.1-r5
ssl_client-1.34.1-r7
ttf-dejavu-2.37-r1
xfsprogs-5.13.0-r0
xz-5.2.5-r1
......
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base"
"config:base",
],
"labels": ["dependencies"],
"assignees": ["Griefed"]
......