From 7e79580a9ae2bedbdd73aaee3d85f5a0c8f05e5c Mon Sep 17 00:00:00 2001 From: SZinkevych Date: Wed, 13 Oct 2021 10:12:14 +0200 Subject: [PATCH 01/21] slack notification --- concourse/pipeline.yml | 15 +++++++++++++++ concourse/scripts/publish.sh | 2 ++ 2 files changed, 17 insertions(+) diff --git a/concourse/pipeline.yml b/concourse/pipeline.yml index a16d4b371..5adaf5a3a 100644 --- a/concourse/pipeline.yml +++ b/concourse/pipeline.yml @@ -1,5 +1,16 @@ --- +resource_types: + - name: slack-notification + type: docker-image + source: + repository: cfcommunity/slack-notification-resource + resources: + - name: notify + type: slack-notification + source: + url: ((slack-webhook)) + - name: fauna-js-repository type: git icon: github @@ -19,6 +30,10 @@ jobs: - name: release serial: true public: false + on_success: + put: notify + params: + text_file: fauna-js-repository/slack-message plan: - get: fauna-js-repository - get: fauna-js-repository-docs diff --git a/concourse/scripts/publish.sh b/concourse/scripts/publish.sh index ca4addef5..bcea7612f 100755 --- a/concourse/scripts/publish.sh +++ b/concourse/scripts/publish.sh @@ -20,7 +20,9 @@ then echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc npm publish rm .npmrc + echo "faunadb-js@$PACKAGE_VERSION publushed to npm" > slack-message else +echo "NPM package already published on npm with version ${NPM_LATEST_VERSION}. Update version, please" > slack-message echo "NPM package already published on npm with version ${NPM_LATEST_VERSION}" 1>&2 exit 1 fi From 72e636c68ebe3409052764f6eb265a376eb1ca6b Mon Sep 17 00:00:00 2001 From: SZinkevych Date: Wed, 13 Oct 2021 11:14:24 +0200 Subject: [PATCH 02/21] up --- concourse/pipeline.yml | 38 ++++++++++++++++++++---------------- concourse/scripts/publish.sh | 6 +++--- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/concourse/pipeline.yml b/concourse/pipeline.yml index 5adaf5a3a..ac700d160 100644 --- a/concourse/pipeline.yml +++ b/concourse/pipeline.yml @@ -16,7 +16,7 @@ resources: icon: github source: uri: https://github.com/fauna/faunadb-js.git - branch: main + branch: FE-1667_slack_notification - name: fauna-js-repository-docs type: git @@ -34,30 +34,34 @@ jobs: put: notify params: text_file: fauna-js-repository/slack-message + on_failure: + put: notify + params: + text_file: fauna-js-repository/slack-message plan: - get: fauna-js-repository - get: fauna-js-repository-docs - - task: integration-tests - file: fauna-js-repository/concourse/tasks/integration-tests.yml - privileged: true - params: - FAUNA_ROOT_KEY: ((fauna.secret)) - FAUNA_DOMAIN: ((fauna.domain)) - FAUNA_SCHEME: ((fauna.scheme)) - FAUNA_PORT: ((fauna.port)) - AUTH_0_URI: ((fauna/auth0.uri)) - AUTH_0_CLIENT_ID: ((fauna/auth0/client.id)) - AUTH_0_CLIENT_SECRET: ((fauna/auth0/client.secret)) + # - task: integration-tests + # file: fauna-js-repository/concourse/tasks/integration-tests.yml + # privileged: true + # params: + # FAUNA_ROOT_KEY: ((fauna.secret)) + # FAUNA_DOMAIN: ((fauna.domain)) + # FAUNA_SCHEME: ((fauna.scheme)) + # FAUNA_PORT: ((fauna.port)) + # AUTH_0_URI: ((fauna/auth0.uri)) + # AUTH_0_CLIENT_ID: ((fauna/auth0/client.id)) + # AUTH_0_CLIENT_SECRET: ((fauna/auth0/client.secret)) - task: browserify-and-npm-publish file: fauna-js-repository/concourse/tasks/browserify-and-npm-publish.yml params: NPM_TOKEN: ((npm_token)) - - task: publish-docs - file: fauna-js-repository/concourse/tasks/publish-docs.yml + # - task: publish-docs + # file: fauna-js-repository/concourse/tasks/publish-docs.yml - - put: fauna-js-repository-docs - params: - repository: fauna-js-repository-updated-docs + # - put: fauna-js-repository-docs + # params: + # repository: fauna-js-repository-updated-docs diff --git a/concourse/scripts/publish.sh b/concourse/scripts/publish.sh index bcea7612f..9ec3f9913 100755 --- a/concourse/scripts/publish.sh +++ b/concourse/scripts/publish.sh @@ -18,11 +18,11 @@ if [ "$PACKAGE_VERSION" \> "$NPM_LATEST_VERSION" ] then echo "Publishing a new version..." echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc - npm publish - rm .npmrc + # npm publish + # rm .npmrc echo "faunadb-js@$PACKAGE_VERSION publushed to npm" > slack-message else -echo "NPM package already published on npm with version ${NPM_LATEST_VERSION}. Update version, please" > slack-message + echo "NPM package already published on npm with version ${NPM_LATEST_VERSION}. Update version, please" > slack-message echo "NPM package already published on npm with version ${NPM_LATEST_VERSION}" 1>&2 exit 1 fi From 662f4fe659a62ac98255aa003c736f2ca936aff7 Mon Sep 17 00:00:00 2001 From: SZinkevych Date: Wed, 13 Oct 2021 11:19:01 +0200 Subject: [PATCH 03/21] up --- concourse/scripts/publish.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/concourse/scripts/publish.sh b/concourse/scripts/publish.sh index 9ec3f9913..9f16c5c80 100755 --- a/concourse/scripts/publish.sh +++ b/concourse/scripts/publish.sh @@ -4,11 +4,6 @@ set -eou cd ./fauna-js-repository -mkdir dist -npm install -npm run browserify -npm run browserify-min - PACKAGE_VERSION=$(node -p -e "require('./package.json').version") NPM_LATEST_VERSION=$(npm view faunadb version) echo "Current package version: $PACKAGE_VERSION" @@ -16,13 +11,20 @@ echo "Latest version in npm: $NPM_LATEST_VERSION" if [ "$PACKAGE_VERSION" \> "$NPM_LATEST_VERSION" ] then + mkdir dist + npm install + npm run browserify + npm run browserify-min + echo "Publishing a new version..." echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc # npm publish # rm .npmrc echo "faunadb-js@$PACKAGE_VERSION publushed to npm" > slack-message else + PWD echo "NPM package already published on npm with version ${NPM_LATEST_VERSION}. Update version, please" > slack-message + cat slack-message echo "NPM package already published on npm with version ${NPM_LATEST_VERSION}" 1>&2 exit 1 fi From 2a17a18af21e753031b5480d493130e920d0b843 Mon Sep 17 00:00:00 2001 From: SZinkevych Date: Wed, 13 Oct 2021 11:20:55 +0200 Subject: [PATCH 04/21] up --- concourse/scripts/publish.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/concourse/scripts/publish.sh b/concourse/scripts/publish.sh index 9f16c5c80..7bec8b88d 100755 --- a/concourse/scripts/publish.sh +++ b/concourse/scripts/publish.sh @@ -22,7 +22,8 @@ then # rm .npmrc echo "faunadb-js@$PACKAGE_VERSION publushed to npm" > slack-message else - PWD + result=${PWD##*/} + printf '%s\n' "${PWD##*/}" echo "NPM package already published on npm with version ${NPM_LATEST_VERSION}. Update version, please" > slack-message cat slack-message echo "NPM package already published on npm with version ${NPM_LATEST_VERSION}" 1>&2 From c9d7007a8a09d9b4f059800cfa638edd66018de3 Mon Sep 17 00:00:00 2001 From: SZinkevych Date: Wed, 13 Oct 2021 11:28:09 +0200 Subject: [PATCH 05/21] up --- concourse/pipeline.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/concourse/pipeline.yml b/concourse/pipeline.yml index ac700d160..8180a4561 100644 --- a/concourse/pipeline.yml +++ b/concourse/pipeline.yml @@ -30,14 +30,6 @@ jobs: - name: release serial: true public: false - on_success: - put: notify - params: - text_file: fauna-js-repository/slack-message - on_failure: - put: notify - params: - text_file: fauna-js-repository/slack-message plan: - get: fauna-js-repository - get: fauna-js-repository-docs @@ -58,6 +50,16 @@ jobs: file: fauna-js-repository/concourse/tasks/browserify-and-npm-publish.yml params: NPM_TOKEN: ((npm_token)) + outputs: + - name: slack_message + on_success: + put: notify + params: + text_file: slack-message + on_failure: + put: notify + params: + text_file: slack-message # - task: publish-docs # file: fauna-js-repository/concourse/tasks/publish-docs.yml From 156174ad1a9f3d020af58619ce77f5551f50c35d Mon Sep 17 00:00:00 2001 From: SZinkevych Date: Wed, 13 Oct 2021 11:30:55 +0200 Subject: [PATCH 06/21] up --- concourse/pipeline.yml | 4 ++-- concourse/scripts/publish.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/concourse/pipeline.yml b/concourse/pipeline.yml index 8180a4561..f0407c77a 100644 --- a/concourse/pipeline.yml +++ b/concourse/pipeline.yml @@ -55,11 +55,11 @@ jobs: on_success: put: notify params: - text_file: slack-message + text_file: slack-message/publish on_failure: put: notify params: - text_file: slack-message + text_file: slack-message/publish # - task: publish-docs # file: fauna-js-repository/concourse/tasks/publish-docs.yml diff --git a/concourse/scripts/publish.sh b/concourse/scripts/publish.sh index 7bec8b88d..bffbfe9ce 100755 --- a/concourse/scripts/publish.sh +++ b/concourse/scripts/publish.sh @@ -20,11 +20,11 @@ then echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc # npm publish # rm .npmrc - echo "faunadb-js@$PACKAGE_VERSION publushed to npm" > slack-message + echo "faunadb-js@$PACKAGE_VERSION publushed to npm" > slack-message/publish else result=${PWD##*/} printf '%s\n' "${PWD##*/}" - echo "NPM package already published on npm with version ${NPM_LATEST_VERSION}. Update version, please" > slack-message + echo "NPM package already published on npm with version ${NPM_LATEST_VERSION}. Update version, please" > slack-message/publish cat slack-message echo "NPM package already published on npm with version ${NPM_LATEST_VERSION}" 1>&2 exit 1 From d608a760d0b2d8d2b52504b95e5d97e83dc76d50 Mon Sep 17 00:00:00 2001 From: SZinkevych Date: Wed, 13 Oct 2021 11:32:45 +0200 Subject: [PATCH 07/21] up --- concourse/pipeline.yml | 2 -- concourse/tasks/browserify-and-npm-publish.yml | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/concourse/pipeline.yml b/concourse/pipeline.yml index f0407c77a..02d4a2d89 100644 --- a/concourse/pipeline.yml +++ b/concourse/pipeline.yml @@ -50,8 +50,6 @@ jobs: file: fauna-js-repository/concourse/tasks/browserify-and-npm-publish.yml params: NPM_TOKEN: ((npm_token)) - outputs: - - name: slack_message on_success: put: notify params: diff --git a/concourse/tasks/browserify-and-npm-publish.yml b/concourse/tasks/browserify-and-npm-publish.yml index 71a6bf1f8..aaa9b44b9 100644 --- a/concourse/tasks/browserify-and-npm-publish.yml +++ b/concourse/tasks/browserify-and-npm-publish.yml @@ -12,5 +12,8 @@ params: inputs: - name: fauna-js-repository +outputs: + - name: slack_message + run: path: ./fauna-js-repository/concourse/scripts/publish.sh From 323e4b4a019fe50bf3528ee10e601971183dc8ad Mon Sep 17 00:00:00 2001 From: SZinkevych Date: Wed, 13 Oct 2021 11:33:52 +0200 Subject: [PATCH 08/21] up --- concourse/scripts/publish.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/concourse/scripts/publish.sh b/concourse/scripts/publish.sh index bffbfe9ce..a211340f4 100755 --- a/concourse/scripts/publish.sh +++ b/concourse/scripts/publish.sh @@ -12,6 +12,7 @@ echo "Latest version in npm: $NPM_LATEST_VERSION" if [ "$PACKAGE_VERSION" \> "$NPM_LATEST_VERSION" ] then mkdir dist + mkdir slack-message npm install npm run browserify npm run browserify-min From ac18b869cc367153c894a3b7a1e39d78a9ea6c4c Mon Sep 17 00:00:00 2001 From: SZinkevych Date: Wed, 13 Oct 2021 11:36:18 +0200 Subject: [PATCH 09/21] up --- concourse/scripts/publish.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/concourse/scripts/publish.sh b/concourse/scripts/publish.sh index a211340f4..bd08cdf08 100755 --- a/concourse/scripts/publish.sh +++ b/concourse/scripts/publish.sh @@ -25,8 +25,7 @@ then else result=${PWD##*/} printf '%s\n' "${PWD##*/}" - echo "NPM package already published on npm with version ${NPM_LATEST_VERSION}. Update version, please" > slack-message/publish - cat slack-message + echo "NPM package already published on npm with version ${NPM_LATEST_VERSION}. Update version, please" > ./fauna-js-repository/slack-message/publish echo "NPM package already published on npm with version ${NPM_LATEST_VERSION}" 1>&2 exit 1 fi From 1498d3e857539d05654e97b72487639a87971b8e Mon Sep 17 00:00:00 2001 From: SZinkevych Date: Wed, 13 Oct 2021 11:38:07 +0200 Subject: [PATCH 10/21] up --- concourse/scripts/publish.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/concourse/scripts/publish.sh b/concourse/scripts/publish.sh index bd08cdf08..60d5ae6e0 100755 --- a/concourse/scripts/publish.sh +++ b/concourse/scripts/publish.sh @@ -23,9 +23,10 @@ then # rm .npmrc echo "faunadb-js@$PACKAGE_VERSION publushed to npm" > slack-message/publish else + cd ./slack-message result=${PWD##*/} printf '%s\n' "${PWD##*/}" - echo "NPM package already published on npm with version ${NPM_LATEST_VERSION}. Update version, please" > ./fauna-js-repository/slack-message/publish + echo "NPM package already published on npm with version ${NPM_LATEST_VERSION}. Update version, please" > publish echo "NPM package already published on npm with version ${NPM_LATEST_VERSION}" 1>&2 exit 1 fi From 41f1a6a5929c2726a3fecd2cf783d41fdc7eb107 Mon Sep 17 00:00:00 2001 From: SZinkevych Date: Wed, 13 Oct 2021 11:39:47 +0200 Subject: [PATCH 11/21] up --- concourse/scripts/publish.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/concourse/scripts/publish.sh b/concourse/scripts/publish.sh index 60d5ae6e0..ca8ce7ba3 100755 --- a/concourse/scripts/publish.sh +++ b/concourse/scripts/publish.sh @@ -3,6 +3,7 @@ set -eou cd ./fauna-js-repository +mkdir slack-message PACKAGE_VERSION=$(node -p -e "require('./package.json').version") NPM_LATEST_VERSION=$(npm view faunadb version) @@ -12,7 +13,6 @@ echo "Latest version in npm: $NPM_LATEST_VERSION" if [ "$PACKAGE_VERSION" \> "$NPM_LATEST_VERSION" ] then mkdir dist - mkdir slack-message npm install npm run browserify npm run browserify-min @@ -23,10 +23,9 @@ then # rm .npmrc echo "faunadb-js@$PACKAGE_VERSION publushed to npm" > slack-message/publish else - cd ./slack-message result=${PWD##*/} printf '%s\n' "${PWD##*/}" - echo "NPM package already published on npm with version ${NPM_LATEST_VERSION}. Update version, please" > publish + echo "NPM package already published on npm with version ${NPM_LATEST_VERSION}. Update version, please" > slack-message/publish echo "NPM package already published on npm with version ${NPM_LATEST_VERSION}" 1>&2 exit 1 fi From 094ac9b4d651fd823e07e18b688a7d35fb5f2f95 Mon Sep 17 00:00:00 2001 From: SZinkevych Date: Wed, 13 Oct 2021 11:41:26 +0200 Subject: [PATCH 12/21] up --- concourse/tasks/browserify-and-npm-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/concourse/tasks/browserify-and-npm-publish.yml b/concourse/tasks/browserify-and-npm-publish.yml index aaa9b44b9..fd511fd93 100644 --- a/concourse/tasks/browserify-and-npm-publish.yml +++ b/concourse/tasks/browserify-and-npm-publish.yml @@ -13,7 +13,7 @@ inputs: - name: fauna-js-repository outputs: - - name: slack_message + - name: slack-message run: path: ./fauna-js-repository/concourse/scripts/publish.sh From cff67d83d4c220dd62de22df313646bd5abb719f Mon Sep 17 00:00:00 2001 From: SZinkevych Date: Wed, 13 Oct 2021 11:51:15 +0200 Subject: [PATCH 13/21] up --- concourse/scripts/publish.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/concourse/scripts/publish.sh b/concourse/scripts/publish.sh index ca8ce7ba3..5b60c04e9 100755 --- a/concourse/scripts/publish.sh +++ b/concourse/scripts/publish.sh @@ -23,9 +23,8 @@ then # rm .npmrc echo "faunadb-js@$PACKAGE_VERSION publushed to npm" > slack-message/publish else - result=${PWD##*/} - printf '%s\n' "${PWD##*/}" - echo "NPM package already published on npm with version ${NPM_LATEST_VERSION}. Update version, please" > slack-message/publish - echo "NPM package already published on npm with version ${NPM_LATEST_VERSION}" 1>&2 + cat > notify_message/message < Date: Wed, 13 Oct 2021 11:52:53 +0200 Subject: [PATCH 14/21] up --- concourse/scripts/publish.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/concourse/scripts/publish.sh b/concourse/scripts/publish.sh index 5b60c04e9..554b67b2b 100755 --- a/concourse/scripts/publish.sh +++ b/concourse/scripts/publish.sh @@ -23,7 +23,7 @@ then # rm .npmrc echo "faunadb-js@$PACKAGE_VERSION publushed to npm" > slack-message/publish else - cat > notify_message/message < slack-message/publish < Date: Wed, 13 Oct 2021 12:04:41 +0200 Subject: [PATCH 15/21] up --- concourse/pipeline.yml | 13 ++++++++++++- concourse/scripts/publish.sh | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/concourse/pipeline.yml b/concourse/pipeline.yml index 02d4a2d89..2b9596282 100644 --- a/concourse/pipeline.yml +++ b/concourse/pipeline.yml @@ -57,7 +57,18 @@ jobs: on_failure: put: notify params: - text_file: slack-message/publish + text: js release failed + + - task: debug-output + config: + platform: linux + inputs: + - name: slack-message + run: + path: sh + args: + - cd ./slack-message; ls -la; cat ./publish + # - task: publish-docs # file: fauna-js-repository/concourse/tasks/publish-docs.yml diff --git a/concourse/scripts/publish.sh b/concourse/scripts/publish.sh index 554b67b2b..fc293a158 100755 --- a/concourse/scripts/publish.sh +++ b/concourse/scripts/publish.sh @@ -26,5 +26,5 @@ else cat > slack-message/publish < Date: Wed, 13 Oct 2021 12:08:58 +0200 Subject: [PATCH 16/21] up --- concourse/pipeline.yml | 13 ++++++++----- concourse/scripts/publish.sh | 2 ++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/concourse/pipeline.yml b/concourse/pipeline.yml index 2b9596282..9f2cd58e8 100644 --- a/concourse/pipeline.yml +++ b/concourse/pipeline.yml @@ -59,15 +59,18 @@ jobs: params: text: js release failed - - task: debug-output + - task: consume-the-file config: platform: linux - inputs: + image_resource: + type: registry-image + source: { repository: busybox } + inputs: - name: slack-message run: - path: sh - args: - - cd ./slack-message; ls -la; cat ./publish + path: cat + args: + - ./slack-message/publish # - task: publish-docs diff --git a/concourse/scripts/publish.sh b/concourse/scripts/publish.sh index fc293a158..f5f2b491e 100755 --- a/concourse/scripts/publish.sh +++ b/concourse/scripts/publish.sh @@ -21,8 +21,10 @@ then echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc # npm publish # rm .npmrc + cd .. echo "faunadb-js@$PACKAGE_VERSION publushed to npm" > slack-message/publish else + cd .. cat > slack-message/publish < Date: Wed, 13 Oct 2021 12:11:58 +0200 Subject: [PATCH 17/21] up --- concourse/pipeline.yml | 15 +-------------- concourse/scripts/publish.sh | 17 +++++++++-------- 2 files changed, 10 insertions(+), 22 deletions(-) diff --git a/concourse/pipeline.yml b/concourse/pipeline.yml index 9f2cd58e8..cfbd9b205 100644 --- a/concourse/pipeline.yml +++ b/concourse/pipeline.yml @@ -57,20 +57,7 @@ jobs: on_failure: put: notify params: - text: js release failed - - - task: consume-the-file - config: - platform: linux - image_resource: - type: registry-image - source: { repository: busybox } - inputs: - - name: slack-message - run: - path: cat - args: - - ./slack-message/publish + text_file: slack-message/publish # - task: publish-docs diff --git a/concourse/scripts/publish.sh b/concourse/scripts/publish.sh index f5f2b491e..48093ad29 100755 --- a/concourse/scripts/publish.sh +++ b/concourse/scripts/publish.sh @@ -1,9 +1,9 @@ #!/bin/sh set -eou +mkdir slack-message cd ./fauna-js-repository -mkdir slack-message PACKAGE_VERSION=$(node -p -e "require('./package.json').version") NPM_LATEST_VERSION=$(npm view faunadb version) @@ -21,12 +21,13 @@ then echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc # npm publish # rm .npmrc - cd .. - echo "faunadb-js@$PACKAGE_VERSION publushed to npm" > slack-message/publish + + echo "faunadb-js@$PACKAGE_VERSION published to npm" > ../slack-message/publish else - cd .. - cat > slack-message/publish < ../slack-message/publish + echo "faunadb-js@${NPM_LATEST_VERSION} package has been already published" 1>&2 + exit 1 fi From 63f6d95e60f9a00ad29d2bc3927aed05d284a28f Mon Sep 17 00:00:00 2001 From: SZinkevych Date: Wed, 13 Oct 2021 12:14:19 +0200 Subject: [PATCH 18/21] up --- concourse/scripts/publish.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/concourse/scripts/publish.sh b/concourse/scripts/publish.sh index 48093ad29..304a3c64f 100755 --- a/concourse/scripts/publish.sh +++ b/concourse/scripts/publish.sh @@ -24,7 +24,6 @@ then echo "faunadb-js@$PACKAGE_VERSION published to npm" > ../slack-message/publish else - cd ./slack-message result=${PWD##*/} printf '%s\n' "${PWD##*/}" echo "faunadb-js@${NPM_LATEST_VERSION} package has been already published" > ../slack-message/publish From 57adc9a9481441b0f99d3d365fe62f069fa867d2 Mon Sep 17 00:00:00 2001 From: SZinkevych Date: Wed, 13 Oct 2021 12:15:23 +0200 Subject: [PATCH 19/21] up --- concourse/scripts/publish.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/concourse/scripts/publish.sh b/concourse/scripts/publish.sh index 304a3c64f..fdc527e9c 100755 --- a/concourse/scripts/publish.sh +++ b/concourse/scripts/publish.sh @@ -1,7 +1,6 @@ #!/bin/sh set -eou -mkdir slack-message cd ./fauna-js-repository From f57dba9c67fb3361d10f82190b8097bd95ae3069 Mon Sep 17 00:00:00 2001 From: SZinkevych Date: Wed, 13 Oct 2021 12:16:41 +0200 Subject: [PATCH 20/21] uncomment --- concourse/pipeline.yml | 32 ++++++++++++++++---------------- concourse/scripts/publish.sh | 6 ++---- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/concourse/pipeline.yml b/concourse/pipeline.yml index cfbd9b205..c83b80f3c 100644 --- a/concourse/pipeline.yml +++ b/concourse/pipeline.yml @@ -34,17 +34,17 @@ jobs: - get: fauna-js-repository - get: fauna-js-repository-docs - # - task: integration-tests - # file: fauna-js-repository/concourse/tasks/integration-tests.yml - # privileged: true - # params: - # FAUNA_ROOT_KEY: ((fauna.secret)) - # FAUNA_DOMAIN: ((fauna.domain)) - # FAUNA_SCHEME: ((fauna.scheme)) - # FAUNA_PORT: ((fauna.port)) - # AUTH_0_URI: ((fauna/auth0.uri)) - # AUTH_0_CLIENT_ID: ((fauna/auth0/client.id)) - # AUTH_0_CLIENT_SECRET: ((fauna/auth0/client.secret)) + - task: integration-tests + file: fauna-js-repository/concourse/tasks/integration-tests.yml + privileged: true + params: + FAUNA_ROOT_KEY: ((fauna.secret)) + FAUNA_DOMAIN: ((fauna.domain)) + FAUNA_SCHEME: ((fauna.scheme)) + FAUNA_PORT: ((fauna.port)) + AUTH_0_URI: ((fauna/auth0.uri)) + AUTH_0_CLIENT_ID: ((fauna/auth0/client.id)) + AUTH_0_CLIENT_SECRET: ((fauna/auth0/client.secret)) - task: browserify-and-npm-publish file: fauna-js-repository/concourse/tasks/browserify-and-npm-publish.yml @@ -60,9 +60,9 @@ jobs: text_file: slack-message/publish - # - task: publish-docs - # file: fauna-js-repository/concourse/tasks/publish-docs.yml + - task: publish-docs + file: fauna-js-repository/concourse/tasks/publish-docs.yml - # - put: fauna-js-repository-docs - # params: - # repository: fauna-js-repository-updated-docs + - put: fauna-js-repository-docs + params: + repository: fauna-js-repository-updated-docs diff --git a/concourse/scripts/publish.sh b/concourse/scripts/publish.sh index fdc527e9c..1521bed4b 100755 --- a/concourse/scripts/publish.sh +++ b/concourse/scripts/publish.sh @@ -18,13 +18,11 @@ then echo "Publishing a new version..." echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc - # npm publish - # rm .npmrc + npm publish + rm .npmrc echo "faunadb-js@$PACKAGE_VERSION published to npm" > ../slack-message/publish else - result=${PWD##*/} - printf '%s\n' "${PWD##*/}" echo "faunadb-js@${NPM_LATEST_VERSION} package has been already published" > ../slack-message/publish echo "faunadb-js@${NPM_LATEST_VERSION} package has been already published" 1>&2 exit 1 From edc629e717e72f9dda45629b6046bc18e4f53c09 Mon Sep 17 00:00:00 2001 From: Sergii Zinkevych Date: Wed, 13 Oct 2021 12:19:01 +0200 Subject: [PATCH 21/21] Update pipeline.yml --- concourse/pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/concourse/pipeline.yml b/concourse/pipeline.yml index c83b80f3c..f0ed37a0f 100644 --- a/concourse/pipeline.yml +++ b/concourse/pipeline.yml @@ -16,7 +16,7 @@ resources: icon: github source: uri: https://github.com/fauna/faunadb-js.git - branch: FE-1667_slack_notification + branch: main - name: fauna-js-repository-docs type: git