From d9098182d42d37b877783f5b9d1a172ce154ad3f Mon Sep 17 00:00:00 2001 From: Jannis Portmann Date: Sat, 25 Dec 2021 14:33:17 +0100 Subject: [PATCH 1/7] New staging deployment --- Jenkinsfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 69b94aa..38873ab 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -24,6 +24,13 @@ node { } } + stage('Push image') { + docker.withRegistry('https://hub.thisfro.ch', 'git') { + app.push("${env.BUILD_NUMBER}") + app.push("latest") + } + } + stage('Deploy staging') { sh 'docker-compose --project-directory /opt/containers/pflaenz.li --file /opt/containers/pflaenz.li/docker-compose.yml up -d' } From 750f5df4f3d550ddd7ee48709400dde455f1c20f Mon Sep 17 00:00:00 2001 From: Jannis Portmann Date: Sat, 25 Dec 2021 14:37:53 +0100 Subject: [PATCH 2/7] Try other commands --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 38873ab..eaa5782 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -25,9 +25,9 @@ node { } stage('Push image') { - docker.withRegistry('https://hub.thisfro.ch', 'git') { - app.push("${env.BUILD_NUMBER}") - app.push("latest") + docker.withRegistry('https://hub.thisfro.ch') { + dockerImage.push("$BUILD_NUMBER") + dockerImage.push('latest') } } From a832f3fc9710a9f759c3261acec99976871b1591 Mon Sep 17 00:00:00 2001 From: Jannis Portmann Date: Sat, 25 Dec 2021 14:43:30 +0100 Subject: [PATCH 3/7] Use correct commands --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index eaa5782..b40e655 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -25,9 +25,9 @@ node { } stage('Push image') { - docker.withRegistry('https://hub.thisfro.ch') { - dockerImage.push("$BUILD_NUMBER") - dockerImage.push('latest') + docker.withDockerRegistry('https://hub.thisfro.ch') { + app.push("$BUILD_NUMBER") + app.push('latest') } } From a35e3e4f7af4d8fc3579aaf29a2a8371479d1cf9 Mon Sep 17 00:00:00 2001 From: Jannis Portmann Date: Sat, 25 Dec 2021 14:45:49 +0100 Subject: [PATCH 4/7] Fix typo --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index b40e655..9b73601 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -25,7 +25,7 @@ node { } stage('Push image') { - docker.withDockerRegistry('https://hub.thisfro.ch') { + docker.withRegistry('https://hub.thisfro.ch') { app.push("$BUILD_NUMBER") app.push('latest') } From 9e39334486a17804112b2a005e822993b63fa7fe Mon Sep 17 00:00:00 2001 From: Jannis Portmann Date: Sat, 25 Dec 2021 15:11:29 +0100 Subject: [PATCH 5/7] Install dev packages with composer --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9aa8116..3f30acb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,11 +21,11 @@ COPY . /var/www/html/app/ WORKDIR /var/www/html/app # Install stuff -RUN php ../composer.phar update +RUN php ../composer.phar update dev RUN yarn install && \ yarn build RUN cp .env.staging .env # Run Migration and dev-webserver -CMD /root/.symfony/bin/symfony console doctrine:migrations:migrate && /root/.symfony/bin/symfony serve --port=9999 --no-tls \ No newline at end of file +CMD /root/.symfony/bin/symfony console doctrine:migrations:migrate --no-interaction && /root/.symfony/bin/symfony serve --port=9999 --no-tls \ No newline at end of file From faa16735f56fc8dc47f336acca68d3048e53df64 Mon Sep 17 00:00:00 2001 From: Jannis Portmann Date: Sat, 25 Dec 2021 15:29:41 +0100 Subject: [PATCH 6/7] Remove wrong option --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3f30acb..e90a845 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,7 +21,7 @@ COPY . /var/www/html/app/ WORKDIR /var/www/html/app # Install stuff -RUN php ../composer.phar update dev +RUN php ../composer.phar install RUN yarn install && \ yarn build From 63d2100c57b8af9ba9e0cb508ab8d506a0c1d6e2 Mon Sep 17 00:00:00 2001 From: Jannis Portmann Date: Sat, 25 Dec 2021 15:32:16 +0100 Subject: [PATCH 7/7] Use composer update instead of install --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e90a845..2d7c88c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,7 +21,7 @@ COPY . /var/www/html/app/ WORKDIR /var/www/html/app # Install stuff -RUN php ../composer.phar install +RUN php ../composer.phar update RUN yarn install && \ yarn build