Skip to content

Commit

Permalink
Fixed git remote
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasdille committed Dec 7, 2023
1 parent 595a6c3 commit 81127ce
Show file tree
Hide file tree
Showing 22 changed files with 37 additions and 37 deletions.
8 changes: 4 additions & 4 deletions hands-on/2023-11-30/010_jobs_and_stages/exercise/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1230,7 +1230,7 @@ <h1 id="jobs-and-stages">Jobs and stages<a class="headerlink" href="#jobs-and-st
</div>
<h2 id="preparation">Preparation<a class="headerlink" href="#preparation" title="Permanent link">&para;</a></h2>
<p>This workshop is based on an example hello world application written in Go. Get the code using the following command:</p>
<div class="language-bash highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a>git<span class="w"> </span>checkout<span class="w"> </span>origin/160_gitlab_ci/example_app<span class="w"> </span>--<span class="w"> </span><span class="s1">&#39;*&#39;</span>
<div class="language-bash highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a>git<span class="w"> </span>checkout<span class="w"> </span>upstream/160_gitlab_ci/example_app<span class="w"> </span>--<span class="w"> </span><span class="s1">&#39;*&#39;</span>
</span></code></pre></div>
<h2 id="task-1-create-a-single-job">Task 1: Create a single job<a class="headerlink" href="#task-1-create-a-single-job" title="Permanent link">&para;</a></h2>
<p>Add a pipeline to build the code using the following commands:</p>
Expand Down Expand Up @@ -1264,7 +1264,7 @@ <h2 id="task-1-create-a-single-job">Task 1: Create a single job<a class="headerl
</span><span id="__span-2-6"><a id="__codelineno-2-6" name="__codelineno-2-6"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">./hello</span>
</span></code></pre></div></td></tr></table></div>
<p>If you want to jump to the solution, execute the following command:</p>
<div class="language-bash highlight"><pre><span></span><code><span id="__span-3-1"><a id="__codelineno-3-1" name="__codelineno-3-1" href="#__codelineno-3-1"></a>git<span class="w"> </span>checkout<span class="w"> </span>origin/160_gitlab_ci/010_jobs_and_stages/build<span class="w"> </span>--<span class="w"> </span><span class="s1">&#39;*&#39;</span>
<div class="language-bash highlight"><pre><span></span><code><span id="__span-3-1"><a id="__codelineno-3-1" name="__codelineno-3-1" href="#__codelineno-3-1"></a>git<span class="w"> </span>checkout<span class="w"> </span>upstream/160_gitlab_ci/010_jobs_and_stages/build<span class="w"> </span>--<span class="w"> </span><span class="s1">&#39;*&#39;</span>
</span></code></pre></div>
</details>
<h2 id="task-2-add-a-stage">Task 2: Add a stage<a class="headerlink" href="#task-2-add-a-stage" title="Permanent link">&para;</a></h2>
Expand Down Expand Up @@ -1325,7 +1325,7 @@ <h2 id="task-2-add-a-stage">Task 2: Add a stage<a class="headerlink" href="#task
</span><span id="__span-5-19"><a id="__codelineno-5-19" name="__codelineno-5-19"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">./hello</span>
</span></code></pre></div></td></tr></table></div>
<p>If you want to jump to the solution, execute the following command:</p>
<div class="language-bash highlight"><pre><span></span><code><span id="__span-6-1"><a id="__codelineno-6-1" name="__codelineno-6-1" href="#__codelineno-6-1"></a>git<span class="w"> </span>checkout<span class="w"> </span>origin/160_gitlab_ci/010_jobs_and_stages/lint<span class="w"> </span>--<span class="w"> </span><span class="s1">&#39;*&#39;</span>
<div class="language-bash highlight"><pre><span></span><code><span id="__span-6-1"><a id="__codelineno-6-1" name="__codelineno-6-1" href="#__codelineno-6-1"></a>git<span class="w"> </span>checkout<span class="w"> </span>upstream/160_gitlab_ci/010_jobs_and_stages/lint<span class="w"> </span>--<span class="w"> </span><span class="s1">&#39;*&#39;</span>
</span></code></pre></div>
</details>
<h2 id="task-3-add-parallel-jobs">Task 3: Add parallel jobs<a class="headerlink" href="#task-3-add-parallel-jobs" title="Permanent link">&para;</a></h2>
Expand Down Expand Up @@ -1389,7 +1389,7 @@ <h2 id="task-3-add-parallel-jobs">Task 3: Add parallel jobs<a class="headerlink"
</span><span id="__span-7-25"><a id="__codelineno-7-25" name="__codelineno-7-25"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">./hello</span>
</span></code></pre></div></td></tr></table></div>
<p>If you want to jump to the solution, execute the following command:</p>
<div class="language-bash highlight"><pre><span></span><code><span id="__span-8-1"><a id="__codelineno-8-1" name="__codelineno-8-1" href="#__codelineno-8-1"></a>git<span class="w"> </span>checkout<span class="w"> </span>origin/160_gitlab_ci/010_jobs_and_stages/parallel<span class="w"> </span>--<span class="w"> </span><span class="s1">&#39;*&#39;</span>
<div class="language-bash highlight"><pre><span></span><code><span id="__span-8-1"><a id="__codelineno-8-1" name="__codelineno-8-1" href="#__codelineno-8-1"></a>git<span class="w"> </span>checkout<span class="w"> </span>upstream/160_gitlab_ci/010_jobs_and_stages/parallel<span class="w"> </span>--<span class="w"> </span><span class="s1">&#39;*&#39;</span>
</span></code></pre></div>
</details>
<!-- TODO: error handling (if, || true etc.) -->
Expand Down
10 changes: 5 additions & 5 deletions hands-on/2023-11-30/020_variables/exercise/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1212,7 +1212,7 @@ <h1 id="variables">Variables<a class="headerlink" href="#variables" title="Perma
</div>
<h2 id="task-1-create-a-job-variable">Task 1: Create a job variable<a class="headerlink" href="#task-1-create-a-job-variable" title="Permanent link">&para;</a></h2>
<p>This exercise requires an updates version of our hello world program:</p>
<div class="language-bash highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a>git<span class="w"> </span>checkout<span class="w"> </span>origin/160_gitlab_ci/020_variables/inline<span class="w"> </span>--<span class="w"> </span>main.go
<div class="language-bash highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a>git<span class="w"> </span>checkout<span class="w"> </span>upstream/160_gitlab_ci/020_variables/inline<span class="w"> </span>--<span class="w"> </span>main.go
</span></code></pre></div>
<p>Add a variable called <code>version</code> to the job called <code>build</code> and modify the build command as follows:</p>
<div class="language-bash highlight"><pre><span></span><code><span id="__span-1-1"><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a>go<span class="w"> </span>build<span class="w"> </span>-o<span class="w"> </span>hello<span class="w"> </span>-ldflags<span class="w"> </span><span class="s2">&quot;-X main.Version=</span><span class="si">${</span><span class="nv">version</span><span class="si">}</span><span class="s2">&quot;</span><span class="w"> </span>.
Expand Down Expand Up @@ -1292,7 +1292,7 @@ <h2 id="task-1-create-a-job-variable">Task 1: Create a job variable<a class="hea
</span></span><span id="__span-2-31"><a id="__codelineno-2-31" name="__codelineno-2-31"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">./hello</span>
</span></code></pre></div></td></tr></table></div>
<p>If you want to jump to the solution, execute the following command:</p>
<p>git checkout origin/160_gitlab_ci/020_variables/inline -- '*'</p>
<p>git checkout upstream/160_gitlab_ci/020_variables/inline -- '*'</p>
</details>
<h2 id="task-2-use-a-predefined-variable">Task 2: Use a predefined variable<a class="headerlink" href="#task-2-use-a-predefined-variable" title="Permanent link">&para;</a></h2>
<p>Read the <a href="https://docs.gitlab.com/ee/ci/variables/index.html#predefined-cicd-variables">official documentation about predefined variables</a> and replace the job variable with the predefined variable <code>CI_COMMIT_REF_NAME</code>.</p>
Expand Down Expand Up @@ -1366,11 +1366,11 @@ <h2 id="task-2-use-a-predefined-variable">Task 2: Use a predefined variable<a cl
</span></span><span id="__span-3-29"><a id="__codelineno-3-29" name="__codelineno-3-29"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">./hello</span>
</span></code></pre></div></td></tr></table></div>
<p>If you want to jump to the solution, execute the following command:</p>
<p>git checkout origin/160_gitlab_ci/020_variables/predefined -- '*'</p>
<p>git checkout upstream/160_gitlab_ci/020_variables/predefined -- '*'</p>
</details>
<h2 id="task-3-add-a-ci-variable-in-the-ui">Task 3: Add a CI variable in the UI<a class="headerlink" href="#task-3-add-a-ci-variable-in-the-ui" title="Permanent link">&para;</a></h2>
<p>This exercise requires an updates version of our hello world application:</p>
<div class="language-bash highlight"><pre><span></span><code><span id="__span-4-1"><a id="__codelineno-4-1" name="__codelineno-4-1" href="#__codelineno-4-1"></a>git<span class="w"> </span>checkout<span class="w"> </span>origin/160_gitlab_ci/020_variables/ci<span class="w"> </span>--<span class="w"> </span>main.go
<div class="language-bash highlight"><pre><span></span><code><span id="__span-4-1"><a id="__codelineno-4-1" name="__codelineno-4-1" href="#__codelineno-4-1"></a>git<span class="w"> </span>checkout<span class="w"> </span>upstream/160_gitlab_ci/020_variables/ci<span class="w"> </span>--<span class="w"> </span>main.go
</span></code></pre></div>
<p>The application now also prints the name of the author which must be supplied during compilation as well.</p>
<p>Read the <a href="https://docs.gitlab.com/ee/ci/variables/#define-a-cicd-variable-in-the-ui">official documentation about CI variables</a> and extend the build command to provide <code>main.Author</code> through a CI variable called <code>AUTHOR</code>.</p>
Expand Down Expand Up @@ -1448,7 +1448,7 @@ <h2 id="task-3-add-a-ci-variable-in-the-ui">Task 3: Add a CI variable in the UI<
</span></span><span id="__span-5-29"><a id="__codelineno-5-29" name="__codelineno-5-29"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">./hello</span>
</span></code></pre></div></td></tr></table></div>
<p>If you want to jump to the solution, execute the following command:</p>
<div class="language-bash highlight"><pre><span></span><code><span id="__span-6-1"><a id="__codelineno-6-1" name="__codelineno-6-1" href="#__codelineno-6-1"></a>git<span class="w"> </span>checkout<span class="w"> </span>origin/160_gitlab_ci/020_variables/ci<span class="w"> </span>--<span class="w"> </span><span class="s1">&#39;*&#39;</span>
<div class="language-bash highlight"><pre><span></span><code><span id="__span-6-1"><a id="__codelineno-6-1" name="__codelineno-6-1" href="#__codelineno-6-1"></a>git<span class="w"> </span>checkout<span class="w"> </span>upstream/160_gitlab_ci/020_variables/ci<span class="w"> </span>--<span class="w"> </span><span class="s1">&#39;*&#39;</span>
</span></code></pre></div>
</details>
<!-- TODO: masked variables -->
Expand Down
2 changes: 1 addition & 1 deletion hands-on/2023-11-30/030_script_blocks/exercise/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1285,7 +1285,7 @@ <h2 id="task-separate-script-blocks-into-preparation-and-main-task">Task: Separa
</span><span id="__span-0-32"><a id="__codelineno-0-32" name="__codelineno-0-32"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">./hello</span>
</span></code></pre></div></td></tr></table></div>
<p>If you want to jump to the solution, execute the following command:</p>
<div class="language-bash highlight"><pre><span></span><code><span id="__span-1-1"><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a>git<span class="w"> </span>checkout<span class="w"> </span>origin/160_gitlab_ci/030_script_blocks<span class="w"> </span>--<span class="w"> </span><span class="s1">&#39;*&#39;</span>
<div class="language-bash highlight"><pre><span></span><code><span id="__span-1-1"><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a>git<span class="w"> </span>checkout<span class="w"> </span>upstream/160_gitlab_ci/030_script_blocks<span class="w"> </span>--<span class="w"> </span><span class="s1">&#39;*&#39;</span>
</span></code></pre></div>
</details>
<p>Cleanup commands can be move to <code>after_script</code> (<a href="https://docs.gitlab.com/ee/ci/yaml/#after_script">official documentation</a>) but we have no use for this in the current example.</p>
Expand Down
2 changes: 1 addition & 1 deletion hands-on/2023-11-30/040_image/exercise/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1258,7 +1258,7 @@ <h2 id="task-simplify-using-container-images">Task: Simplify using container ima
</span><span id="__span-0-26"><a id="__codelineno-0-26" name="__codelineno-0-26"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">./hello</span>
</span></code></pre></div></td></tr></table></div>
<p>If you want to jump to the solution, execute the following command:</p>
<div class="language-bash highlight"><pre><span></span><code><span id="__span-1-1"><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a>git<span class="w"> </span>checkout<span class="w"> </span>origin/160_gitlab_ci/040_image<span class="w"> </span>--<span class="w"> </span><span class="s1">&#39;*&#39;</span>
<div class="language-bash highlight"><pre><span></span><code><span id="__span-1-1"><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a>git<span class="w"> </span>checkout<span class="w"> </span>upstream/160_gitlab_ci/040_image<span class="w"> </span>--<span class="w"> </span><span class="s1">&#39;*&#39;</span>
</span></code></pre></div>
</details>
<h2 id="bonus-test-different-images">Bonus: Test different images<a class="headerlink" href="#bonus-test-different-images" title="Permanent link">&para;</a></h2>
Expand Down
2 changes: 1 addition & 1 deletion hands-on/2023-11-30/050_defaults/exercise/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1276,7 +1276,7 @@ <h2 id="task-dont-repeat-yourself">Task: Don't repeat yourself<a class="headerli
</span><span id="__span-0-26"><a id="__codelineno-0-26" name="__codelineno-0-26"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">./hello</span>
</span></code></pre></div></td></tr></table></div>
<p>If you want to jump to the solution, execute the following command:</p>
<div class="language-bash highlight"><pre><span></span><code><span id="__span-1-1"><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a>git<span class="w"> </span>checkout<span class="w"> </span>origin/160_gitlab_ci/050_default<span class="w"> </span>--<span class="w"> </span><span class="s1">&#39;*&#39;</span>
<div class="language-bash highlight"><pre><span></span><code><span id="__span-1-1"><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a>git<span class="w"> </span>checkout<span class="w"> </span>upstream/160_gitlab_ci/050_default<span class="w"> </span>--<span class="w"> </span><span class="s1">&#39;*&#39;</span>
</span></code></pre></div>
</details>
<h2 id="bonus-1-override-defaults">Bonus 1: Override defaults<a class="headerlink" href="#bonus-1-override-defaults" title="Permanent link">&para;</a></h2>
Expand Down
2 changes: 1 addition & 1 deletion hands-on/2023-11-30/060_artifacts/exercise/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1303,7 +1303,7 @@ <h2 id="task-1-pass-an-artifact-to-the-next-stage">Task 1: Pass an artifact to t
</span></span><span id="__span-1-35"><a id="__codelineno-1-35" name="__codelineno-1-35"></a><span class="hll"><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">./hello</span>
</span></span></code></pre></div></td></tr></table></div>
<p>If you want to jump to the solution, execute the following command:</p>
<div class="language-bash highlight"><pre><span></span><code><span id="__span-2-1"><a id="__codelineno-2-1" name="__codelineno-2-1" href="#__codelineno-2-1"></a>git<span class="w"> </span>checkout<span class="w"> </span>origin/160_gitlab_ci/060_artifact<span class="w"> </span>--<span class="w"> </span><span class="s1">&#39;*&#39;</span>
<div class="language-bash highlight"><pre><span></span><code><span id="__span-2-1"><a id="__codelineno-2-1" name="__codelineno-2-1" href="#__codelineno-2-1"></a>git<span class="w"> </span>checkout<span class="w"> </span>upstream/160_gitlab_ci/060_artifact<span class="w"> </span>--<span class="w"> </span><span class="s1">&#39;*&#39;</span>
</span></code></pre></div>
</details>
<h2 id="bonus-1-define-from-which-jobs-to-receive-artifacts">Bonus 1: Define from which jobs to receive artifacts<a class="headerlink" href="#bonus-1-define-from-which-jobs-to-receive-artifacts" title="Permanent link">&para;</a></h2>
Expand Down
4 changes: 2 additions & 2 deletions hands-on/2023-11-30/090_unit_tests/exercise/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1194,7 +1194,7 @@ <h1 id="unit-tests">Unit tests<a class="headerlink" href="#unit-tests" title="Pe
<p>This exercise adds a unit test to the hello world application.</p>
<h2 id="preparation">Preparation<a class="headerlink" href="#preparation" title="Permanent link">&para;</a></h2>
<p>Let's update the code:</p>
<div class="language-bash highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a>git<span class="w"> </span>checkout<span class="w"> </span>origin/160_gitlab_ci/090_unit_tests<span class="w"> </span>--<span class="w"> </span>main_test.go<span class="w"> </span>go.mod<span class="w"> </span>go.sum
<div class="language-bash highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a>git<span class="w"> </span>checkout<span class="w"> </span>upstream/160_gitlab_ci/090_unit_tests<span class="w"> </span>--<span class="w"> </span>main_test.go<span class="w"> </span>go.mod<span class="w"> </span>go.sum
</span></code></pre></div>
<h2 id="task-publish-unit-test-results">Task: Publish unit test results<a class="headerlink" href="#task-publish-unit-test-results" title="Permanent link">&para;</a></h2>
<p>The following commands execute unit tests and automatically convert the results to JUnit using <a href="https://github.com/gotestyourself/gotestsum">gotestsum</a>:</p>
Expand Down Expand Up @@ -1316,7 +1316,7 @@ <h2 id="task-publish-unit-test-results">Task: Publish unit test results<a class=
</span><span id="__span-3-45"><a id="__codelineno-3-45" name="__codelineno-3-45"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">./hello</span>
</span></code></pre></div></td></tr></table></div>
<p>If you want to jump to the solution, execute the following command:</p>
<div class="language-bash highlight"><pre><span></span><code><span id="__span-4-1"><a id="__codelineno-4-1" name="__codelineno-4-1" href="#__codelineno-4-1"></a>git<span class="w"> </span>checkout<span class="w"> </span>origin/160_gitlab_ci/090_unit_tests<span class="w"> </span>--<span class="w"> </span><span class="s1">&#39;*&#39;</span>
<div class="language-bash highlight"><pre><span></span><code><span id="__span-4-1"><a id="__codelineno-4-1" name="__codelineno-4-1" href="#__codelineno-4-1"></a>git<span class="w"> </span>checkout<span class="w"> </span>upstream/160_gitlab_ci/090_unit_tests<span class="w"> </span>--<span class="w"> </span><span class="s1">&#39;*&#39;</span>
</span></code></pre></div>
</details>

Expand Down
Loading

0 comments on commit 81127ce

Please sign in to comment.