Fakultas Ilmu Komputer UI
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
be-authentication-test
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
SafetyPin
be-authentication-test
Commits
01197d81
Commit
01197d81
authored
1 month ago
by
Muhammad Raihan Akbar
Browse files
Options
Downloads
Patches
Plain Diff
[REFACTOR] added continuous deployment for staging environment
parent
94d37fa4
No related branches found
No related tags found
1 merge request
!1
Login registration
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.github/workflows/staging-ci-cd.yml
+21
-3
21 additions, 3 deletions
.github/workflows/staging-ci-cd.yml
with
21 additions
and
3 deletions
.github/workflows/staging-ci-cd.yml
+
21
−
3
View file @
01197d81
...
...
@@ -40,16 +40,34 @@ jobs:
uses
:
actions/checkout@v3
-
name
:
Install the gcloud CLI
uses
:
google-github-actions/setup-gcloud@v
0
uses
:
google-github-actions/setup-gcloud@v
2
with
:
project_id
:
${{ secrets.GOOGLE_PROJECT }}
service_account_key
:
${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
export_default_credentials
:
true
-
name
:
Authenticate with GCP
uses
:
google-github-actions/auth@v1
with
:
credentials_json
:
${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
-
name
:
Build and Push Docker Image
env
:
GOOGLE_PROJECT
:
${{ secrets.GOOGLE_PROJECT }}
run
:
|
gcloud auth configure-docker us-central1-docker.pkg.dev
docker build -t us-central1-docker.pkg.dev/$GOOGLE_PROJECT/my-repository/authentication:latest .
docker push us-central1-docker.pkg.dev/$GOOGLE_PROJECT/my-repository/authentication:latest
\ No newline at end of file
docker build -t us-central1-docker.pkg.dev/$GOOGLE_PROJECT/staging-repository/authentication:latest .
docker push us-central1-docker.pkg.dev/$GOOGLE_PROJECT/staging-repository/authentication:latest
-
name
:
Install required components
run
:
|
gcloud components update
gcloud components install gke-gcloud-auth-plugin
-
name
:
Deploy to GKE
env
:
GOOGLE_PROJECT
:
${{ secrets.GOOGLE_PROJECT }}
run
:
|
gcloud container clusters get-credentials safetypin-staging --region asia-southeast2
sed -i "s/GOOGLE_PROJECT/$GOOGLE_PROJECT/g" resources.yaml
kubectl apply -f resources.yaml
\ No newline at end of file
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