Skip to content

Commit

Permalink
Merge pull request #12 from OpenQDev/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
FlacoJones authored Feb 12, 2023
2 parents 5f3b7b7 + 0a22957 commit cd41a5c
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 34,382 deletions.
40 changes: 38 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,35 @@ jobs:
- run: echo "$DOCKER_PASSWORD" | docker login --username $DOCKER_USER --password-stdin
- run: docker build -t openq/openq-github-bot:$CIRCLE_TAG .
- run: docker push openq/openq-github-bot:$CIRCLE_TAG
pushHelm:
machine: true
steps:
- checkout
- run: echo "$DOCKER_PASSWORD" | docker login --username $DOCKER_USER --password-stdin
- run:
name: Update DEPLOY_ENV environment variable using CIRCLE_TAG
command: |
echo 'export DEPLOY_ENV=$(echo ${CIRCLE_TAG} | sed 's/-.*//')' >> $BASH_ENV
source $BASH_ENV
- run: echo $DEPLOY_ENV
- run:
command: |
wget https://github.com/mikefarah/yq/releases/download/v4.27.5/yq_linux_386
sudo mv yq_linux_386 /usr/local/bin/yq
sudo chmod +x /usr/local/bin/yq
git clone https://${CIRCLECI_PAT}@github.com/openqdev/OpenQ-Helm.git
cd OpenQ-Helm/
yq -i '.githubbot.image.tag = env(CIRCLE_TAG)' values-$DEPLOY_ENV.yaml
cat values-$DEPLOY_ENV.yaml
git add .
git commit -m "[CIRCLE CI] ${CIRCLE_TAG}"
git remote set-url origin https://${CIRCLECI_PAT}@github.com/openqdev/OpenQ-Helm.git
git push
git tag -f ${CIRCLE_TAG}
git push -f origin ${CIRCLE_TAG} --tags
workflows:
version: 2
build:
build-and-deploy:
jobs:
- build:
context: OpenQ
Expand All @@ -20,6 +46,16 @@ workflows:
ignore: /.*/
tags:
only:
- /^development.*/
- /^staging.*/
- /^production.*/
- pushHelm:
context: OpenQ
requires:
- build
filters:
branches:
ignore: /.*/
tags:
only:
- /^staging.*/
- /^production.*/
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:lts-alpine
FROM node:18.14.0-alpine
WORKDIR /app
RUN apk update && apk upgrade && \
apk add --no-cache bash git
Expand Down
Loading

0 comments on commit cd41a5c

Please sign in to comment.