diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..ecb5b8d2eb86abccb5ef322a1f5fc90f223212f5 --- /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 0000000000000000000000000000000000000000..24e26f021def9b19f236b7e483ed401e7a6a3101 --- /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