From 9451765d74b4f81f83ab5148b27a12136859287f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Farestveit?= Date: Wed, 3 Aug 2022 10:53:13 +0200 Subject: [PATCH 1/6] first edit --- .vscode/settings.json | 32 ++++++++++++++++++++++++++++++++ editme.txt | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..a9f479e --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,32 @@ +{ + "workbench.colorCustomizations": { + "[Material Theme Darker High Contrast]": { + "activityBarBadge.background": "#2979FF", + "activityBar.activeBorder": "#2979FF", + "list.activeSelectionForeground": "#2979FF", + "list.inactiveSelectionForeground": "#2979FF", + "list.highlightForeground": "#2979FF", + "scrollbarSlider.activeBackground": "#2979FF50", + "editorSuggestWidget.highlightForeground": "#2979FF", + "textLink.foreground": "#2979FF", + "progressBar.background": "#2979FF", + "pickerGroup.foreground": "#2979FF", + "tab.activeBorder": "#2979FF", + "notificationLink.foreground": "#2979FF", + "editorWidget.resizeBorder": "#2979FF", + "editorWidget.border": "#2979FF", + "settings.modifiedItemIndicator": "#2979FF", + "settings.headerForeground": "#2979FF", + "panelTitle.activeBorder": "#2979FF", + "breadcrumb.activeSelectionForeground": "#2979FF", + "menu.selectionForeground": "#2979FF", + "menubar.selectionForeground": "#2979FF", + "editor.findMatchBorder": "#2979FF", + "selection.background": "#2979FF40", + "statusBarItem.remoteBackground": "#2979FF" + }, + "activityBar.background": "#531A1A", + "titleBar.activeBackground": "#752524", + "titleBar.activeForeground": "#FEFBFB" + } +} \ No newline at end of file diff --git a/editme.txt b/editme.txt index af97778..8f007c7 100644 --- a/editme.txt +++ b/editme.txt @@ -1,2 +1,2 @@ -Hello guys! I'm a good pipeline developer. My name is Baloo. +Hello guys! I'm a good pipeline developer. My name is Håvard og Ingrid. Hello guys \ No newline at end of file From cc06ff2359e478b300be914f3406ab7b25152d7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Farestveit?= Date: Wed, 3 Aug 2022 11:00:33 +0200 Subject: [PATCH 2/6] second edit --- .github/workflows/deploy.yml | 58 ++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index bc93484..bfb66be 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -6,7 +6,7 @@ name: Deploy!! on: # Triggers the workflow on push events, but only on "master" branch push: - branches: [ "master" ] + branches: ["master"] # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: @@ -17,46 +17,46 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: - - uses: actions/checkout@v3 # Checks-out your repository, so your job can access it + - uses: actions/checkout@v3 # Checks-out your repository, so your job can access it - name: Declare some variables #Example code to show "meta commands" # that can be used to pass variable info to be used later id: vars shell: bash run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" #Gets the short sha from the commit - + # Runs a set of commands using the runners shell - name: Run some tests as multiline bash - # This is just and example to show that the file test.txt - # is available here in the pipeline. You can - # of course run way more complicated test suites. - # (The code verifies that test.txt contains the substring assigned to the SUB variable, - # and fails the test otherwise) + # This is just and example to show that the file test.txt + # is available here in the pipeline. You can + # of course run way more complicated test suites. + # (The code verifies that test.txt contains the substring assigned to the SUB variable, + # and fails the test otherwise) run: | STR=$(cat editme.txt) - SUB='developer' + SUB='designer' if [[ "$STR" == *"$SUB"* ]]; then echo "Successfully ran test for {{vars.sha_short}}. The file looks okay." exit 0 fi exit 1 - # ----- DO NOT UNCOMMENT THIS, ONLY FOR EXAMPLE ----- - # NB: Note that this also requires a Dockerfile etc which this repository is missing. - # run: | - # docker version - # docker build \ - # --build-arg 'GIT_COMMIT=${{ github.sha }}' \ - # -t my-cool-app:latest \ - # . - # echo "Built image (git commit: ${{ github.sha }} tag: my-cool-app:latest)" - # - uses: azure/login@1f63701bf3e6892515f1b7ce2d2bf1708b46beaf #Login to azure from pipeline - # with: - # client-id: ${{ secrets.client-id }} - # tenant-id: ${{ secrets.tenant-id }} - # subscription-id: ${{ secrets.subscription-id }} - # - run: | - # image_url="my-registry.azure.containerregistry.com/my-cool-app" - # docker tag ${{ my-cool-app }}:latest ${image_url}:${{ github.sha }} - # az acr login --name my-registry.azure.containerregistry.com - # docker push ${image_url}:${{ github.sha }} - # ----- EXAMPLE DOCKER PUSH ENDS HERE ------ \ No newline at end of file + # ----- DO NOT UNCOMMENT THIS, ONLY FOR EXAMPLE ----- + # NB: Note that this also requires a Dockerfile etc which this repository is missing. + # run: | + # docker version + # docker build \ + # --build-arg 'GIT_COMMIT=${{ github.sha }}' \ + # -t my-cool-app:latest \ + # . + # echo "Built image (git commit: ${{ github.sha }} tag: my-cool-app:latest)" + # - uses: azure/login@1f63701bf3e6892515f1b7ce2d2bf1708b46beaf #Login to azure from pipeline + # with: + # client-id: ${{ secrets.client-id }} + # tenant-id: ${{ secrets.tenant-id }} + # subscription-id: ${{ secrets.subscription-id }} + # - run: | + # image_url="my-registry.azure.containerregistry.com/my-cool-app" + # docker tag ${{ my-cool-app }}:latest ${image_url}:${{ github.sha }} + # az acr login --name my-registry.azure.containerregistry.com + # docker push ${image_url}:${{ github.sha }} + # ----- EXAMPLE DOCKER PUSH ENDS HERE ------ From ce0b39ffd5004d3d8e2ef4d5469fe0691ce0e232 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Farestveit?= Date: Wed, 3 Aug 2022 11:01:34 +0200 Subject: [PATCH 3/6] third edit --- .github/workflows/deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index bfb66be..5a26939 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -37,9 +37,9 @@ jobs: SUB='designer' if [[ "$STR" == *"$SUB"* ]]; then echo "Successfully ran test for {{vars.sha_short}}. The file looks okay." - exit 0 + exit 1 fi - exit 1 + exit 0 # ----- DO NOT UNCOMMENT THIS, ONLY FOR EXAMPLE ----- # NB: Note that this also requires a Dockerfile etc which this repository is missing. # run: | From 93fc405eed90dfd223d8fdb7b9884442948c3f07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Farestveit?= Date: Wed, 3 Aug 2022 11:05:23 +0200 Subject: [PATCH 4/6] 4 edit --- .github/workflows/deploy.yml | 6 +++--- .github/workflows/newPipeline.txt | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/newPipeline.txt diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5a26939..bdf1bf0 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -34,12 +34,12 @@ jobs: # and fails the test otherwise) run: | STR=$(cat editme.txt) - SUB='designer' + SUB='developer' if [[ "$STR" == *"$SUB"* ]]; then echo "Successfully ran test for {{vars.sha_short}}. The file looks okay." - exit 1 + exit 0 fi - exit 0 + exit 1 # ----- DO NOT UNCOMMENT THIS, ONLY FOR EXAMPLE ----- # NB: Note that this also requires a Dockerfile etc which this repository is missing. # run: | diff --git a/.github/workflows/newPipeline.txt b/.github/workflows/newPipeline.txt new file mode 100644 index 0000000..5ef44be --- /dev/null +++ b/.github/workflows/newPipeline.txt @@ -0,0 +1,5 @@ +name: Pull request +on: + # Triggers the workflow on push events, but only on "master" branch + push: + branches: ["master"] From f96c26072806dd7202a7a0aae5088963d16b4e0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Farestveit?= Date: Wed, 3 Aug 2022 11:06:18 +0200 Subject: [PATCH 5/6] 5 edit --- .github/workflows/{newPipeline.txt => newPipeline.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{newPipeline.txt => newPipeline.yml} (100%) diff --git a/.github/workflows/newPipeline.txt b/.github/workflows/newPipeline.yml similarity index 100% rename from .github/workflows/newPipeline.txt rename to .github/workflows/newPipeline.yml From 6a9fc41e646165e6c381237ab90ff19747fc73f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Farestveit?= Date: Wed, 3 Aug 2022 11:15:16 +0200 Subject: [PATCH 6/6] new edit --- .github/workflows/newPipeline | 12 ++++++++++++ .github/workflows/newPipeline.yml | 5 ----- editme.txt | 2 +- 3 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/newPipeline delete mode 100644 .github/workflows/newPipeline.yml diff --git a/.github/workflows/newPipeline b/.github/workflows/newPipeline new file mode 100644 index 0000000..3780388 --- /dev/null +++ b/.github/workflows/newPipeline @@ -0,0 +1,12 @@ +name: Pull request +on: + # Triggers the workflow on push events, but only on "master" branch + push: + branches: ["master"] + jobs: + test: + name: Test everything + runs-on: ubuntu-20.04 + steps: + - name: Run a one-line script + run: echo Hello, world! diff --git a/.github/workflows/newPipeline.yml b/.github/workflows/newPipeline.yml deleted file mode 100644 index 5ef44be..0000000 --- a/.github/workflows/newPipeline.yml +++ /dev/null @@ -1,5 +0,0 @@ -name: Pull request -on: - # Triggers the workflow on push events, but only on "master" branch - push: - branches: ["master"] diff --git a/editme.txt b/editme.txt index 8f007c7..ec98b8a 100644 --- a/editme.txt +++ b/editme.txt @@ -1,2 +1,2 @@ -Hello guys! I'm a good pipeline developer. My name is Håvard og Ingrid. +Hello guys! I'm a good pipeline developer. My name is Håvard og Ingrid 🤠 Hello guys \ No newline at end of file