From 44bc39b8d54c1e2f6f3a87d63ca329a1dc659f24 Mon Sep 17 00:00:00 2001 From: jem Date: Fri, 12 Mar 2021 16:03:55 +0100 Subject: [PATCH] use prebuild images & do not enforce tag&branch --- .gitlab-ci.yml | 32 +++++++++++++++++++------------- package.json | 2 +- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c65c090..8c417ae 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,18 +9,16 @@ services: - docker:19.03.12-dind .cljs-job: &cljs - image: node:lts-buster + image: domaindrivenarchitecture/shadow-cljs cache: key: ${CI_COMMIT_REF_SLUG} paths: - node_modules/ before_script: - - apt update && apt -qqy install openjdk-11-jre-headless - - npm install -g --save-dev shadow-cljs - npm install -.js-job: &js-upload - image: node:lts-buster +.cljs-upload-job: &cljs-upload + image: domaindrivenarchitecture/shadow-cljs cache: key: ${CI_COMMIT_REF_SLUG} paths: @@ -33,7 +31,7 @@ services: - cp target/mastodon-bot.js.sha512 target/npm-build/ - cp README.md target/npm-build/ -.clj-job: &clj +.clj-uploadjob: &clj-upload image: clojure:lein-2.7.1-alpine before_script: - echo "{:auth {:repository-auth {#\"clojars\" {:username \"${CLOJARS_USER}\" :password \"${CLOJARS_PASSWORD}\" }}}}" > ~/.lein/profiles.clj @@ -84,7 +82,7 @@ include: - template: Security/SAST.gitlab-ci.yml upload-cljs-prerelease: - <<: *js-upload + <<: *cljs-upload stage: upload rules: - if: '$CI_COMMIT_BRANCH == "master" && $CI_COMMIT_TAG == null' @@ -94,26 +92,34 @@ upload-cljs-prerelease: - npm publish ./target/npm-build --access public upload-clj-prerelease: - <<: *clj + <<: *clj-upload stage: upload rules: - if: '$CI_COMMIT_BRANCH == "master" && $CI_COMMIT_TAG == null' script: - lein deploy clojars -upload-js-release: - <<: *js-upload +upload-cljs-release: + <<: *cljs-upload stage: upload rules: - - if: '$CI_COMMIT_BRANCH == "master" && $CI_COMMIT_TAG != null' + - if: '$CI_COMMIT_TAG != null' script: - cp package.json target/npm-build/ - npm publish ./target/npm-build --access public +upload-clj-release: + <<: *clj-upload + stage: upload + rules: + - if: '$CI_COMMIT_TAG != null' + script: + - lein deploy clojars + build: - image: domaindrivenarchitecture/dda-devops-build:latest + image: domaindrivenarchitecture/devops-build:latest stage: image rules: - - if: '$CI_COMMIT_BRANCH == "master" && $CI_COMMIT_TAG != null' + - if: '$CI_COMMIT_TAG != null' script: - cd infrastructure/docker && pyb image test publish \ No newline at end of file diff --git a/package.json b/package.json index 7f8bf6e..0268be6 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "mastodon-bot", "description": "Bot to publish twitter, tumblr or rss posts to an mastodon account.", "author": "Dmitri Sotnikov", - "version": "1.10.5", + "version": "1.10.6", "homepage": "https://github.com/yogthos/mastodon-bot", "repository": "https://www.npmjs.com/package/mastodon-bot", "license": "MIT",