From 1091787c0736557e41253b604ac1c05c860759ce Mon Sep 17 00:00:00 2001 From: Dean Lovett <dean.lovett@nexusmods.com> Date: Fri, 22 May 2020 12:09:50 +0100 Subject: [PATCH] feat: added initial commit --- Dockerfile | 20 ++++++++++++++++++++ src/release.sh | 7 +++++++ 2 files changed, 27 insertions(+) create mode 100644 Dockerfile create mode 100644 src/release.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ecb5b8d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM node:14-buster-slim + +RUN apt-get update && apt-get install -y --no-install-recommends git-core ca-certificates openssh-client \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +RUN npm i -g standard-version + +RUN git config --global user.email "ci-versioning@nexusmods.com" +RUN git config --global user.name "git" + +RUN which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y ) +RUN eval $(ssh-agent -s) +RUN mkdir -p ~/.ssh +RUN chmod 700 ~/.ssh +RUN touch ~/.ssh/known_hosts +RUN chmod 644 ~/.ssh/known_hosts + +COPY src/ build/ +CMD ["/build/release.sh"] \ No newline at end of file diff --git a/src/release.sh b/src/release.sh new file mode 100644 index 0000000..24e26f0 --- /dev/null +++ b/src/release.sh @@ -0,0 +1,7 @@ +#!/bin/bash -e + +ssh git@gitlab.nexdev.uk +git clone git@gitlab.nexdev.uk:$(CI_PROJECT_PATH).git +cd $(CI_PROJECT_NAME) +standard-version +git push --follow-tags -o ci.skip \ No newline at end of file -- GitLab