Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tdt4242-base
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Kristoffer Håkon Håkonsen
tdt4242-base
Commits
59de3cc7
Commit
59de3cc7
authored
4 years ago
by
Pernille Welle-Watne
Browse files
Options
Downloads
Patches
Plain Diff
another try
parent
7c1773a6
No related branches found
Branches containing commit
No related tags found
Loading
Checking pipeline status
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+15
-50
15 additions, 50 deletions
.gitlab-ci.yml
heroku.yml
+0
-3
0 additions, 3 deletions
heroku.yml
with
15 additions
and
53 deletions
.gitlab-ci.yml
+
15
−
50
View file @
59de3cc7
stages
:
-
build
-
test
-
deploy
variables
:
IMAGE
:
${CI_REGISTRY}/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}
HEROKU_APP_NAME
:
safe-meadow-86842
build
:
stage
:
build
image
:
docker:stable
services
:
-
docker:dind
variables
:
DOCKER_DRIVER
:
overlay2
script
:
-
docker login -u $CI_REGISTRY_USER -p $CI_JOB_TOKEN $CI_REGISTRY
-
docker pull $IMAGE:build-python ||
true
-
docker pull $IMAGE:production ||
true
-
docker build
--target build-python
--cache-from $IMAGE:build-python
--tag $IMAGE:build-python
--file ./Dockerfile
"."
-
docker build
--cache-from $IMAGE:production
--tag $IMAGE:production
--file ./Dockerfile
"."
-
docker push $IMAGE:build-python
-
docker push $IMAGE:production
image
:
python:3
test
:
stage
:
test
image
:
$IMAGE:production
services
:
-
postgres:latest
variables
:
POSTGRES_DB
:
test
POSTGRES_USER
:
runner
POSTGRES_PASSWORD
:
"
"
DATABASE_URL
:
postgres://runner@postgres:5432/test
script
:
-
python manage.py test
# this configures Django application to use attached postgres database that is run on `postgres` host
-
cd backend/secfit
-
apt-get update -qy
-
pip install -r requirements.txt
-
python manage.py test
deploy
:
stage
:
deploy
staging
:
type
:
deploy
image
:
ruby
script
:
-
apt-get update -qy
-
apt-get install -y ruby-dev
-
gem install dpl
-
dpl --provider=heroku --app=$HEROKU_APP_NAME --api-key=$HEROKU_AUTH_TOKEN
\ No newline at end of file
-
apt-get update -qy
-
apt-get install -y ruby-dev
-
gem install dpl
-
dpl --provider=heroku --app=tdt4237 --api-key=$HEROKU_STAGING_API_KEY
only
:
-
master
This diff is collapsed.
Click to expand it.
heroku.yml
deleted
100644 → 0
+
0
−
3
View file @
7c1773a6
build
:
docker
:
web
:
Dockerfile
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment