Last active
February 16, 2021 11:11
-
-
Save hacktivist123/840168caac69fb56a8e7340678ba968e to your computer and use it in GitHub Desktop.
Config file for Gitlab CI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stages: | |
- build | |
- deploy | |
build: | |
image: node:14 | |
stage: build | |
script: | |
- npm install | |
- npm audit fix | |
only: | |
- master | |
.login: | |
image: node:14 | |
before_script: | |
- apt-get update | |
- apt-get install -y ca-certificates jq | |
- echo "deb [trusted=yes] https://packages.cloudfoundry.org/debian stable main" > /etc/apt/sources.list.d/cloudfoundry-cli.list | |
- apt-get update | |
- apt-get install cf7-cli | |
- cf --version | |
- cf api --skip-ssl-validation "$CF_API" | |
- cf auth "$CF_USERNAME" "$CF_Password" | |
only: | |
- master | |
deploy: | |
extends: .login | |
stage: deploy | |
script: | |
- cf target -o "foo" -s "gitlab-test" | |
- ls -la | |
- echo "Deployment starting....." | |
- cf push exchange-rate-spa | |
only: | |
- master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment