diff --git a/.semaphore/client-deploy-build.yml b/.semaphore/client-deploy-build.yml index 76d38f3..96ba1a7 100644 --- a/.semaphore/client-deploy-build.yml +++ b/.semaphore/client-deploy-build.yml @@ -1,72 +1,33 @@ -# Use the latest stable version of Semaphore 2.0 YML syntax: version: v1.0 - -# Name your pipeline. In case you connect multiple pipelines with promotions, -# the name will help you differentiate between, for example, a CI build phase -# and delivery phases. name: Semaphore JavaScript Example Pipeline - -# An agent defines the environment in which your code runs. -# It is a combination of one of available machine types and operating -# system images. -# See https://docs.semaphoreci.com/article/20-machine-types -# and https://docs.semaphoreci.com/article/32-ubuntu-1804-image agent: machine: type: e1-standard-2 os_image: ubuntu2004 - -# Blocks are the heart of a pipeline and are executed sequentially. -# Each block has a task that defines one or more jobs. Jobs define the -# commands to execute. -# See https://docs.semaphoreci.com/article/62-concepts blocks: - name: Install dependencies task: - # Set environment variables that your project requires. - # See https://docs.semaphoreci.com/article/66-environment-variables-and-secrets env_vars: - name: NODE_ENV value: production - name: CI value: 'true' - name: REACT_APP_API_BASE_URL - value: "http://YOUR_CLUSTER_URL/v1/api" - # This block runs two jobs in parallel and they both share common - # setup steps. We can group them in a prologue. - # See https://docs.semaphoreci.com/article/50-pipeline-yaml#prologue + value: 'http://YOUR_CLUSTER_URL/v1/api' prologue: commands: - # Get the latest version of our source code from GitHub: - checkout - - # Use the version of Node.js specified in .nvmrc. - # Semaphore provides nvm preinstalled. + - nvm install 16.16.0 - nvm use - node --version - npm --version jobs: - # First parallel job: - name: client npm install and cache commands: - cd src/client - - # Restore dependencies from cache. - # For more info on caching, see https://docs.semaphoreci.com/article/68-caching-dependencies - - cache restore client-node-modules-$SEMAPHORE_GIT_BRANCH-$(checksum package-lock.json),client-node-modules-$SEMAPHORE_GIT_BRANCH,client-node-modules-master + - 'cache restore client-node-modules-$SEMAPHORE_GIT_BRANCH-$(checksum package-lock.json),client-node-modules-$SEMAPHORE_GIT_BRANCH,client-node-modules-master' - npm run build - - # Store the latest version of client build in cache to reuse in further blocks: - cache store client-build-$SEMAPHORE_WORKFLOW_ID build - -# The deployment pipeline is defined to run on manual approval from the UI. -# Semaphore will the time and the name of the person who promotes each -# deployment. -# -# You could, for example, add another promotion to a pipeline that -# automatically deploys to a staging environment from branches named -# after a certain pattern. -# https://docs.semaphoreci.com/article/50-pipeline-yaml#promotions promotions: - name: Deploy Client pipeline_file: client-deploy.yml diff --git a/.semaphore/client-deploy.yml b/.semaphore/client-deploy.yml index e9c1c56..1ad4afa 100644 --- a/.semaphore/client-deploy.yml +++ b/.semaphore/client-deploy.yml @@ -1,36 +1,24 @@ -# This pipeline runs after semaphore.yml version: v1.0 name: Client deploy agent: machine: - # Use a machine type with more RAM and CPU power for faster container - # builds: type: e1-standard-2 os_image: ubuntu2004 blocks: - name: Build task: - # Set environment variables that your project requires. - # See https://docs.semaphoreci.com/article/66-environment-variables-and-secrets env_vars: - name: BUCKET_NAME value: YOUR_APP_URL - # For info on creating secrets, see: - # https://docs.semaphoreci.com/article/66-environment-variables-and-secrets secrets: - name: gcr-secret jobs: - name: Deploy to Google Cloud Storage commands: - # Authenticate using the file injected from the secret - gcloud auth activate-service-account --key-file=.secrets.gcp.json - gcloud config set project $GCP_PROJECT_ID - gcloud config set compute/zone $GCP_PROJECT_DEFAULT_ZONE - - # Restore build from cache. - cache restore client-build-$SEMAPHORE_WORKFLOW_ID - - # Deploy to Google Cloud Storage - - gsutil -m rsync -r build gs://$BUCKET_NAME - - gsutil iam ch allUsers:objectViewer gs://$BUCKET_NAME - - gsutil web set -m index.html -e 404.html gs://$BUCKET_NAME + - 'gsutil -m rsync -r build gs://$BUCKET_NAME' + - 'gsutil iam ch allUsers:objectViewer gs://$BUCKET_NAME' + - 'gsutil web set -m index.html -e 404.html gs://$BUCKET_NAME' diff --git a/.semaphore/secrets/gcr-secret.sample.yml b/.semaphore/secrets/gcr-secret.sample.yml index 7da35e7..0772eb1 100644 --- a/.semaphore/secrets/gcr-secret.sample.yml +++ b/.semaphore/secrets/gcr-secret.sample.yml @@ -1,33 +1,20 @@ -# Copy this file into one without .sample part and then populate it with actual values. -# Then you can create secret, by using command -# `sem create -f path/to/this/file` -# More info https://docs.semaphoreci.com/article/66-environment-variables-and-secrets +version: v1.0 +name: '' +agent: + machine: + type: e1-standard-2 + os_image: ubuntu2004 apiVersion: v1alpha kind: Secret metadata: - # Use this name to create this secret manually name: gcr-secret data: - # If you haven't set up k8s on google you need to do it first - # Start with https://cloud.google.com/kubernetes-engine/docs/quickstart - # Play with it and then you can use it with this project. - # Check out https://docs.semaphoreci.com/article/72-google-container-registry-gcr as an example. - # Also check out https://docs.semaphoreci.com/article/119-ci-cd-for-microservices-on-kubernetes - # as example of k8s deploy. env_vars: - # Id of your project - # More info here https://cloud.google.com/resource-manager/docs/creating-managing-projects?visit_id=636878590586351739-3388570778&rd=1#identifying_projects - name: GCP_PROJECT_ID - value: "your-gcp-project-id" - # Default compute zone you've selected - # https://cloud.google.com/compute/docs/regions-zones/#available + value: your-gcp-project-id - name: GCP_PROJECT_DEFAULT_ZONE - value: "europe-west1-b" + value: europe-west1-b files: - # You need to create service account and export json key file for it here https://console.cloud.google.com/iam-admin/serviceaccounts - # to use in this file. - path: .secrets.gcp.json - # Could be created by - # - `base64 -w 0 /path/to/file` and put in - # - upload in https://.semaphoreci.com/secrets content: PASTE_BASE64_ENCODED_CONTENT_HERE +blocks: [] diff --git a/.semaphore/secrets/server-ormconfig-production-secret.sample.yml b/.semaphore/secrets/server-ormconfig-production-secret.sample.yml index 9d30a4a..4ca8c32 100644 --- a/.semaphore/secrets/server-ormconfig-production-secret.sample.yml +++ b/.semaphore/secrets/server-ormconfig-production-secret.sample.yml @@ -1,21 +1,15 @@ -# Copy this file into one without .sample part and then populate it with actual values. -# Then you can create secret, by using command -# `sem create -f path/to/this/file` -# More info https://docs.semaphoreci.com/article/66-environment-variables-and-secrets +version: v1.0 +name: '' +agent: + machine: + type: e1-standard-2 + os_image: ubuntu2004 apiVersion: v1beta kind: Secret metadata: - # Use this name to create this secret manually name: server-ormconfig-production data: files: - # Copy src/server/ormconfig.sample.json into ormconfig.production.json and populate with production values - # You will need production connection settings in this config file. - # In this eample heroku postgres database addon is used. - # You will need to create heroku app and then add addon https://elements.heroku.com/addons/heroku-postgresql - # Then you will be able to view database connection settings like described here https://devcenter.heroku.com/articles/heroku-postgresql#external-connections-ingress - - path: ormconfig.production.json - # Could be created by - # - `base64 -w 0 /path/to/file` and put in - # - upload in https://.semaphoreci.com/secrets - content: PASTE_BASE64_ENCODED_CONTENT_HERE + - path: ormconfig.production.json + content: PASTE_BASE64_ENCODED_CONTENT_HERE +blocks: [] diff --git a/.semaphore/secrets/server-production-env-secret.sample.yml b/.semaphore/secrets/server-production-env-secret.sample.yml index 6076d73..4a89cfe 100644 --- a/.semaphore/secrets/server-production-env-secret.sample.yml +++ b/.semaphore/secrets/server-production-env-secret.sample.yml @@ -1,19 +1,15 @@ -# Copy this file into one without .sample part and then populate it with actual values. -# Then you can create secret, by using command -# `sem create -f path/to/this/file` -# More info https://docs.semaphoreci.com/article/66-environment-variables-and-secrets +version: v1.0 +name: '' +agent: + machine: + type: e1-standard-2 + os_image: ubuntu2004 apiVersion: v1beta kind: Secret metadata: - # Use this name to create this secret manually name: server-production-env data: files: - # Server production.env file doesn't exist by default, copy src/server/sample.env into src/server/production.env - # and populate with production values - # Then create secret - in the end it should be here - https://.semaphoreci.com/secrets - - path: server-production.env - # Could be created by - # - `base64 -w 0 /path/to/file` and put in - # - upload in https://.semaphoreci.com/secrets - content: PASTE_BASE64_ENCODED_CONTENT_HERE + - path: server-production.env + content: PASTE_BASE64_ENCODED_CONTENT_HERE +blocks: [] diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index 878789e..7fef00d 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -1,75 +1,37 @@ -# Use the latest stable version of Semaphore 2.0 YML syntax: version: v1.0 - -# Name your pipeline. In case you connect multiple pipelines with promotions, -# the name will help you differentiate between, for example, a CI build phase -# and delivery phases. name: Semaphore JavaScript Example Pipeline - -# An agent defines the environment in which your code runs. -# It is a combination of one of available machine types and operating -# system images. -# See https://docs.semaphoreci.com/article/20-machine-types -# and https://docs.semaphoreci.com/article/32-ubuntu-1804-image agent: machine: type: e1-standard-2 os_image: ubuntu2004 - -# Blocks are the heart of a pipeline and are executed sequentially. -# Each block has a task that defines one or more jobs. Jobs define the -# commands to execute. -# See https://docs.semaphoreci.com/article/62-concepts blocks: - - name: ๐Ÿ“ฆ Install dependencies + - name: "\U0001F4E6 Install dependencies" task: - # Set environment variables that your project requires. - # See https://docs.semaphoreci.com/article/66-environment-variables-and-secrets env_vars: - name: NODE_ENV value: test - name: CI value: 'true' - - # This block runs two jobs in parallel and they both share common - # setup steps. We can group them in a prologue. - # See https://docs.semaphoreci.com/article/50-pipeline-yaml#prologue prologue: commands: - # Get the latest version of our source code from GitHub: - checkout - - # Use the version of Node.js specified in .nvmrc. - # Semaphore provides nvm preinstalled. - nvm use - node --version - npm --version jobs: - # First parallel job: - name: client npm install and cache commands: - cd src/client - - # Restore dependencies from cache. This command will not fail in - # case of a cache miss. In case of a cache hit, npm install will - # run very fast. - # For more info on caching, see https://docs.semaphoreci.com/article/68-caching-dependencies - - cache restore client-node-modules-$SEMAPHORE_GIT_BRANCH-$(checksum package-lock.json),client-node-modules-$SEMAPHORE_GIT_BRANCH,client-node-modules-master + - 'cache restore client-node-modules-$SEMAPHORE_GIT_BRANCH-$(checksum package-lock.json),client-node-modules-$SEMAPHORE_GIT_BRANCH,client-node-modules-master' - npm install - - # Store the latest version of node modules in cache to reuse in - # further blocks: - cache store client-node-modules-$SEMAPHORE_GIT_BRANCH-$(checksum package-lock.json) node_modules - - # Second parallel job: - name: server npm install and cache commands: - cd src/server - - cache restore server-node-modules-$SEMAPHORE_GIT_BRANCH-$(checksum package-lock.json),server-node-modules-$SEMAPHORE_GIT_BRANCH,server-node-modules-master + - 'cache restore server-node-modules-$SEMAPHORE_GIT_BRANCH-$(checksum package-lock.json),server-node-modules-$SEMAPHORE_GIT_BRANCH,server-node-modules-master' - npm install --legacy-peer-deps - cache store server-node-modules-$SEMAPHORE_GIT_BRANCH-$(checksum package-lock.json) node_modules - - - name: ๐Ÿ” Lint + - name: "\U0001F50D Lint" task: env_vars: - name: NODE_ENV @@ -79,6 +41,7 @@ blocks: prologue: commands: - checkout + - nvm install 16.16.0 - nvm use - node --version - npm --version @@ -86,18 +49,14 @@ blocks: - name: Client Lint commands: - cd src/client - # At this point we can assume 100% cache hit rate of node modules: - - cache restore client-node-modules-$SEMAPHORE_GIT_BRANCH-$(checksum package-lock.json),client-node-modules-$SEMAPHORE_GIT_BRANCH,client-node-modules-master - - # Run task as defined in package.json: + - 'cache restore client-node-modules-$SEMAPHORE_GIT_BRANCH-$(checksum package-lock.json),client-node-modules-$SEMAPHORE_GIT_BRANCH,client-node-modules-master' - npm run lint - name: Server Lint commands: - cd src/server - - cache restore server-node-modules-$SEMAPHORE_GIT_BRANCH-$(checksum package-lock.json),server-node-modules-$SEMAPHORE_GIT_BRANCH,server-node-modules-master + - 'cache restore server-node-modules-$SEMAPHORE_GIT_BRANCH-$(checksum package-lock.json),server-node-modules-$SEMAPHORE_GIT_BRANCH,server-node-modules-master' - npm run lint - - - name: ๐Ÿงช Unit Tests + - name: "\U0001F9EA Unit Tests" task: env_vars: - name: NODE_ENV @@ -107,6 +66,7 @@ blocks: prologue: commands: - checkout + - nvm install 16.16.0 - nvm use - node --version - npm --version @@ -115,20 +75,19 @@ blocks: commands: - export NAME="Client tests" - cd src/client - - cache restore client-node-modules-$SEMAPHORE_GIT_BRANCH-$(checksum package-lock.json),client-node-modules-$SEMAPHORE_GIT_BRANCH,client-node-modules-master + - 'cache restore client-node-modules-$SEMAPHORE_GIT_BRANCH-$(checksum package-lock.json),client-node-modules-$SEMAPHORE_GIT_BRANCH,client-node-modules-master' - npm test - name: Server Unit Tests commands: - export NAME="Server tests" - cd src/server - - cache restore server-node-modules-$SEMAPHORE_GIT_BRANCH-$(checksum package-lock.json),server-node-modules-$SEMAPHORE_GIT_BRANCH,server-node-modules-master + - 'cache restore server-node-modules-$SEMAPHORE_GIT_BRANCH-$(checksum package-lock.json),server-node-modules-$SEMAPHORE_GIT_BRANCH,server-node-modules-master' - npm test epilogue: always: commands: - - "[[ -f junit.xml ]] && test-results publish --name \"๐Ÿงช $NAME\" junit.xml" - - - name: ๐Ÿ”„ E2E Tests + - "[[ -f junit.xml ]] && test-results publish --name \"\U0001F9EA $NAME\" junit.xml" + - name: "\U0001F504 E2E Tests" task: env_vars: - name: NODE_ENV @@ -138,54 +97,39 @@ blocks: prologue: commands: - checkout + - nvm install 16.16.0 - nvm use - node --version - npm --version - # Start a Postgres database. On Semaphore, databases run in the same - # environment as your code. - # See https://docs.semaphoreci.com/article/32-ubuntu-1804-image#databases-and-services - sem-service start postgres - # With unrestricted sudo access, you can install any additional - # system package: - sudo apt-get install -y libgtk2.0-0 + - sudo apt-get install libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libnss3 libxss1 libasound2 libxtst6 xauth xvfb jobs: - name: Client E2E Tests commands: - export NAME="Client tests" - cd src/client - - cache restore client-node-modules-$SEMAPHORE_GIT_BRANCH-$(checksum package-lock.json),client-node-modules-$SEMAPHORE_GIT_BRANCH,client-node-modules-master + - 'cache restore client-node-modules-$SEMAPHORE_GIT_BRANCH-$(checksum package-lock.json),client-node-modules-$SEMAPHORE_GIT_BRANCH,client-node-modules-master' - npx cypress install - - npm run test:e2e + - 'npm run test:e2e' - name: Server E2E Tests commands: - export NAME="Server tests" - cd src/server - - cache restore server-node-modules-$SEMAPHORE_GIT_BRANCH-$(checksum package-lock.json),server-node-modules-$SEMAPHORE_GIT_BRANCH,server-node-modules-master + - 'cache restore server-node-modules-$SEMAPHORE_GIT_BRANCH-$(checksum package-lock.json),server-node-modules-$SEMAPHORE_GIT_BRANCH,server-node-modules-master' - cp ormconfig.ci.json ormconfig.json - - npm run migrate:up - - npm run test:e2e + - 'npm run migrate:up' + - 'npm run test:e2e' epilogue: always: commands: - - "[[ -f junit.xml ]] && test-results publish --name \"๐Ÿ—๏ธ $NAME\" junit.xml" - + - "[[ -f junit.xml ]] && test-results publish --name \"\U0001F3D7๏ธ $NAME\" junit.xml" after_pipeline: task: jobs: - name: Publish Results commands: - test-results gen-pipeline-report - -# If all tests pass, we move on to build a Docker image. -# This is a job for a separate pipeline which we link with a promotion. -# -# What happens outside semaphore.yml will not appear in GitHub pull -# request status report. -# -# In this example we run docker build automatically on every branch. -# You may want to limit it by branch name, or trigger it manually. -# For more on such options, see: -# https://docs.semaphoreci.com/article/50-pipeline-yaml#promotions promotions: - name: Dockerize server pipeline_file: server-docker-build.yml diff --git a/.semaphore/server-deploy-k8s.yml b/.semaphore/server-deploy-k8s.yml index 4c0e005..8c613ac 100644 --- a/.semaphore/server-deploy-k8s.yml +++ b/.semaphore/server-deploy-k8s.yml @@ -1,4 +1,3 @@ -# This pipeline runs after docker-build.yml version: v1.0 name: Deploy server to Kubernetes agent: @@ -8,65 +7,43 @@ agent: blocks: - name: Deploy server to Kubernetes task: - # For info on creating secrets, see: - # https://docs.semaphoreci.com/article/66-environment-variables-and-secrets secrets: - name: gcr-secret - - # Set environment variables that your project requires. - # See https://docs.semaphoreci.com/article/66-environment-variables-and-secrets env_vars: - name: CLUSTER_NAME value: semaphore-demo-javascript-server prologue: commands: - # Authenticate using the file injected from the secret - gcloud auth activate-service-account --key-file=.secrets.gcp.json - # Don't forget -q to silence confirmation prompts - gcloud auth configure-docker -q - gcloud config set project $GCP_PROJECT_ID - gcloud config set compute/zone $GCP_PROJECT_DEFAULT_ZONE - # Get kubectl config file - gcloud container clusters get-credentials $CLUSTER_NAME --zone $GCP_PROJECT_DEFAULT_ZONE --project $GCP_PROJECT_ID - checkout - cd src/server jobs: - - name: Deploy - commands: - - kubectl get nodes - - kubectl get pods - - # Our deployment.yml instructs Kubernetes to pull container image - # named semaphoredemos/semaphore-demo-javascript-server:$SEMAPHORE_WORKFLOW_ID - # - # envsubst is a tool which will replace $SEMAPHORE_WORKFLOW_ID with - # its current value. The same variable was used in server-docker-build.yml - # pipeline to tag and push a container image. - - envsubst < deployment.yml | tee helloWorld - - mv helloWorld deployment.yml - - # Perform declarative deployment: - - kubectl apply -f deployment.yml - - # If deployment to production succeeded, let's create a new version of - # our `latest` Docker image. + - name: Deploy + commands: + - kubectl get nodes + - kubectl get pods + - envsubst < deployment.yml | tee helloWorld + - mv helloWorld deployment.yml + - kubectl apply -f deployment.yml - name: Tag latest release task: secrets: - name: gcr-secret prologue: commands: - # Authenticate using the file injected from the secret - gcloud auth activate-service-account --key-file=.secrets.gcp.json - # Don't forget -q to silence confirmation prompts - gcloud auth configure-docker -q - gcloud config set project $GCP_PROJECT_ID - gcloud config set compute/zone $GCP_PROJECT_DEFAULT_ZONE - checkout - cd src/server jobs: - - name: docker tag latest - commands: - - docker pull "gcr.io/$GCP_PROJECT_ID/semaphore-demo-javascript-server:$SEMAPHORE_WORKFLOW_ID" - - docker tag "gcr.io/$GCP_PROJECT_ID/semaphore-demo-javascript-server:$SEMAPHORE_WORKFLOW_ID" "gcr.io/$GCP_PROJECT_ID/semaphore-demo-javascript-server:latest" - - docker push "gcr.io/$GCP_PROJECT_ID/semaphore-demo-javascript-server:latest" + - name: docker tag latest + commands: + - 'docker pull "gcr.io/$GCP_PROJECT_ID/semaphore-demo-javascript-server:$SEMAPHORE_WORKFLOW_ID"' + - 'docker tag "gcr.io/$GCP_PROJECT_ID/semaphore-demo-javascript-server:$SEMAPHORE_WORKFLOW_ID" "gcr.io/$GCP_PROJECT_ID/semaphore-demo-javascript-server:latest"' + - 'docker push "gcr.io/$GCP_PROJECT_ID/semaphore-demo-javascript-server:latest"' diff --git a/.semaphore/server-docker-build.yml b/.semaphore/server-docker-build.yml index 4104b76..c3b91a8 100644 --- a/.semaphore/server-docker-build.yml +++ b/.semaphore/server-docker-build.yml @@ -1,68 +1,33 @@ -# This pipeline runs after semaphore.yml version: v1.0 name: Docker build server agent: machine: - # Use a machine type with more RAM and CPU power for faster container - # builds: type: e1-standard-4 os_image: ubuntu2004 blocks: - name: Build task: - # Mount a secret which defines DOCKER_USERNAME and DOCKER_PASSWORD - # environment variables. - # For info on creating secrets, see: - # https://docs.semaphoreci.com/article/66-environment-variables-and-secrets secrets: - name: gcr-secret - name: server-ormconfig-production - name: server-production-env prologue: commands: - # Lets configure gcloud to push docker image into container registry - # Authenticate using the file injected from the secret - gcloud auth activate-service-account --key-file=.secrets.gcp.json - # Don't forget -q to silence confirmation prompts - gcloud auth configure-docker -q - gcloud config set project $GCP_PROJECT_ID - gcloud config set compute/zone $GCP_PROJECT_DEFAULT_ZONE - checkout jobs: - - name: Docker build - commands: - - cd src/server - - # Copy production configs we linked using secrets - - cp /home/semaphore/ormconfig.production.json ormconfig.json - - cp /home/semaphore/server-production.env production.env - - # Use docker layer caching and reuse unchanged layers to build a new - # container image faster. - # To do that, we first need to pull a previous version of container: - - docker pull "gcr.io/$GCP_PROJECT_ID/semaphore-demo-javascript-server:latest" || true - - # Build a new image based on pulled image, if present. - # Use $SEMAPHORE_WORKFLOW_ID environment variable to produce a - # unique image tag. - # For a list of available environment variables on Semaphore, see: - # https://docs.semaphoreci.com/article/12-environment-variables - - # Replace with your GCP Project ID - - docker build --cache-from "gcr.io/$GCP_PROJECT_ID/semaphore-demo-javascript-server:latest" -t "gcr.io/$GCP_PROJECT_ID/semaphore-demo-javascript-server:$SEMAPHORE_WORKFLOW_ID" . - - docker images - - # Push a new image to container registry: - - docker push "gcr.io/$GCP_PROJECT_ID/semaphore-demo-javascript-server:$SEMAPHORE_WORKFLOW_ID" - -# The deployment pipeline is defined to run on manual approval from the UI. -# Semaphore will the time and the name of the person who promotes each -# deployment. -# -# You could, for example, add another promotion to a pipeline that -# automatically deploys to a staging environment from branches named -# after a certain pattern. -# https://docs.semaphoreci.com/article/50-pipeline-yaml#promotions + - name: Docker build + commands: + - cd src/server + - cp /home/semaphore/ormconfig.production.json ormconfig.json + - cp /home/semaphore/server-production.env production.env + - 'docker pull "gcr.io/$GCP_PROJECT_ID/semaphore-demo-javascript-server:latest" || true' + - 'docker build --cache-from "gcr.io/$GCP_PROJECT_ID/semaphore-demo-javascript-server:latest" -t "gcr.io/$GCP_PROJECT_ID/semaphore-demo-javascript-server:$SEMAPHORE_WORKFLOW_ID" .' + - docker images + - 'docker push "gcr.io/$GCP_PROJECT_ID/semaphore-demo-javascript-server:$SEMAPHORE_WORKFLOW_ID"' promotions: - name: Deploy server to Kubernetes pipeline_file: server-deploy-k8s.yml diff --git a/feature1.txt b/feature1.txt new file mode 100644 index 0000000..2acded2 --- /dev/null +++ b/feature1.txt @@ -0,0 +1,2 @@ +HELLO WORLD! +HI \ No newline at end of file diff --git a/test.txt b/test.txt new file mode 100644 index 0000000..9daeafb --- /dev/null +++ b/test.txt @@ -0,0 +1 @@ +test diff --git a/test1.txt b/test1.txt new file mode 100644 index 0000000..32f95c0 --- /dev/null +++ b/test1.txt @@ -0,0 +1 @@ +hi \ No newline at end of file