From 6f2fd8d18f4410a147cc2a7c05bdad775b6feac7 Mon Sep 17 00:00:00 2001 From: aamador0202 <77211255+aamador0202@users.noreply.github.com> Date: Tue, 24 Jan 2023 16:58:37 -0600 Subject: [PATCH 01/14] Create cloudnbuild.yaml --- cloudnbuild.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 cloudnbuild.yaml diff --git a/cloudnbuild.yaml b/cloudnbuild.yaml new file mode 100644 index 000000000..9e42a1c19 --- /dev/null +++ b/cloudnbuild.yaml @@ -0,0 +1,13 @@ +steps: +- name: 'gcr.io/cloud-builders/docker' + args: [ 'build', '-t', 'us-central1-docker.pkg.dev/gorilla-375616/time-off-gorilla/time-off-image:latest', '.' ] +- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk' + entrypoint: 'bash' + args: + - '-c' + - > + gcloud deploy releases create release-$BUILD_ID + --delivery-pipeline=time-off-app + --region=us-central1 + --source=./ + --images=image1=us-central1-docker.pkg.dev/gorilla-375616/time-off-gorilla/time-off-image:latest From e75355bd6b5d418563376c7aed1afa876b5c0baf Mon Sep 17 00:00:00 2001 From: aamador0202 <77211255+aamador0202@users.noreply.github.com> Date: Tue, 24 Jan 2023 16:59:23 -0600 Subject: [PATCH 02/14] Update cloudnbuild.yaml --- cloudnbuild.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cloudnbuild.yaml b/cloudnbuild.yaml index 9e42a1c19..4ec25754c 100644 --- a/cloudnbuild.yaml +++ b/cloudnbuild.yaml @@ -11,3 +11,5 @@ steps: --region=us-central1 --source=./ --images=image1=us-central1-docker.pkg.dev/gorilla-375616/time-off-gorilla/time-off-image:latest + + From c77ba05f8d2a21f348dfa9f05621b626af6d410a Mon Sep 17 00:00:00 2001 From: aamador0202 <77211255+aamador0202@users.noreply.github.com> Date: Tue, 24 Jan 2023 17:00:44 -0600 Subject: [PATCH 03/14] Rename cloudnbuild.yaml to cloudbuild.yaml --- cloudnbuild.yaml => cloudbuild.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename cloudnbuild.yaml => cloudbuild.yaml (100%) diff --git a/cloudnbuild.yaml b/cloudbuild.yaml similarity index 100% rename from cloudnbuild.yaml rename to cloudbuild.yaml From 68185d82888f79f110bc175ca34c635e63563c67 Mon Sep 17 00:00:00 2001 From: aamador0202 <77211255+aamador0202@users.noreply.github.com> Date: Tue, 24 Jan 2023 17:06:51 -0600 Subject: [PATCH 04/14] Update cloudbuild.yaml --- cloudbuild.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloudbuild.yaml b/cloudbuild.yaml index 4ec25754c..99287a68f 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -1,6 +1,6 @@ steps: - name: 'gcr.io/cloud-builders/docker' - args: [ 'build', '-t', 'us-central1-docker.pkg.dev/gorilla-375616/time-off-gorilla/time-off-image:latest', '.' ] + args: [ 'build', '--builder=gcr.io/cloud-builders/docker', '--publish','us-central1-docker.pkg.dev/gorilla-375616/time-off-gorilla/time-off-image:latest' ] - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk' entrypoint: 'bash' args: From 973f598b6f7526a6f0565ca7a7683a6dfcd39d00 Mon Sep 17 00:00:00 2001 From: aamador0202 <77211255+aamador0202@users.noreply.github.com> Date: Tue, 24 Jan 2023 17:09:54 -0600 Subject: [PATCH 05/14] Update cloudbuild.yaml --- cloudbuild.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/cloudbuild.yaml b/cloudbuild.yaml index 99287a68f..8b9d51c82 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -1,5 +1,6 @@ steps: - name: 'gcr.io/cloud-builders/docker' + entrypoint: 'docker' args: [ 'build', '--builder=gcr.io/cloud-builders/docker', '--publish','us-central1-docker.pkg.dev/gorilla-375616/time-off-gorilla/time-off-image:latest' ] - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk' entrypoint: 'bash' From 6e737d76721d46c92add4ff58953157c050b6ec9 Mon Sep 17 00:00:00 2001 From: aamador0202 <77211255+aamador0202@users.noreply.github.com> Date: Tue, 24 Jan 2023 17:10:46 -0600 Subject: [PATCH 06/14] Update cloudbuild.yaml --- cloudbuild.yaml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/cloudbuild.yaml b/cloudbuild.yaml index 8b9d51c82..8bbe3fe35 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -2,15 +2,15 @@ steps: - name: 'gcr.io/cloud-builders/docker' entrypoint: 'docker' args: [ 'build', '--builder=gcr.io/cloud-builders/docker', '--publish','us-central1-docker.pkg.dev/gorilla-375616/time-off-gorilla/time-off-image:latest' ] -- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk' - entrypoint: 'bash' - args: - - '-c' - - > - gcloud deploy releases create release-$BUILD_ID - --delivery-pipeline=time-off-app - --region=us-central1 - --source=./ - --images=image1=us-central1-docker.pkg.dev/gorilla-375616/time-off-gorilla/time-off-image:latest +# - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk' +# entrypoint: 'bash' +# args: +# - '-c' +# - > +# gcloud deploy releases create release-$BUILD_ID +# --delivery-pipeline=time-off-app +# --region=us-central1 +# --source=./ +# --images=image1=us-central1-docker.pkg.dev/gorilla-375616/time-off-gorilla/time-off-image:latest From 4c8cb30ccf54b95c3222d9607084355107853e87 Mon Sep 17 00:00:00 2001 From: aamador0202 <77211255+aamador0202@users.noreply.github.com> Date: Tue, 24 Jan 2023 17:11:48 -0600 Subject: [PATCH 07/14] Update cloudbuild.yaml --- cloudbuild.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cloudbuild.yaml b/cloudbuild.yaml index 8bbe3fe35..0e47febdc 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -1,7 +1,6 @@ steps: - name: 'gcr.io/cloud-builders/docker' - entrypoint: 'docker' - args: [ 'build', '--builder=gcr.io/cloud-builders/docker', '--publish','us-central1-docker.pkg.dev/gorilla-375616/time-off-gorilla/time-off-image:latest' ] + args: [ 'build', '-t', 'us-central1-docker.pkg.dev/gorilla-375616/time-off-gorilla/time-off-image:latest', '.' ] # - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk' # entrypoint: 'bash' # args: From a00a1fe02926af7665df6e48a3cd275d59563617 Mon Sep 17 00:00:00 2001 From: aamador0202 <77211255+aamador0202@users.noreply.github.com> Date: Tue, 24 Jan 2023 17:15:58 -0600 Subject: [PATCH 08/14] Update cloudbuild.yaml --- cloudbuild.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/cloudbuild.yaml b/cloudbuild.yaml index 0e47febdc..6f9fb64cb 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -1,6 +1,7 @@ steps: - name: 'gcr.io/cloud-builders/docker' args: [ 'build', '-t', 'us-central1-docker.pkg.dev/gorilla-375616/time-off-gorilla/time-off-image:latest', '.' ] +images: [us-central1-docker.pkg.dev/gorilla-375616/time-off-gorilla/time-off-image:latest] # - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk' # entrypoint: 'bash' # args: From 3836e022f7088224db5a3342aef521220291356a Mon Sep 17 00:00:00 2001 From: aamador0202 <77211255+aamador0202@users.noreply.github.com> Date: Tue, 24 Jan 2023 17:19:30 -0600 Subject: [PATCH 09/14] Update cloudbuild.yaml --- cloudbuild.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cloudbuild.yaml b/cloudbuild.yaml index 6f9fb64cb..34ef897ee 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -1,7 +1,7 @@ steps: - name: 'gcr.io/cloud-builders/docker' - args: [ 'build', '-t', 'us-central1-docker.pkg.dev/gorilla-375616/time-off-gorilla/time-off-image:latest', '.' ] -images: [us-central1-docker.pkg.dev/gorilla-375616/time-off-gorilla/time-off-image:latest] + args: [ 'build', '-t', 'gcr.io/gorilla-375616/time-off-gorilla/time-off-image:latest', '.' ] +images: [gcr.io/gorilla-375616/time-off-gorilla/time-off-image:latest] # - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk' # entrypoint: 'bash' # args: From 2d95d29d360c852d359a6905e0828dfe204e1e35 Mon Sep 17 00:00:00 2001 From: aamador0202 <77211255+aamador0202@users.noreply.github.com> Date: Tue, 24 Jan 2023 17:37:13 -0600 Subject: [PATCH 10/14] Update cloudbuild.yaml --- cloudbuild.yaml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/cloudbuild.yaml b/cloudbuild.yaml index 34ef897ee..e28dbef3c 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -1,16 +1,16 @@ steps: - name: 'gcr.io/cloud-builders/docker' - args: [ 'build', '-t', 'gcr.io/gorilla-375616/time-off-gorilla/time-off-image:latest', '.' ] -images: [gcr.io/gorilla-375616/time-off-gorilla/time-off-image:latest] -# - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk' -# entrypoint: 'bash' -# args: -# - '-c' -# - > -# gcloud deploy releases create release-$BUILD_ID -# --delivery-pipeline=time-off-app -# --region=us-central1 -# --source=./ -# --images=image1=us-central1-docker.pkg.dev/gorilla-375616/time-off-gorilla/time-off-image:latest + args: [ 'build', '-t', 'us-central1-docker.pkg.dev/gorilla-375616/time-off-gorilla/time-off-image:latest', '.' ] +- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk' + entrypoint: 'bash' + args: + - '-c' + - > + gcloud deploy releases create release-$BUILD_ID + --delivery-pipeline=time-off-app + --region=us-central1 + --source=./ + --images=image1=us-central1-docker.pkg.dev/gorilla-375616/time-off-gorilla/time-off-image:latest +images: ['us-central1-docker.pkg.dev/gorilla-375616/time-off-gorilla/time-off-image:latest'] From f5fb10df382fa18bd9f19901707f6aa2a0d16829 Mon Sep 17 00:00:00 2001 From: aamador0202 <77211255+aamador0202@users.noreply.github.com> Date: Tue, 24 Jan 2023 17:38:08 -0600 Subject: [PATCH 11/14] Update Dockerfile --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c97aa3606..7d1ef01b7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,7 @@ RUN apk add --no-cache \ nodejs npm COPY package.json . -RUN npm install +RUN npm install -g npm FROM alpine:latest @@ -35,7 +35,7 @@ RUN adduser --system app --home /app USER app WORKDIR /app COPY . /app -COPY --from=dependencies node_modules ./node_modules +#COPY --from=dependencies node_modules ./node_modules CMD npm start From 923b3a36eecf66c536ef36bc87c3b7f73ed99266 Mon Sep 17 00:00:00 2001 From: aamador0202 <77211255+aamador0202@users.noreply.github.com> Date: Tue, 24 Jan 2023 17:41:14 -0600 Subject: [PATCH 12/14] Update Dockerfile --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 7d1ef01b7..c1a86e88e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,6 +15,8 @@ # docker exec -ti --user root alpine_timeoff /bin/sh # -------------------------------------------------------------------- FROM alpine:latest as dependencies +RUN apk upgrade +RUN apk update RUN apk add --no-cache \ nodejs npm From be8d0367a5e53953588aea56859fd4edaf5d7d01 Mon Sep 17 00:00:00 2001 From: aamador0202 <77211255+aamador0202@users.noreply.github.com> Date: Tue, 24 Jan 2023 17:44:03 -0600 Subject: [PATCH 13/14] Update Dockerfile --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c1a86e88e..1a5759599 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,5 +40,4 @@ COPY . /app #COPY --from=dependencies node_modules ./node_modules CMD npm start - EXPOSE 3000 From fcb31f3f9f5fac2d10bced1423c52c055bd95e6c Mon Sep 17 00:00:00 2001 From: aamador0202 <77211255+aamador0202@users.noreply.github.com> Date: Tue, 24 Jan 2023 17:45:09 -0600 Subject: [PATCH 14/14] Update cloudbuild.yaml --- cloudbuild.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/cloudbuild.yaml b/cloudbuild.yaml index e28dbef3c..2ec3ff8c4 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -11,6 +11,7 @@ steps: --region=us-central1 --source=./ --images=image1=us-central1-docker.pkg.dev/gorilla-375616/time-off-gorilla/time-off-image:latest + images: ['us-central1-docker.pkg.dev/gorilla-375616/time-off-gorilla/time-off-image:latest']