Only release a package for blah2, not blah2_api as well

This commit is contained in:
30hours 2024-02-19 12:18:19 +00:00
parent fae3a589ae
commit 53b311a9df
2 changed files with 0 additions and 6 deletions

4
Jenkinsfile vendored
View file

@ -5,7 +5,6 @@ pipeline {
GHCR_REGISTRY = "ghcr.io" GHCR_REGISTRY = "ghcr.io"
GHCR_TOKEN = credentials('ghcr-login') GHCR_TOKEN = credentials('ghcr-login')
BLAH2_NAME = "30hours/blah2" BLAH2_NAME = "30hours/blah2"
BLAH2_API_NAME = "30hours/blah2_api"
} }
stages { stages {
@ -18,7 +17,6 @@ pipeline {
steps { steps {
echo 'Building the project' echo 'Building the project'
sh 'docker build -t $BLAH2_NAME .' sh 'docker build -t $BLAH2_NAME .'
sh 'docker build -t $BLAH2_API_NAME --file ./api/Dockerfile ./api'
} }
} }
stage('Test') { stage('Test') {
@ -30,9 +28,7 @@ pipeline {
steps { steps {
sh 'echo $GHCR_TOKEN_PSW | docker login ghcr.io -u $GHCR_TOKEN_USR --password-stdin' sh 'echo $GHCR_TOKEN_PSW | docker login ghcr.io -u $GHCR_TOKEN_USR --password-stdin'
sh 'docker tag $BLAH2_NAME ghcr.io/$BLAH2_NAME' sh 'docker tag $BLAH2_NAME ghcr.io/$BLAH2_NAME'
sh 'docker tag $BLAH2_API_NAME ghcr.io/$BLAH2_API_NAME'
sh 'docker push ghcr.io/$BLAH2_NAME' sh 'docker push ghcr.io/$BLAH2_NAME'
sh 'docker push ghcr.io/$BLAH2_API_NAME'
sh 'docker logout' sh 'docker logout'
} }
} }

View file

@ -47,8 +47,6 @@ Alternatively avoid building and use the pre-built Docker packages;
vim docker-compose.yml vim docker-compose.yml
--- build: . --- build: .
+++ image: ghcr.io/30hours/blah2:latest +++ image: ghcr.io/30hours/blah2:latest
--- build ./api
+++ image: ghcr.io/30hours/blah2_api:latest
sudo docker compose up -d sudo docker compose up -d
``` ```