use prebuild images & do not enforce tag&branch
This commit is contained in:
parent
7f1202ac20
commit
44bc39b8d5
2 changed files with 20 additions and 14 deletions
|
@ -9,18 +9,16 @@ services:
|
||||||
- docker:19.03.12-dind
|
- docker:19.03.12-dind
|
||||||
|
|
||||||
.cljs-job: &cljs
|
.cljs-job: &cljs
|
||||||
image: node:lts-buster
|
image: domaindrivenarchitecture/shadow-cljs
|
||||||
cache:
|
cache:
|
||||||
key: ${CI_COMMIT_REF_SLUG}
|
key: ${CI_COMMIT_REF_SLUG}
|
||||||
paths:
|
paths:
|
||||||
- node_modules/
|
- node_modules/
|
||||||
before_script:
|
before_script:
|
||||||
- apt update && apt -qqy install openjdk-11-jre-headless
|
|
||||||
- npm install -g --save-dev shadow-cljs
|
|
||||||
- npm install
|
- npm install
|
||||||
|
|
||||||
.js-job: &js-upload
|
.cljs-upload-job: &cljs-upload
|
||||||
image: node:lts-buster
|
image: domaindrivenarchitecture/shadow-cljs
|
||||||
cache:
|
cache:
|
||||||
key: ${CI_COMMIT_REF_SLUG}
|
key: ${CI_COMMIT_REF_SLUG}
|
||||||
paths:
|
paths:
|
||||||
|
@ -33,7 +31,7 @@ services:
|
||||||
- cp target/mastodon-bot.js.sha512 target/npm-build/
|
- cp target/mastodon-bot.js.sha512 target/npm-build/
|
||||||
- cp README.md target/npm-build/
|
- cp README.md target/npm-build/
|
||||||
|
|
||||||
.clj-job: &clj
|
.clj-uploadjob: &clj-upload
|
||||||
image: clojure:lein-2.7.1-alpine
|
image: clojure:lein-2.7.1-alpine
|
||||||
before_script:
|
before_script:
|
||||||
- echo "{:auth {:repository-auth {#\"clojars\" {:username \"${CLOJARS_USER}\" :password \"${CLOJARS_PASSWORD}\" }}}}" > ~/.lein/profiles.clj
|
- 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
|
- template: Security/SAST.gitlab-ci.yml
|
||||||
|
|
||||||
upload-cljs-prerelease:
|
upload-cljs-prerelease:
|
||||||
<<: *js-upload
|
<<: *cljs-upload
|
||||||
stage: upload
|
stage: upload
|
||||||
rules:
|
rules:
|
||||||
- if: '$CI_COMMIT_BRANCH == "master" && $CI_COMMIT_TAG == null'
|
- if: '$CI_COMMIT_BRANCH == "master" && $CI_COMMIT_TAG == null'
|
||||||
|
@ -94,26 +92,34 @@ upload-cljs-prerelease:
|
||||||
- npm publish ./target/npm-build --access public
|
- npm publish ./target/npm-build --access public
|
||||||
|
|
||||||
upload-clj-prerelease:
|
upload-clj-prerelease:
|
||||||
<<: *clj
|
<<: *clj-upload
|
||||||
stage: upload
|
stage: upload
|
||||||
rules:
|
rules:
|
||||||
- if: '$CI_COMMIT_BRANCH == "master" && $CI_COMMIT_TAG == null'
|
- if: '$CI_COMMIT_BRANCH == "master" && $CI_COMMIT_TAG == null'
|
||||||
script:
|
script:
|
||||||
- lein deploy clojars
|
- lein deploy clojars
|
||||||
|
|
||||||
upload-js-release:
|
upload-cljs-release:
|
||||||
<<: *js-upload
|
<<: *cljs-upload
|
||||||
stage: upload
|
stage: upload
|
||||||
rules:
|
rules:
|
||||||
- if: '$CI_COMMIT_BRANCH == "master" && $CI_COMMIT_TAG != null'
|
- if: '$CI_COMMIT_TAG != null'
|
||||||
script:
|
script:
|
||||||
- cp package.json target/npm-build/
|
- cp package.json target/npm-build/
|
||||||
- npm publish ./target/npm-build --access public
|
- 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:
|
build:
|
||||||
image: domaindrivenarchitecture/dda-devops-build:latest
|
image: domaindrivenarchitecture/devops-build:latest
|
||||||
stage: image
|
stage: image
|
||||||
rules:
|
rules:
|
||||||
- if: '$CI_COMMIT_BRANCH == "master" && $CI_COMMIT_TAG != null'
|
- if: '$CI_COMMIT_TAG != null'
|
||||||
script:
|
script:
|
||||||
- cd infrastructure/docker && pyb image test publish
|
- cd infrastructure/docker && pyb image test publish
|
|
@ -2,7 +2,7 @@
|
||||||
"name": "mastodon-bot",
|
"name": "mastodon-bot",
|
||||||
"description": "Bot to publish twitter, tumblr or rss posts to an mastodon account.",
|
"description": "Bot to publish twitter, tumblr or rss posts to an mastodon account.",
|
||||||
"author": "Dmitri Sotnikov",
|
"author": "Dmitri Sotnikov",
|
||||||
"version": "1.10.5",
|
"version": "1.10.6",
|
||||||
"homepage": "https://github.com/yogthos/mastodon-bot",
|
"homepage": "https://github.com/yogthos/mastodon-bot",
|
||||||
"repository": "https://www.npmjs.com/package/mastodon-bot",
|
"repository": "https://www.npmjs.com/package/mastodon-bot",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|
Reference in a new issue